1
0
Fork 0
flightgear/src/Navaids/testnavs.cxx

23 lines
532 B
C++
Raw Normal View History

#include <simgear/misc/fgpath.hxx>
2000-04-21 16:03:36 +00:00
#include "navlist.hxx"
int main() {
2000-04-21 16:42:01 +00:00
FGNavList navs;
2000-04-21 05:26:24 +00:00
FGPath p( "/export/data2/curt/FlightGear/Navaids/default.nav" );
navs.init( p );
2000-04-21 05:26:24 +00:00
2000-04-21 16:42:01 +00:00
FGNav n;
2000-04-21 05:26:24 +00:00
double heading, dist;
if ( navs.query( -93.2, 45.14, 3000, 117.30,
&n, &heading, &dist) ) {
cout << "Found a station in range" << endl;
cout << " id = " << n.get_ident() << endl;
cout << " heading = " << heading << " dist = " << dist << endl;
} else {
cout << "not picking anything up. :-(" << endl;
}
}