mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
Improved way to get situation with altitude offset
This commit is contained in:
@@ -965,6 +965,14 @@ namespace BlackMisc
|
||||
return alt;
|
||||
}
|
||||
|
||||
CAircraftSituation CAircraftSituation::withAltitudeOffset(const CLength &offset) const
|
||||
{
|
||||
if (offset.isNull()) { return *this; }
|
||||
CAircraftSituation copy(*this);
|
||||
copy.addAltitudeOffset(offset);
|
||||
return copy;
|
||||
}
|
||||
|
||||
void CAircraftSituation::setPressureAltitude(const CAltitude &altitude)
|
||||
{
|
||||
Q_ASSERT(altitude.getAltitudeType() == CAltitude::PressureAltitude);
|
||||
|
||||
Reference in New Issue
Block a user