*/
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
* 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.