John A. Gallas writes: > > Hello everyone- > > I was just wondering if the subroutine > SGRoute.distance_off_route() calculates accurate > results (or even reasonably usable results for > navigation in fgfs) for waypoints on a wgs84 system. > I've run some tests and it seems okay, but I'm no > expert - can someone verify this? > > Also, what units does it return? I measured two > distances, two line segments a and b, forming one line > perpendicular to line c, and the total distance came > to be .03802. Then I used the SGWaypoint routines to > calculate the actual length of line a+b and got > 1.92609NM or 3567.11 meters. This makes me suspect > that either distance_off_route() is using some strange > (large) units, or else it just isn't working > correctly. > > The code says that it assumes that all points are > lying on a flat plane, and that it works best with a > cartesian system.
I don't know if that code is well tested ... it ought to work though. :-) It probably returns distance in meters if I had any sense about me when I wrote it. If you send me a simple test program I'll see if I can find some time to take a look. Regards, Curt. -- Curtis Olson IVLab / HumanFIRST Program FlightGear Project Twin Cities [EMAIL PROTECTED] [EMAIL PROTECTED] Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel