Update route/waypoint tests for revised API

This commit is contained in:
jmt 2009-06-08 23:30:54 +00:00 committed by Tim Moore
parent 03a7d72a62
commit 6e326976d5
2 changed files with 2 additions and 20 deletions

View File

@ -23,7 +23,7 @@ void dump_route(const SGRoute& route, const char* message)
int main() int main()
{ {
SGRoute route; SGRoute route;
/*
route.add_waypoint( SGWayPoint(0, 0, 0, SGWayPoint::CARTESIAN, "Start") ); route.add_waypoint( SGWayPoint(0, 0, 0, SGWayPoint::CARTESIAN, "Start") );
route.add_waypoint( SGWayPoint(1, 0, 0, SGWayPoint::CARTESIAN, "1") ); route.add_waypoint( SGWayPoint(1, 0, 0, SGWayPoint::CARTESIAN, "1") );
route.add_waypoint( SGWayPoint(2, 0, 0, SGWayPoint::CARTESIAN, "2") ); route.add_waypoint( SGWayPoint(2, 0, 0, SGWayPoint::CARTESIAN, "2") );
@ -48,6 +48,6 @@ int main()
route.add_waypoint(wp2, 3); route.add_waypoint(wp2, 3);
dump_route(route, "added back WP2 after WP3"); dump_route(route, "added back WP2 after WP3");
*/
return 0; return 0;
} }

View File

@ -43,24 +43,6 @@ int main() {
cout << "Distance to " << b2.get_id() << " is " << distance * SG_METER_TO_NM cout << "Distance to " << b2.get_id() << " is " << distance * SG_METER_TO_NM
<< endl; << endl;
cout << endl; cout << endl;
cur_lon = 10;
cur_lat = 10;
SGWayPoint c1(-20, 10, 0, SGWayPoint::CARTESIAN, "Due East");
c1.CourseAndDistance( cur_lon, cur_lat, cur_alt, &course, &distance );
cout << "Course to " << c1.get_id() << " is " << course << endl;
cout << "Distance to " << c1.get_id() << " is " << distance << endl;
SGWayPoint c2(20, 20, 0, SGWayPoint::CARTESIAN, "Due SW");
c2.CourseAndDistance( cur_lon, cur_lat, cur_alt, &course, &distance );
cout << "Course to " << c2.get_id() << " is " << course << endl;
cout << "Distance to " << c2.get_id() << " is " << distance << endl;
SGWayPoint c3(20, 0, 0, SGWayPoint::CARTESIAN, "Due NW");
c3.CourseAndDistance( cur_lon, cur_lat, cur_alt, &course, &distance );
cout << "Course to " << c3.get_id() << " is " << course << endl;
cout << "Distance to " << c3.get_id() << " is " << distance << endl;
return 0; return 0;
} }