-
- cur_lon = 10;
- cur_lat = 10;
-
- SGWayPoint c1(-20, 10, SGWayPoint::CARTESIAN, "Due East");
- c1.CourseAndDistance( cur_lon, cur_lat, &course, &distance );
- cout << "Course to " << c1.get_id() << " is " << course << endl;
- cout << "Distance to " << c1.get_id() << " is " << distance << endl;
-
- SGWayPoint c2(20, 20, SGWayPoint::CARTESIAN, "Due SW");
- c2.CourseAndDistance( cur_lon, cur_lat, &course, &distance );
- cout << "Course to " << c2.get_id() << " is " << course << endl;
- cout << "Distance to " << c2.get_id() << " is " << distance << endl;
-
- SGWayPoint c3(20, 0, SGWayPoint::CARTESIAN, "Due NW");
- c3.CourseAndDistance( cur_lon, cur_lat, &course, &distance );
- cout << "Course to " << c3.get_id() << " is " << course << endl;
- cout << "Distance to " << c3.get_id() << " is " << distance << endl;