]> git.mxchange.org Git - flightgear.git/commitdiff
httpd: expose if airport has metar in navdb uri handler
authorTorsten Dreyer <torsten@ŧ3r.de>
Mon, 9 Mar 2015 13:53:40 +0000 (14:53 +0100)
committerTorsten Dreyer <torsten@ŧ3r.de>
Mon, 9 Mar 2015 13:53:40 +0000 (14:53 +0100)
src/Network/http/NavdbUriHandler.cxx

index 13ee11388bbbbb587d8cfd4ced6fa0d925e86268..9b0265e888b511e9f07e5fcad413c778b8891e3b 100644 (file)
@@ -162,6 +162,9 @@ static void addAirportProperties(cJSON * json, FGAirport * airport )
   cJSON_AddItemToObject(json, "longestRwyLength_m", cJSON_CreateNumber(longestRunwayLength));
   cJSON_AddItemToObject(json, "longestRwyHeading_deg", cJSON_CreateNumber(longestRunwayHeading));
   cJSON_AddItemToObject(json, "longestRwySurface", cJSON_CreateString(longestRunwaySurface));
+  if( airport->getMetar() ) {
+    cJSON_AddItemToObject(json, "metar", cJSON_CreateTrue());
+  }
 }
 
 static void addNAVProperties(cJSON * json, FGNavRecord * navRecord )