]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/navlist.hxx
Moved some of the low level scene graph construction code over to simgear.
[flightgear.git] / src / Navaids / navlist.hxx
index 1d6bea2c640297693f182761cfe093df38acd502..31e99727687037ec4a94c1c933bfeca25262d44c 100644 (file)
@@ -54,12 +54,10 @@ class FGNavList {
     nav_map_type navaids;
     nav_ident_map_type ident_navaids;
        
-    // internal helper to pick a Nav item from a nav_list based on
-    // distance from the aircraft point
-    bool findNavFromList(const Point3D &aircraft, 
-                         nav_list_iterator current,
-                         nav_list_iterator last,
-                         FGNav *n);
+    // Given a point and a list of stations, return the closest one to
+    // the specified point.
+    FGNav *findNavFromList( const Point3D &aircraft, 
+                            const nav_list_type &stations );
        
 public:
 
@@ -69,12 +67,18 @@ public:
     // load the navaids and build the map
     bool init( SGPath path );
 
-    // query the database for the specified frequency, lon and lat are
-    // in degrees, elev is in meters
-    bool query( double lon, double lat, double elev, double freq, FGNav *n );
+    // Query the database for the specified frequency.  It is assumed
+    // that there will be multiple stations with matching frequencies
+    // so a position must be specified.  Lon and lat are in degrees,
+    // elev is in meters.
+    FGNav *findByFreq( double freq, double lon, double lat, double elev );
 
     // locate closest item in the DB matching the requested ident
-    bool findByIdent(const char* ident, double lon, double lat, FGNav *nav);
+    FGNav *findByIdent( const char* ident, const double lon, const double lat );
+
+    // Given an Ident and optional freqency, return the first matching
+    // station.
+    FGNav *findByIdentAndFreq( const char* ident, const double freq = 0.0 );
 };