1 #include <simgear/misc/fgpath.hxx>
10 current_navlist = new FGNavList;
11 FGPath p_nav( "/home/curt/FlightGear/Navaids/default.nav" );
12 current_navlist->init( p_nav );
14 if ( current_navlist->query( -93.2, 45.14, 3000, 117.30,
15 &n, &heading, &dist) ) {
16 cout << "Found a vor station in range" << endl;
17 cout << " id = " << n.get_ident() << endl;
18 cout << " heading = " << heading << " dist = " << dist << endl;
20 cout << "not picking up vor. :-(" << endl;
23 current_ilslist = new FGILSList;
24 FGPath p_ils( "/home/curt/FlightGear/Navaids/default.ils" );
25 current_ilslist->init( p_ils );
27 if ( current_ilslist->query( -93.1, 45.24, 3000, 110.30,
28 &i, &heading, &dist) ) {
29 cout << "Found an ils station in range" << endl;
30 cout << " apt = " << i.get_aptcode() << endl;
31 cout << " rwy = " << i.get_rwyno() << endl;
32 cout << " heading = " << heading << " dist = " << dist << endl;
34 cout << "not picking up ils. :-(" << endl;
37 current_fixlist = new FGFixList;
38 FGPath p_fix( "/home/curt/FlightGear/Navaids/default.fix" );
39 current_fixlist->init( p_fix );
41 if ( current_fixlist->query( "GONER", -82, 41, 3000,
42 &fix, &heading, &dist) ) {
43 cout << "Found a matching fix" << endl;
44 cout << " id = " << fix.get_ident() << endl;
45 cout << " heading = " << heading << " dist = " << dist << endl;
47 cout << "did not find fix. :-(" << endl;