mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-20 12:35:43 +08:00
Ref T773, check for "nan" for elevations
This commit is contained in:
committed by
Mat Sutcliffe
parent
6221102b97
commit
08ef16e1a9
@@ -1061,7 +1061,7 @@ namespace BlackSimPlugin
|
|||||||
if (!xpAircraft.hasCallsign()) { continue; }
|
if (!xpAircraft.hasCallsign()) { continue; }
|
||||||
|
|
||||||
const double cgValue = verticalOffsetsMeters[i]; // XP offset is swift CG
|
const double cgValue = verticalOffsetsMeters[i]; // XP offset is swift CG
|
||||||
const CAltitude elevationAlt(elevationsMeters[i], CLengthUnit::m(), CLengthUnit::ft());
|
const CAltitude elevationAlt = std::isnan(elevationsMeters[i]) ? CAltitude::null() : CAltitude(elevationsMeters[i], CLengthUnit::m(), CLengthUnit::ft());
|
||||||
const CElevationPlane elevation(CLatitude(latitudesDeg[i], CAngleUnit::deg()), CLongitude(longitudesDeg[i], CAngleUnit::deg()), elevationAlt, CElevationPlane::singlePointRadius());
|
const CElevationPlane elevation(CLatitude(latitudesDeg[i], CAngleUnit::deg()), CLongitude(longitudesDeg[i], CAngleUnit::deg()), elevationAlt, CElevationPlane::singlePointRadius());
|
||||||
const CLength cg = std::isnan(cgValue) ?
|
const CLength cg = std::isnan(cgValue) ?
|
||||||
CLength::null() :
|
CLength::null() :
|
||||||
|
|||||||
Reference in New Issue
Block a user