string sty(_scratchNode->getStringValue("type"));
_searchType = FGPositioned::typeFromName(sty);
_searchQuery = _scratchNode->getStringValue("query");
+ if (_searchQuery.empty()) {
+ SG_LOG(SG_INSTR, SG_WARN, "empty GPS search query");
+ clearScratch();
+ return;
+ }
+
_searchExact = _scratchNode->getBoolValue("exact", true);
_searchOrderByRange = _scratchNode->getBoolValue("order-by-distance", true);
_searchResultIndex = 0;
gps->update(0.05);
gps->update(0.05);
- scratch->setStringValue("ident", "TL");
+ scratch->setStringValue("query", "TL");
scratch->setStringValue("type", "Vor");
scratch->setBoolValue("exact", false);
nd->setStringValue("command", "search");
nd->setDoubleValue("config/min-runway-length-ft", 5000.0);
scratch->setBoolValue("exact", false);
scratch->setBoolValue("order-by-distance", false);
- scratch->setStringValue("ident", "KS");
+ scratch->setStringValue("query", "KS");
scratch->setStringValue("type", "apt");
nd->setStringValue("command", "search");
scratch->setBoolValue("exact", true);
scratch->setBoolValue("order-by-distance", true);
scratch->setStringValue("type", "vor");
- scratch->setStringValue("ident", "DCS");
+ scratch->setStringValue("query", "DCS");
nd->setStringValue("command", "search");
printScratch(scratch);
// search on totally missing
scratch->setBoolValue("exact", true);
scratch->setBoolValue("order-by-distance", true);
- scratch->setStringValue("ident", "FOFOFOFOF");
+ scratch->setStringValue("query", "FOFOFOFOF");
nd->setStringValue("command", "search");
printScratch(scratch);
<< " " << wp1->getDoubleValue("latitude-deg"));
// OBS mode
- scratch->setStringValue("ident", "UW");
+ scratch->setStringValue("query", "UW");
scratch->setBoolValue("order-by-distance", true);
nd->setStringValue("command", "search");
printScratch(scratch);