1 #include <simgear/misc/sg_path.hxx>
10 current_navlist = new FGNavList;
11 SGPath p_nav( "/home/curt/FlightGear/Navaids/default.nav" );
12 current_navlist->init( p_nav );
14 if ( current_navlist->query( -93.2 * SG_DEGREES_TO_RADIANS,
15 45.14 * SG_DEGREES_TO_RADIANS,
18 cout << "Found a vor station in range" << endl;
19 cout << " id = " << n.get_ident() << endl;
21 cout << "not picking up vor. :-(" << endl;
24 current_ilslist = new FGILSList;
25 SGPath p_ils( "/home/curt/FlightGear/Navaids/default.ils" );
26 current_ilslist->init( p_ils );
28 if ( current_ilslist->query( -93.1 * SG_DEGREES_TO_RADIANS,
29 45.24 * SG_DEGREES_TO_RADIANS,
32 cout << "Found an ils station in range" << endl;
33 cout << " apt = " << i.get_aptcode() << endl;
34 cout << " rwy = " << i.get_rwyno() << endl;
36 cout << "not picking up ils. :-(" << endl;
39 current_fixlist = new FGFixList;
40 SGPath p_fix( "/home/curt/FlightGear/Navaids/default.fix" );
41 current_fixlist->init( p_fix );
43 if ( current_fixlist->query( "SHELL", -82 * SG_DEGREES_TO_RADIANS,
44 41 * SG_DEGREES_TO_RADIANS, 3000,
45 &fix, &heading, &dist) )
47 cout << "Found a matching fix" << endl;
48 cout << " id = " << fix.get_ident() << endl;
49 cout << " heading = " << heading << " dist = " << dist << endl;
51 cout << "did not find fix. :-(" << endl;