2000-04-21 04:19:22 +00:00
|
|
|
#include <simgear/misc/fgpath.hxx>
|
|
|
|
|
2000-04-21 16:03:36 +00:00
|
|
|
#include "navlist.hxx"
|
2000-04-21 04:19:22 +00:00
|
|
|
|
|
|
|
int main() {
|
2000-04-21 16:42:01 +00:00
|
|
|
FGNavList navs;
|
2000-04-21 04:19:22 +00:00
|
|
|
|
2000-04-21 05:26:24 +00:00
|
|
|
FGPath p( "/export/data2/curt/FlightGear/Navaids/default.nav" );
|
2000-04-21 04:19:22 +00:00
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
2000-04-21 04:19:22 +00:00
|
|
|
}
|