]> git.mxchange.org Git - flightgear.git/blobdiff - src/Navaids/positioned.hxx
Further extensions to FGPositioned to support ongoing GPS work.
[flightgear.git] / src / Navaids / positioned.hxx
index 4d1f6081fbb32252dde13bac5a38a6d2d47278ef..b56f3b0933521c05244a51eeb8db7bfe98c78765 100644 (file)
@@ -158,6 +158,11 @@ public:
    */
   static FGPositionedRef findNextWithPartialId(FGPositionedRef aCur, const std::string& aId, Filter* aFilter = NULL);
   
+  /**
+   * As above, but searches using an offset index
+   */
+  static FGPositionedRef findWithPartialId(const std::string& aId, Filter* aFilter, int aOffset);
+  
   /**
    * Find all items with the specified ident, and return then sorted by
    * distance from a position
@@ -182,12 +187,18 @@ public:
    * Very large cutoff values will make this slow.
    * 
    * @result The matches (possibly less than N, depending on the filter and cutoff),
-  *    sorted by distance from the search pos
+   *    sorted by distance from the search pos
    * @param aN - number of matches to find
    * @param aCutoffNm - maximum distance to search within, in nautical miles
    */
   static List findClosestN(const SGGeod& aPos, unsigned int aN, double aCutoffNm, Filter* aFilter = NULL);
   
+  /**
+   * Find the closest match based on partial id (with an offset to allow selecting the n-th closest).
+   * Cutoff distance is limited internally, to avoid making this very slow.
+   */
+  static FGPositionedRef findClosestWithPartialId(const SGGeod& aPos, const std::string& aId, Filter* aFilter, int aOffset);
+
   /**
    * Map a candidate type string to a real type. Returns INVALID if the string
    * does not correspond to a defined type.