mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
T37 T127 Send timestamps to XSwiftBus as separate timestamp and offset
as the offset is needed for reliable interpolation.
This commit is contained in:
@@ -529,7 +529,8 @@ namespace BlackSimPlugin
|
||||
situation.getPitch().value(CAngleUnit::deg()),
|
||||
situation.getBank().value(CAngleUnit::deg()),
|
||||
situation.getHeading().value(CAngleUnit::deg()),
|
||||
situation.getAdjustedMSecsSinceEpoch() - QDateTime::currentMSecsSinceEpoch());
|
||||
situation.getMSecsSinceEpoch() - QDateTime::currentMSecsSinceEpoch(),
|
||||
situation.getTimeOffsetMs());
|
||||
|
||||
if (! isRemoteAircraftSupportingParts(situation.getCallsign()))
|
||||
{
|
||||
@@ -569,7 +570,7 @@ namespace BlackSimPlugin
|
||||
parts.getFlapsPercent() / 100.0, parts.isSpoilersOut() ? 1 : 0, parts.isSpoilersOut() ? 1 : 0, parts.getFlapsPercent() / 100.0,
|
||||
0, parts.isAnyEngineOn() ? 0 : 0.75, 0, 0, 0,
|
||||
parts.getLights().isLandingOn(), parts.getLights().isBeaconOn(), parts.getLights().isStrobeOn(), parts.getLights().isNavOn(),
|
||||
0, parts.isOnGround(), parts.getAdjustedMSecsSinceEpoch() - QDateTime::currentMSecsSinceEpoch());
|
||||
0, parts.isOnGround(), parts.getMSecsSinceEpoch() - QDateTime::currentMSecsSinceEpoch(), parts.getTimeOffsetMs());
|
||||
m_traffic->setPlaneTransponder(callsign.asString(), 2000, true, false);
|
||||
}
|
||||
|
||||
|
||||
@@ -86,16 +86,16 @@ namespace BlackSimPlugin
|
||||
m_dbusInterface->callDBus(QLatin1String("removeAllPlanes"));
|
||||
}
|
||||
|
||||
void CXSwiftBusTrafficProxy::addPlanePosition(const QString &callsign, double latitude, double longitude, double altitude, double pitch, double roll, double heading, qint64 relativeTime)
|
||||
void CXSwiftBusTrafficProxy::addPlanePosition(const QString &callsign, double latitude, double longitude, double altitude, double pitch, double roll, double heading, qint64 relativeTime, qint64 timeOffset)
|
||||
{
|
||||
m_dbusInterface->callDBus(QLatin1String("addPlanePosition"), callsign, latitude, longitude, altitude, pitch, roll, heading, relativeTime);
|
||||
m_dbusInterface->callDBus(QLatin1String("addPlanePosition"), callsign, latitude, longitude, altitude, pitch, roll, heading, relativeTime, timeOffset);
|
||||
}
|
||||
|
||||
void CXSwiftBusTrafficProxy::addPlaneSurfaces(const QString &callsign, double gear, double flap, double spoiler, double speedBrake, double slat, double wingSweep, double thrust,
|
||||
double elevator, double rudder, double aileron, bool landLight, bool beaconLight, bool strobeLight, bool navLight, int lightPattern, bool onGround, qint64 relativeTime)
|
||||
double elevator, double rudder, double aileron, bool landLight, bool beaconLight, bool strobeLight, bool navLight, int lightPattern, bool onGround, qint64 relativeTime, qint64 timeOffset)
|
||||
{
|
||||
m_dbusInterface->callDBus(QLatin1String("addPlaneSurfaces"), callsign, gear, flap, spoiler, speedBrake, slat, wingSweep, thrust, elevator, rudder, aileron,
|
||||
landLight, beaconLight, strobeLight, navLight, lightPattern, onGround, relativeTime);
|
||||
landLight, beaconLight, strobeLight, navLight, lightPattern, onGround, relativeTime, timeOffset);
|
||||
}
|
||||
|
||||
void CXSwiftBusTrafficProxy::setPlaneTransponder(const QString &callsign, int code, bool modeC, bool ident)
|
||||
|
||||
@@ -103,11 +103,11 @@ namespace BlackSimPlugin
|
||||
void removeAllPlanes();
|
||||
|
||||
//! \copydoc XSwiftBus::CTraffic::addPlanePosition
|
||||
void addPlanePosition(const QString &callsign, double latitude, double longitude, double altitude, double pitch, double roll, double heading, qint64 relativeTime);
|
||||
void addPlanePosition(const QString &callsign, double latitude, double longitude, double altitude, double pitch, double roll, double heading, qint64 relativeTime, qint64 timeOffset);
|
||||
|
||||
//! \copydoc XSwiftBus::CTraffic::addPlaneSurfaces
|
||||
void addPlaneSurfaces(const QString &callsign, double gear, double flap, double spoiler, double speedBrake, double slat, double wingSweep, double thrust,
|
||||
double elevator, double rudder, double aileron, bool landLight, bool beaconLight, bool strobeLight, bool navLight, int lightPattern, bool onGround, qint64 relativeTime);
|
||||
double elevator, double rudder, double aileron, bool landLight, bool beaconLight, bool strobeLight, bool navLight, int lightPattern, bool onGround, qint64 relativeTime, qint64 timeOffset);
|
||||
|
||||
//! \copydoc XSwiftBus::CTraffic::setPlaneTransponder
|
||||
void setPlaneTransponder(const QString &callsign, int code, bool modeC, bool ident);
|
||||
|
||||
Reference in New Issue
Block a user