mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-30 11:55:35 +08:00
Ref T778, also update sim.data if elevation did change
Use ISimulator::isEqualLastSent in equalPbhVectorAltitudeElevation
This commit is contained in:
committed by
Mat Sutcliffe
parent
46d417c5a2
commit
cc887ea0f8
@@ -656,7 +656,8 @@ namespace BlackCore
|
||||
Q_ASSERT_X(compare.hasCallsign(), Q_FUNC_INFO, "Need callsign");
|
||||
if (!m_lastSentSituations.contains(compare.getCallsign())) { return false; }
|
||||
if (compare.isNull()) { return false; }
|
||||
return compare.equalPbhVectorAltitude(m_lastSentSituations.value(compare.getCallsign()));
|
||||
return compare.equalPbhVectorAltitudeElevation(m_lastSentSituations.value(compare.getCallsign()));
|
||||
// return compare.equalPbhVectorAltitude(m_lastSentSituations.value(compare.getCallsign()));
|
||||
}
|
||||
|
||||
bool ISimulator::isEqualLastSent(const CAircraftParts &compare, const CCallsign &callsign) const
|
||||
|
||||
@@ -467,6 +467,13 @@ namespace BlackMisc
|
||||
return c == 0;
|
||||
}
|
||||
|
||||
bool CAircraftSituation::equalPbhVectorAltitudeElevation(const CAircraftSituation &other) const
|
||||
{
|
||||
if (!this->equalPbhVectorAltitude(other)) { return false; }
|
||||
const int c = this->getGroundElevation().compare(other.getGroundElevation());
|
||||
return c == 0;
|
||||
}
|
||||
|
||||
void CAircraftSituation::setNull()
|
||||
{
|
||||
m_position.setNull();
|
||||
|
||||
@@ -190,6 +190,10 @@ namespace BlackMisc
|
||||
//! \sa Geo::ICoordinateGeodetic::equalNormalVectorDouble
|
||||
bool equalPbhVectorAltitude(const CAircraftSituation &other) const;
|
||||
|
||||
//! Equal PBH and vecto, plus altitude/elevation
|
||||
//! \sa Geo::ICoordinateGeodetic::equalNormalVectorDouble
|
||||
bool equalPbhVectorAltitudeElevation(const CAircraftSituation &other) const;
|
||||
|
||||
//! Set to null
|
||||
void setNull();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user