mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Reflecting discussed changes for interpolation performance refs #386
(based on FSX testing) * Only send changed situation to SIM * Split sending of parts / situations * Only send parts with a reduced frequency (means slower as positions) * Mark geodetic height as null for default values (the value is usually unavailable) * Fixed altitude to MSL for network data * Trace which aircrafts support aircraft parts via network * Renamed insert_fron push_front (as proposed by Roland) Status quo / lessons learnt * On slower PCs jitter is still noticed for interpolated aircraft. * Running interpolation in an independent process (aka core, not in GUI) reduced load dependencies => it seems to make sense to run driver in own thread * The onGround flag in parts seems clumsy as it required to retrieve parts for position updates * In interpolation performance really matters
This commit is contained in:
@@ -75,7 +75,7 @@ namespace BlackMisc
|
||||
|
||||
void CRemoteAircraftProviderDummy::insertNewSituation(const CAircraftSituation &situation)
|
||||
{
|
||||
this->m_situations.insertTimestampObject(situation, 20);
|
||||
this->m_situations.push_frontMaxElements(situation, 20);
|
||||
emit addedRemoteAircraftSituation(situation);
|
||||
}
|
||||
|
||||
|
||||
@@ -55,6 +55,17 @@ namespace BlackMisc
|
||||
return this->findBy(Predicates::MemberValid(&CSimulatedAircraft::getPilot)).transform(Predicates::MemberTransform(&CSimulatedAircraft::getPilot));
|
||||
}
|
||||
|
||||
CCallsignList CSimulatedAircraftList::getCallsignsWithSyncronizedParts() const
|
||||
{
|
||||
CCallsignList csl;
|
||||
for (const CSimulatedAircraft &aircraft : (*this))
|
||||
{
|
||||
if (!aircraft.isPartsSynchronized()) { continue; }
|
||||
csl.push_back(aircraft.getCallsign());
|
||||
}
|
||||
return csl;
|
||||
}
|
||||
|
||||
CAircraftList CSimulatedAircraftList::toAircraftList() const
|
||||
{
|
||||
CAircraftList al;
|
||||
|
||||
@@ -43,6 +43,9 @@ namespace BlackMisc
|
||||
//! All pilots (with valid data)
|
||||
BlackMisc::Network::CUserList getPilots() const;
|
||||
|
||||
//! Callsigns of aircraft with synchronized parts
|
||||
BlackMisc::Aviation::CCallsignList getCallsignsWithSyncronizedParts() const;
|
||||
|
||||
//! \copydoc CValueObject::toQVariant
|
||||
virtual QVariant toQVariant() const override { return QVariant::fromValue(*this); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user