Fixed setting altitude of airport

This commit is contained in:
Klaus Basan
2017-08-08 18:35:27 +02:00
committed by Mathew Sutcliffe
parent 1ec3f4566d
commit 2805979577

View File

@@ -61,8 +61,11 @@ namespace BlackMisc
{
CAirport airport(json.value(prefix + "icao").toString());
airport.setDescriptiveName(json.value(prefix + "name").toString());
airport.setElevation(CAltitude(json.value(prefix + "altitude").toInt(), CLengthUnit::ft()));
const CCoordinateGeodetic pos(json.value(prefix + "latitude").toDouble(), json.value(prefix + "longitude").toDouble(), 0);
const CCoordinateGeodetic pos(
json.value(prefix + "latitude").toDouble(),
json.value(prefix + "longitude").toDouble(),
json.value(prefix + "altitude").toDouble()
);
airport.setPosition(pos);
airport.setOperating(json.value(prefix + "operating").toString() == QStringLiteral("Y"));