1 #include <simgear/compiler.h>
2 #include <simgear/constants.h>
6 #include "waypoint.hxx"
12 SGWayPoint a1(-93.216923, 44.880547, 0.0, SGWayPoint::WGS84, "KMSP");
16 double cur_lon = -89.336939;
17 double cur_lat = 43.139541;
20 double course, distance;
22 a1.CourseAndDistance( cur_lon, cur_lat, cur_alt, &course, &distance );
23 cout << "Course to " << a1.get_id() << " is " << course << endl;
24 cout << "Distance to " << a1.get_id() << " is " << distance * SG_METER_TO_NM
27 SGWayPoint b1(-88.237037, 43.041038, 0.0, SGWayPoint::WGS84, "KUES");
30 b1.CourseAndDistance( cur_lon, cur_lat, cur_alt, &course, &distance );
31 cout << "Course to " << b1.get_id() << " is " << course << endl;
32 cout << "Distance to " << b1.get_id() << " is " << distance * SG_METER_TO_NM