mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Ref T773, [FG] avoid "NaN" elevations
This commit is contained in:
committed by
Mat Sutcliffe
parent
a5f4705bb1
commit
59f8a7f88b
@@ -746,7 +746,7 @@ namespace BlackSimPlugin
|
||||
if (!fgAircraft.hasCallsign()) { continue; }
|
||||
|
||||
const double cgValue = verticalOffsetsMeters[i]; // FG 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 CLength cg = std::isnan(cgValue) ?
|
||||
CLength::null() :
|
||||
|
||||
Reference in New Issue
Block a user