]> git.mxchange.org Git - simgear.git/blob - simgear/route/waytest.cxx
Minor compiler version detection issue.
[simgear.git] / simgear / route / waytest.cxx
1 #include <simgear/compiler.h>
2 #include <simgear/constants.h>
3
4 #include <iostream>
5
6 #include "waypoint.hxx"
7
8 using std::cout;
9 using std::endl;
10
11 int main() {
12     SGWayPoint a1(-93.216923, 44.880547, 0.0, SGWayPoint::WGS84, "KMSP");
13
14
15     // KMSN (Madison)
16     double cur_lon = -89.336939;
17     double cur_lat = 43.139541;
18     double cur_alt = 0.0;
19
20     double course, distance;
21
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
25          << endl;
26
27     SGWayPoint b1(-88.237037, 43.041038, 0.0, SGWayPoint::WGS84, "KUES");
28
29
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
33          << endl;
34
35     cout << endl;
36    
37     return 0;
38 }