ShelleyBelly
New Member
- Joined
- Mar 2, 2011
- Messages
- 44
Evenin everyone,
I've the below bit of code for a UDF which seams to have a problem. "arrco" seems to calculate correctly but "depco" does not. When i switch these two it is always the first that works and the second that does not.
I believe it's something to do with reusing Lat2 and Lon2.
I'm sure it's an easy fix but I can't figure it, any help would greatly appreciated.
Cheers,
Tom
I've the below bit of code for a UDF which seams to have a problem. "arrco" seems to calculate correctly but "depco" does not. When i switch these two it is always the first that works and the second that does not.
Code:
Function CourseAlt(Lat1, Lon1, Lat2, Lon2, Lat3, Lon3, Sailmode2, Sailmode3)
arrco = ArrCourse(Lat1, Lon1, Lat2, Lon2, Sailmode2)
depco = DepCourse(Lat2, Lon2, Lat3, Lon3, Sailmode3)
CourseAlt = CourseDiff(arrco, depco)
End Function
I believe it's something to do with reusing Lat2 and Lon2.
I'm sure it's an easy fix but I can't figure it, any help would greatly appreciated.
Cheers,
Tom
Last edited: