[XSwiftBus] Give PQ variables a unit

ref T313
This commit is contained in:
Roland Rossgotterer
2018-11-21 16:52:20 +01:00
committed by Klaus Basan
parent 1edef31c0a
commit ec8245ea53
15 changed files with 310 additions and 310 deletions

View File

@@ -207,26 +207,26 @@ namespace BlackSimPlugin
if (this->isConnected())
{
m_serviceProxy->getOwnAircraftSituationData(&m_xplaneData);
m_serviceProxy->getCom1ActiveAsync(&m_xplaneData.com1Active);
m_serviceProxy->getCom1StandbyAsync(&m_xplaneData.com1Standby);
m_serviceProxy->getCom2ActiveAsync(&m_xplaneData.com2Active);
m_serviceProxy->getCom2StandbyAsync(&m_xplaneData.com2Standby);
m_serviceProxy->getCom1ActiveKhzAsync(&m_xplaneData.com1ActiveKhz);
m_serviceProxy->getCom1StandbyKhzAsync(&m_xplaneData.com1StandbyKhz);
m_serviceProxy->getCom2ActiveKhzAsync(&m_xplaneData.com2ActiveKhz);
m_serviceProxy->getCom2StandbyKhzAsync(&m_xplaneData.com2StandbyKhz);
m_serviceProxy->getTransponderCodeAsync(&m_xplaneData.xpdrCode);
m_serviceProxy->getTransponderModeAsync(&m_xplaneData.xpdrMode);
m_serviceProxy->getTransponderIdentAsync(&m_xplaneData.xpdrIdent);
m_serviceProxy->getAllWheelsOnGroundAsync(&m_xplaneData.onGroundAll);
CAircraftSituation situation;
situation.setPosition({ m_xplaneData.latitude, m_xplaneData.longitude, 0 });
CAltitude altitude { m_xplaneData.altitude, CAltitude::MeanSeaLevel, CLengthUnit::m() };
situation.setAltitude({ m_xplaneData.altitude, CAltitude::MeanSeaLevel, CLengthUnit::m() });
CPressure seaLevelPressure({ m_xplaneData.seaLeveLPressure, CPressureUnit::inHg() });
situation.setPosition({ m_xplaneData.latitudeDeg, m_xplaneData.longitudeDeg, 0 });
CAltitude altitude { m_xplaneData.altitudeM, CAltitude::MeanSeaLevel, CLengthUnit::m() };
situation.setAltitude({ m_xplaneData.altitudeM, CAltitude::MeanSeaLevel, CLengthUnit::m() });
CPressure seaLevelPressure({ m_xplaneData.seaLevelPressureInHg, CPressureUnit::inHg() });
CAltitude pressureAltitude(altitude.toPressureAltitude(seaLevelPressure));
situation.setPressureAltitude(pressureAltitude);
situation.setHeading({ m_xplaneData.trueHeading, CHeading::True, CAngleUnit::deg() });
situation.setPitch({ m_xplaneData.pitch, CAngleUnit::deg() });
situation.setBank({ m_xplaneData.roll, CAngleUnit::deg() });
situation.setGroundSpeed({ m_xplaneData.groundspeed, CSpeedUnit::m_s() });
situation.setHeading({ m_xplaneData.trueHeadingDeg, CHeading::True, CAngleUnit::deg() });
situation.setPitch({ m_xplaneData.pitchDeg, CAngleUnit::deg() });
situation.setBank({ m_xplaneData.rollDeg, CAngleUnit::deg() });
situation.setGroundSpeed({ m_xplaneData.groundspeedMs, CSpeedUnit::m_s() });
// updates
updateOwnIcaoCodes(m_xplaneData.aircraftIcaoCode, CAirlineIcaoCode());
@@ -239,12 +239,12 @@ namespace BlackSimPlugin
CTransponder transponder(myAircraft.getTransponder());
// updates
com1.setFrequencyActive(CFrequency(m_xplaneData.com1Active, CFrequencyUnit::kHz()));
com1.setFrequencyStandby(CFrequency(m_xplaneData.com1Standby, CFrequencyUnit::kHz()));
com1.setFrequencyActive(CFrequency(m_xplaneData.com1ActiveKhz, CFrequencyUnit::kHz()));
com1.setFrequencyStandby(CFrequency(m_xplaneData.com1StandbyKhz, CFrequencyUnit::kHz()));
const bool changedCom1 = myAircraft.getCom1System() != com1;
com2.setFrequencyActive(CFrequency(m_xplaneData.com2Active, CFrequencyUnit::kHz()));
com2.setFrequencyStandby(CFrequency(m_xplaneData.com2Standby, CFrequencyUnit::kHz()));
com2.setFrequencyActive(CFrequency(m_xplaneData.com2ActiveKhz, CFrequencyUnit::kHz()));
com2.setFrequencyStandby(CFrequency(m_xplaneData.com2StandbyKhz, CFrequencyUnit::kHz()));
const bool changedCom2 = myAircraft.getCom2System() != com2;
transponder = CTransponder::getStandardTransponder(m_xplaneData.xpdrCode, xpdrMode(m_xplaneData.xpdrMode, m_xplaneData.xpdrIdent));
@@ -493,21 +493,21 @@ namespace BlackSimPlugin
{
Q_ASSERT(this->isConnected());
if (originator == this->identifier()) { return false; }
auto com1 = CComSystem::getCom1System({ m_xplaneData.com1Active, CFrequencyUnit::kHz() }, { m_xplaneData.com1Standby, CFrequencyUnit::kHz() });
auto com2 = CComSystem::getCom2System({ m_xplaneData.com2Active, CFrequencyUnit::kHz() }, { m_xplaneData.com2Standby, CFrequencyUnit::kHz() });
auto com1 = CComSystem::getCom1System({ m_xplaneData.com1ActiveKhz, CFrequencyUnit::kHz() }, { m_xplaneData.com1StandbyKhz, CFrequencyUnit::kHz() });
auto com2 = CComSystem::getCom2System({ m_xplaneData.com2ActiveKhz, CFrequencyUnit::kHz() }, { m_xplaneData.com2StandbyKhz, CFrequencyUnit::kHz() });
auto xpdr = CTransponder::getStandardTransponder(m_xplaneData.xpdrCode, xpdrMode(m_xplaneData.xpdrMode, m_xplaneData.xpdrIdent));
if (aircraft.hasChangedCockpitData(com1, com2, xpdr))
{
m_xplaneData.com1Active = aircraft.getCom1System().getFrequencyActive().valueInteger(CFrequencyUnit::kHz());
m_xplaneData.com1Standby = aircraft.getCom1System().getFrequencyStandby().valueInteger(CFrequencyUnit::kHz());
m_xplaneData.com2Active = aircraft.getCom2System().getFrequencyActive().valueInteger(CFrequencyUnit::kHz());
m_xplaneData.com2Standby = aircraft.getCom2System().getFrequencyStandby().valueInteger(CFrequencyUnit::kHz());
m_xplaneData.com1ActiveKhz = aircraft.getCom1System().getFrequencyActive().valueInteger(CFrequencyUnit::kHz());
m_xplaneData.com1StandbyKhz = aircraft.getCom1System().getFrequencyStandby().valueInteger(CFrequencyUnit::kHz());
m_xplaneData.com2ActiveKhz = aircraft.getCom2System().getFrequencyActive().valueInteger(CFrequencyUnit::kHz());
m_xplaneData.com2StandbyKhz = aircraft.getCom2System().getFrequencyStandby().valueInteger(CFrequencyUnit::kHz());
m_xplaneData.xpdrCode = aircraft.getTransponderCode();
m_xplaneData.xpdrMode = xpdrMode(aircraft.getTransponderMode());
m_serviceProxy->setCom1Active(m_xplaneData.com1Active);
m_serviceProxy->setCom1Standby(m_xplaneData.com1Standby);
m_serviceProxy->setCom2Active(m_xplaneData.com2Active);
m_serviceProxy->setCom2Standby(m_xplaneData.com2Standby);
m_serviceProxy->setCom1ActiveKhz(m_xplaneData.com1ActiveKhz);
m_serviceProxy->setCom1StandbyKhz(m_xplaneData.com1StandbyKhz);
m_serviceProxy->setCom2ActiveKhz(m_xplaneData.com2ActiveKhz);
m_serviceProxy->setCom2StandbyKhz(m_xplaneData.com2StandbyKhz);
m_serviceProxy->setTransponderCode(m_xplaneData.xpdrCode);
m_serviceProxy->setTransponderMode(m_xplaneData.xpdrMode);
@@ -821,12 +821,12 @@ namespace BlackSimPlugin
{
this->rememberLastSent(interpolatedSituation);
planesPositions.callsigns.push_back(interpolatedSituation.getCallsign().asString());
planesPositions.latitudes.push_back(interpolatedSituation.latitude().value(CAngleUnit::deg()));
planesPositions.longitudes.push_back(interpolatedSituation.longitude().value(CAngleUnit::deg()));
planesPositions.altitudes.push_back(interpolatedSituation.getAltitude().value(CLengthUnit::ft()));
planesPositions.pitches.push_back(interpolatedSituation.getPitch().value(CAngleUnit::deg()));
planesPositions.rolls.push_back(interpolatedSituation.getBank().value(CAngleUnit::deg()));
planesPositions.headings.push_back(interpolatedSituation.getHeading().value(CAngleUnit::deg()));
planesPositions.latitudesDeg.push_back(interpolatedSituation.latitude().value(CAngleUnit::deg()));
planesPositions.longitudesDeg.push_back(interpolatedSituation.longitude().value(CAngleUnit::deg()));
planesPositions.altitudesFt.push_back(interpolatedSituation.getAltitude().value(CLengthUnit::ft()));
planesPositions.pitchesDeg.push_back(interpolatedSituation.getPitch().value(CAngleUnit::deg()));
planesPositions.rollsDeg.push_back(interpolatedSituation.getBank().value(CAngleUnit::deg()));
planesPositions.headingsDeg.push_back(interpolatedSituation.getHeading().value(CAngleUnit::deg()));
planesPositions.onGrounds.push_back(interpolatedSituation.getOnGround() == CAircraftSituation::OnGround);
}
}

View File

@@ -71,23 +71,22 @@ namespace BlackSimPlugin
class CXSwiftBusWeatherProxy;
//! X-Plane data
//! \todo Add units to members? pitchDeg?, altitudeFt?
struct XPlaneData
{
QString aircraftModelPath; //!< Aircraft model path
QString aircraftIcaoCode; //!< Aircraft ICAO code
double latitude; //!< Longitude [deg]
double longitude; //!< Latitude [deg]
double altitude; //!< Altitude [m]
double groundspeed; //!< Ground speed [m/s]
double pitch; //!< Pitch [deg]
double roll; //!< Roll [deg]
double trueHeading; //!< True heading [deg]
double latitudeDeg; //!< Longitude [deg]
double longitudeDeg; //!< Latitude [deg]
double altitudeM; //!< Altitude [m]
double groundspeedMs; //!< Ground speed [m/s]
double pitchDeg; //!< Pitch [deg]
double rollDeg; //!< Roll [deg]
double trueHeadingDeg; //!< True heading [deg]
bool onGroundAll; //!< All wheels on ground?
int com1Active; //!< COM1 active [kHz]
int com1Standby; //!< COM1 standby [kHz]
int com2Active; //!< COM2 active [kHz]
int com2Standby; //!< COM2 standby [kHz]
int com1ActiveKhz; //!< COM1 active [kHz]
int com1StandbyKhz; //!< COM1 standby [kHz]
int com2ActiveKhz; //!< COM2 active [kHz]
int com2StandbyKhz; //!< COM2 standby [kHz]
int xpdrCode; //!< Transpondder code
int xpdrMode; //!< Transponder mode (off=0,stdby=1,on=2,test=3)
bool xpdrIdent; //!< Is transponder in ident?
@@ -100,7 +99,7 @@ namespace BlackSimPlugin
double gearReployRatio; //!< Gear deployment ratio [%]
QList<double> enginesN1Percentage; //!< N1 per engine [%]
double speedBrakeRatio; //!< Speed break ratio [%]
double seaLeveLPressure; //!< Sea level pressure [inhg]
double seaLevelPressureInHg; //!< Sea level pressure [inhg]
};
//! X-Plane ISimulator implementation

View File

@@ -48,14 +48,14 @@ namespace BlackSimPlugin
QDBusPendingReply<double, double, double, double, double, double, double, double> reply = *watcher;
if (!reply.isError())
{
o_xplaneData->latitude = reply.argumentAt<0>();
o_xplaneData->longitude = reply.argumentAt<1>();
o_xplaneData->altitude = reply.argumentAt<2>();
o_xplaneData->groundspeed = reply.argumentAt<3>();
o_xplaneData->pitch = reply.argumentAt<4>();
o_xplaneData->roll = reply.argumentAt<5>();
o_xplaneData->trueHeading = reply.argumentAt<6>();
o_xplaneData->seaLeveLPressure = reply.argumentAt<7>();
o_xplaneData->latitudeDeg = reply.argumentAt<0>();
o_xplaneData->longitudeDeg = reply.argumentAt<1>();
o_xplaneData->altitudeM = reply.argumentAt<2>();
o_xplaneData->groundspeedMs = reply.argumentAt<3>();
o_xplaneData->pitchDeg = reply.argumentAt<4>();
o_xplaneData->rollDeg = reply.argumentAt<5>();
o_xplaneData->trueHeadingDeg = reply.argumentAt<6>();
o_xplaneData->seaLevelPressureInHg = reply.argumentAt<7>();
}
watcher->deleteLater();
};
@@ -189,94 +189,94 @@ namespace BlackSimPlugin
m_dbusInterface->callDBusAsync(QLatin1String("isUsingRealTime"), setterCallback(o_isRealTime));
}
double CXSwiftBusServiceProxy::getLatitude() const
double CXSwiftBusServiceProxy::getLatitudeDeg() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getLatitude"));
return m_dbusInterface->callDBusRet<double>(QLatin1String("getLatitudeDeg"));
}
void CXSwiftBusServiceProxy::getLatitudeAsync(double *o_latitude)
void CXSwiftBusServiceProxy::getLatitudeDegAsync(double *o_latitude)
{
m_dbusInterface->callDBusAsync(QLatin1String("getLatitude"), setterCallback(o_latitude));
m_dbusInterface->callDBusAsync(QLatin1String("getLatitudeDeg"), setterCallback(o_latitude));
}
double CXSwiftBusServiceProxy::getLongitude() const
double CXSwiftBusServiceProxy::getLongitudeDeg() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getLongitude"));
return m_dbusInterface->callDBusRet<double>(QLatin1String("getLongitudeDeg"));
}
void CXSwiftBusServiceProxy::getLongitudeAsync(double *o_longitude)
void CXSwiftBusServiceProxy::getLongitudeDegAsync(double *o_longitude)
{
m_dbusInterface->callDBusAsync(QLatin1String("getLongitude"), setterCallback(o_longitude));
m_dbusInterface->callDBusAsync(QLatin1String("getLongitudeDeg"), setterCallback(o_longitude));
}
double CXSwiftBusServiceProxy::getAltitudeMSL() const
double CXSwiftBusServiceProxy::getAltitudeMslM() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getAltitudeMSL"));
return m_dbusInterface->callDBusRet<double>(QLatin1String("getAltitudeMslM"));
}
void CXSwiftBusServiceProxy::getAltitudeMSLAsync(double *o_altitude)
void CXSwiftBusServiceProxy::getAltitudeMslMAsync(double *o_altitude)
{
m_dbusInterface->callDBusAsync(QLatin1String("getAltitudeMSL"), setterCallback(o_altitude));
m_dbusInterface->callDBusAsync(QLatin1String("getAltitudeMslM"), setterCallback(o_altitude));
}
double CXSwiftBusServiceProxy::getHeightAGL() const
double CXSwiftBusServiceProxy::getHeightAglM() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getHeightAGL"));
return m_dbusInterface->callDBusRet<double>(QLatin1String("getHeightAglM"));
}
void CXSwiftBusServiceProxy::getHeightAGLAsync(double *o_height)
void CXSwiftBusServiceProxy::getHeightAglMAsync(double *o_height)
{
m_dbusInterface->callDBusAsync(QLatin1String("getHeightAGL"), setterCallback(o_height));
m_dbusInterface->callDBusAsync(QLatin1String("getHeightAglM"), setterCallback(o_height));
}
double CXSwiftBusServiceProxy::getGroundSpeed() const
double CXSwiftBusServiceProxy::getGroundSpeedMps() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getGroundSpeed"));
return m_dbusInterface->callDBusRet<double>(QLatin1String("getGroundSpeedMps"));
}
void CXSwiftBusServiceProxy::getGroundSpeedAsync(double *o_groundspeed)
void CXSwiftBusServiceProxy::getGroundSpeedMpsAsync(double *o_groundspeed)
{
m_dbusInterface->callDBusAsync(QLatin1String("getGroundSpeed"), setterCallback(o_groundspeed));
m_dbusInterface->callDBusAsync(QLatin1String("getGroundSpeedMps"), setterCallback(o_groundspeed));
}
double CXSwiftBusServiceProxy::getIndicatedAirspeed() const
double CXSwiftBusServiceProxy::getIndicatedAirspeedKias() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getIndicatedAirspeed"));
return m_dbusInterface->callDBusRet<double>(QLatin1String("getIndicatedAirspeedKias"));
}
void CXSwiftBusServiceProxy::getIndicatedAirspeedAsync(double *o_ias)
void CXSwiftBusServiceProxy::getIndicatedAirspeedKiasAsync(double *o_ias)
{
m_dbusInterface->callDBusAsync(QLatin1String("getIndicatedAirspeed"), setterCallback(o_ias));
m_dbusInterface->callDBusAsync(QLatin1String("getIndicatedAirspeedKias"), setterCallback(o_ias));
}
double CXSwiftBusServiceProxy::getTrueAirspeed() const
double CXSwiftBusServiceProxy::getTrueAirspeedKias() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getTrueAirspeed"));
return m_dbusInterface->callDBusRet<double>(QLatin1String("getTrueAirspeedKias"));
}
void CXSwiftBusServiceProxy::getTrueAirspeedAsync(double *o_tas)
void CXSwiftBusServiceProxy::getTrueAirspeedKiasAsync(double *o_tas)
{
m_dbusInterface->callDBusAsync(QLatin1String("getTrueAirspeed"), setterCallback(o_tas));
m_dbusInterface->callDBusAsync(QLatin1String("getTrueAirspeedKias"), setterCallback(o_tas));
}
double CXSwiftBusServiceProxy::getPitch() const
double CXSwiftBusServiceProxy::getPitchDeg() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getPitch"));
return m_dbusInterface->callDBusRet<double>(QLatin1String("getPitchDeg"));
}
void CXSwiftBusServiceProxy::getPitchAsync(double *o_pitch)
void CXSwiftBusServiceProxy::getPitchDegAsync(double *o_pitch)
{
m_dbusInterface->callDBusAsync(QLatin1String("getPitch"), setterCallback(o_pitch));
m_dbusInterface->callDBusAsync(QLatin1String("getPitchDeg"), setterCallback(o_pitch));
}
double CXSwiftBusServiceProxy::getRoll() const
double CXSwiftBusServiceProxy::getRollDeg() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getRoll"));
return m_dbusInterface->callDBusRet<double>(QLatin1String("getRollDeg"));
}
void CXSwiftBusServiceProxy::getRollAsync(double *o_roll)
void CXSwiftBusServiceProxy::getRollDegAsync(double *o_roll)
{
m_dbusInterface->callDBusAsync(QLatin1String("getRoll"), setterCallback(o_roll));
m_dbusInterface->callDBusAsync(QLatin1String("getRollDeg"), setterCallback(o_roll));
}
double CXSwiftBusServiceProxy::getTrueHeading() const
double CXSwiftBusServiceProxy::getTrueHeadingDeg() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getTrueHeading"));
return m_dbusInterface->callDBusRet<double>(QLatin1String("getTrueHeadingDeg"));
}
void CXSwiftBusServiceProxy::getTrueHeadingAsync(double *o_heading)
void CXSwiftBusServiceProxy::getTrueHeadingDegAsync(double *o_heading)
{
m_dbusInterface->callDBusAsync(QLatin1String("getTrueHeading"), setterCallback(o_heading));
m_dbusInterface->callDBusAsync(QLatin1String("getTrueHeadingDeg"), setterCallback(o_heading));
}
bool CXSwiftBusServiceProxy::getAnyWheelOnGround() const
@@ -297,40 +297,40 @@ namespace BlackSimPlugin
m_dbusInterface->callDBusAsync(QLatin1String("getAllWheelsOnGround"), setterCallback(o_allWheels));
}
int CXSwiftBusServiceProxy::getCom1Active() const
int CXSwiftBusServiceProxy::getCom1ActiveKhz() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom1Active"));
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom1ActiveKhz"));
}
void CXSwiftBusServiceProxy::getCom1ActiveAsync(int *o_com1Active)
void CXSwiftBusServiceProxy::getCom1ActiveKhzAsync(int *o_com1Active)
{
m_dbusInterface->callDBusAsync(QLatin1String("getCom1Active"), setterCallback(o_com1Active));
m_dbusInterface->callDBusAsync(QLatin1String("getCom1ActiveKhz"), setterCallback(o_com1Active));
}
int CXSwiftBusServiceProxy::getCom1Standby() const
int CXSwiftBusServiceProxy::getCom1StandbyKhz() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom1Standby"));
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom1StandbyKhz"));
}
void CXSwiftBusServiceProxy::getCom1StandbyAsync(int *o_com1Standby)
void CXSwiftBusServiceProxy::getCom1StandbyKhzAsync(int *o_com1Standby)
{
m_dbusInterface->callDBusAsync(QLatin1String("getCom1Standby"), setterCallback(o_com1Standby));
m_dbusInterface->callDBusAsync(QLatin1String("getCom1StandbyKhz"), setterCallback(o_com1Standby));
}
int CXSwiftBusServiceProxy::getCom2Active() const
int CXSwiftBusServiceProxy::getCom2ActiveKhz() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom2Active"));
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom2ActiveKhz"));
}
void CXSwiftBusServiceProxy::getCom2ActiveAsync(int *o_com2Active)
void CXSwiftBusServiceProxy::getCom2ActiveKhzAsync(int *o_com2Active)
{
m_dbusInterface->callDBusAsync(QLatin1String("getCom2Active"), setterCallback(o_com2Active));
m_dbusInterface->callDBusAsync(QLatin1String("getCom2ActiveKhz"), setterCallback(o_com2Active));
}
int CXSwiftBusServiceProxy::getCom2Standby() const
int CXSwiftBusServiceProxy::getCom2StandbyKhz() const
{
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom2Standby"));
return m_dbusInterface->callDBusRet<int>(QLatin1String("getCom2StandbyKhz"));
}
void CXSwiftBusServiceProxy::getCom2StandbyAsync(int *o_com2Standby)
void CXSwiftBusServiceProxy::getCom2StandbyKhzAsync(int *o_com2Standby)
{
m_dbusInterface->callDBusAsync(QLatin1String("getCom2Standby"), setterCallback(o_com2Standby));
m_dbusInterface->callDBusAsync(QLatin1String("getCom2StandbyKhz"), setterCallback(o_com2Standby));
}
int CXSwiftBusServiceProxy::getTransponderCode() const
@@ -412,35 +412,35 @@ namespace BlackSimPlugin
}
double CXSwiftBusServiceProxy::getQNH() const
double CXSwiftBusServiceProxy::getQNHInHg() const
{
return m_dbusInterface->callDBusRet<double>(QLatin1String("getQNH"));
return m_dbusInterface->callDBusRet<double>(QLatin1String("getQNHInHg"));
}
void CXSwiftBusServiceProxy::getQNHAsync(double *o_qnh)
void CXSwiftBusServiceProxy::getQNHInHgAsync(double *o_qnh)
{
m_dbusInterface->callDBusAsync(QLatin1String("getQNH"), setterCallback(o_qnh));
m_dbusInterface->callDBusAsync(QLatin1String("getQNHInHg"), setterCallback(o_qnh));
}
void CXSwiftBusServiceProxy::setCom1Active(int freq)
void CXSwiftBusServiceProxy::setCom1ActiveKhz(int freq)
{
m_dbusInterface->callDBus(QLatin1String("setCom1Active"), freq);
m_dbusInterface->callDBus(QLatin1String("setCom1ActiveKhz"), freq);
}
void CXSwiftBusServiceProxy::setCom1Standby(int freq)
void CXSwiftBusServiceProxy::setCom1StandbyKhz(int freq)
{
m_dbusInterface->callDBus(QLatin1String("setCom1Standby"), freq);
m_dbusInterface->callDBus(QLatin1String("setCom1StandbyKhz"), freq);
}
void CXSwiftBusServiceProxy::setCom2Active(int freq)
void CXSwiftBusServiceProxy::setCom2ActiveKhz(int freq)
{
m_dbusInterface->callDBus(QLatin1String("setCom2Active"), freq);
m_dbusInterface->callDBus(QLatin1String("setCom2ActiveKhz"), freq);
}
void CXSwiftBusServiceProxy::setCom2Standby(int freq)
void CXSwiftBusServiceProxy::setCom2StandbyKhz(int freq)
{
m_dbusInterface->callDBus(QLatin1String("setCom2Standby"), freq);
m_dbusInterface->callDBus(QLatin1String("setCom2StandbyKhz"), freq);
}
void CXSwiftBusServiceProxy::setTransponderCode(int code)

View File

@@ -183,64 +183,64 @@ namespace BlackSimPlugin
void isUsingRealTimeAsync(bool *o_isRealTime);
//! @}
//! \copydoc XSwiftBus::CService::getLatitude
//! \copydoc XSwiftBus::CService::getLatitudeDeg
//! @{
double getLatitude() const;
void getLatitudeAsync(double *o_latitude);
double getLatitudeDeg() const;
void getLatitudeDegAsync(double *o_latitude);
//! @}
//! \copydoc XSwiftBus::CService::getLongitude
//! \copydoc XSwiftBus::CService::getLongitudeDeg
//! @{
double getLongitude() const;
void getLongitudeAsync(double *o_longitude);
double getLongitudeDeg() const;
void getLongitudeDegAsync(double *o_longitude);
//! @}
//! \copydoc XSwiftBus::CService::getAltitudeMSL
//! \copydoc XSwiftBus::CService::getAltitudeMslM
//! @{
double getAltitudeMSL() const;
void getAltitudeMSLAsync(double *o_altitude);
double getAltitudeMslM() const;
void getAltitudeMslMAsync(double *o_altitude);
//! @}
//! \copydoc XSwiftBus::CService::getHeightAGL
//! \copydoc XSwiftBus::CService::getHeightAglM
//! @{
double getHeightAGL() const;
void getHeightAGLAsync(double *o_height);
double getHeightAglM() const;
void getHeightAglMAsync(double *o_height);
//! @}
//! \copydoc XSwiftBus::CService::getGroundSpeed
//! \copydoc XSwiftBus::CService::getGroundSpeedMps
//! @{
double getGroundSpeed() const;
void getGroundSpeedAsync(double *o_groundspeed);
double getGroundSpeedMps() const;
void getGroundSpeedMpsAsync(double *o_groundspeed);
//! @}
//! \copydoc XSwiftBus::CService::getIndicatedAirspeed
//! \copydoc XSwiftBus::CService::getIndicatedAirspeedKias
//! @{
double getIndicatedAirspeed() const;
void getIndicatedAirspeedAsync(double *o_ias);
double getIndicatedAirspeedKias() const;
void getIndicatedAirspeedKiasAsync(double *o_ias);
//! @}
//! \copydoc XSwiftBus::CService::getTrueAirspeed
//! \copydoc XSwiftBus::CService::getTrueAirspeedKias
//! @{
double getTrueAirspeed() const;
void getTrueAirspeedAsync(double *o_tas);
double getTrueAirspeedKias() const;
void getTrueAirspeedKiasAsync(double *o_tas);
//! @}
//! \copydoc XSwiftBus::CService::getPitch
//! \copydoc XSwiftBus::CService::getPitchDeg
//! @{
double getPitch() const;
void getPitchAsync(double *o_pitch);
double getPitchDeg() const;
void getPitchDegAsync(double *o_pitch);
//! @}
//! \copydoc XSwiftBus::CService::getRoll
//! \copydoc XSwiftBus::CService::getRollDeg
//! @{
double getRoll() const;
void getRollAsync(double *o_roll);
double getRollDeg() const;
void getRollDegAsync(double *o_roll);
//! @}
//! \copydoc XSwiftBus::CService::getTrueHeading
//! \copydoc XSwiftBus::CService::getTrueHeadingDeg
//! @{
double getTrueHeading() const;
void getTrueHeadingAsync(double *o_heading);
double getTrueHeadingDeg() const;
void getTrueHeadingDegAsync(double *o_heading);
//! @}
//! Get whether any wheel is on the ground
@@ -255,28 +255,28 @@ namespace BlackSimPlugin
void getAllWheelsOnGroundAsync(bool *o_allWheels);
//! @}
//! \copydoc XSwiftBus::CService::getCom1Active
//! \copydoc XSwiftBus::CService::getCom1ActiveKhz
//! @{
int getCom1Active() const;
void getCom1ActiveAsync(int *o_com1Active);
int getCom1ActiveKhz() const;
void getCom1ActiveKhzAsync(int *o_com1Active);
//! @}
//! \copydoc XSwiftBus::CService::getCom1Standby
//! \copydoc XSwiftBus::CService::getCom1StandbyKhz
//! @{
int getCom1Standby() const;
void getCom1StandbyAsync(int *o_com1Standby);
int getCom1StandbyKhz() const;
void getCom1StandbyKhzAsync(int *o_com1Standby);
//! @}
//! \copydoc XSwiftBus::CService::getCom2Active
//! \copydoc XSwiftBus::CService::getCom2ActiveKhz
//! @{
int getCom2Active() const;
void getCom2ActiveAsync(int *o_com2Active);
int getCom2ActiveKhz() const;
void getCom2ActiveKhzAsync(int *o_com2Active);
//! @}
//! \copydoc XSwiftBus::CService::getCom2Standby
//! \copydoc XSwiftBus::CService::getCom2StandbyKhz
//! @{
int getCom2Standby() const;
void getCom2StandbyAsync(int *o_com2Standby);
int getCom2StandbyKhz() const;
void getCom2StandbyKhzAsync(int *o_com2Standby);
//! @}
//! \copydoc XSwiftBus::CService::getTransponderCode
@@ -327,23 +327,23 @@ namespace BlackSimPlugin
void getTaxiLightsOnAsync(bool *o_taxiLightsOn);
//! @}
//! \copydoc XSwiftBus::CService::getQNH
//! \copydoc XSwiftBus::CService::getQNHInHg
//! @{
double getQNH() const;
void getQNHAsync(double *o_qnh);
double getQNHInHg() const;
void getQNHInHgAsync(double *o_qnh);
//! @}
//! \copydoc XSwiftBus::CService::setCom1Active
void setCom1Active(int freq);
//! \copydoc XSwiftBus::CService::setCom1ActiveKhz
void setCom1ActiveKhz(int freq);
//! \copydoc XSwiftBus::CService::setCom1Standby
void setCom1Standby(int freq);
//! \copydoc XSwiftBus::CService::setCom1StandbyKhz
void setCom1StandbyKhz(int freq);
//! \copydoc XSwiftBus::CService::setCom2Active
void setCom2Active(int freq);
//! \copydoc XSwiftBus::CService::setCom2ActiveKhz
void setCom2ActiveKhz(int freq);
//! \copydoc XSwiftBus::CService::setCom2Standby
void setCom2Standby(int freq);
//! \copydoc XSwiftBus::CService::setCom2StandbyKhz
void setCom2StandbyKhz(int freq);
//! \copydoc XSwiftBus::CService::setTransponderCode
void setTransponderCode(int code);

View File

@@ -99,9 +99,9 @@ namespace BlackSimPlugin
void CXSwiftBusTrafficProxy::setPlanesPositions(const PlanesPositions &planesPositions)
{
m_dbusInterface->callDBus(QLatin1String("setPlanesPositions"),
planesPositions.callsigns, planesPositions.latitudes, planesPositions.longitudes,
planesPositions.altitudes, planesPositions.pitches, planesPositions.rolls,
planesPositions.headings, planesPositions.onGrounds);
planesPositions.callsigns, planesPositions.latitudesDeg, planesPositions.longitudesDeg,
planesPositions.altitudesFt, planesPositions.pitchesDeg, planesPositions.rollsDeg,
planesPositions.headingsDeg, planesPositions.onGrounds);
}
void CXSwiftBusTrafficProxy::setPlanesSurfaces(const PlanesSurfaces &planesSurfaces)

View File

@@ -44,22 +44,22 @@ namespace BlackSimPlugin
bool hasSameSizes() const
{
const int s = callsigns.size();
if (s != latitudes.size()) { return false; }
if (s != longitudes.size()) { return false; }
if (s != altitudes.size()) { return false; }
if (s != pitches.size()) { return false; }
if (s != rolls.size()) { return false; }
if (s != headings.size()) { return false; }
if (s != latitudesDeg.size()) { return false; }
if (s != longitudesDeg.size()) { return false; }
if (s != altitudesFt.size()) { return false; }
if (s != pitchesDeg.size()) { return false; }
if (s != rollsDeg.size()) { return false; }
if (s != headingsDeg.size()) { return false; }
return true;
}
QStringList callsigns; //!< List of callsigns
QList<double> latitudes; //!< List of latitudes
QList<double> longitudes; //!< List of longitudes
QList<double> altitudes; //!< List of altitudes
QList<double> pitches; //!< List of pitches
QList<double> rolls; //!< List of rolls
QList<double> headings; //!< List of headings
QList<double> latitudesDeg; //!< List of latitudes
QList<double> longitudesDeg; //!< List of longitudes
QList<double> altitudesFt; //!< List of altitudes
QList<double> pitchesDeg; //!< List of pitches
QList<double> rollsDeg; //!< List of rolls
QList<double> headingsDeg; //!< List of headings
QList<bool> onGrounds; //!< List of onGrounds
};

View File

@@ -75,14 +75,14 @@ namespace BlackSimPlugin
m_dbusInterface->callDBus(QLatin1String("setRunwayFriction"), friction);
}
void CXSwiftBusWeatherProxy::setCloudLayer(int layer, int base, int tops, int type, int coverage)
void CXSwiftBusWeatherProxy::setCloudLayer(int layer, int baseM, int topsM, int type, int coverage)
{
m_dbusInterface->callDBus(QLatin1String("setCloudLayer"), layer, base, tops, type, coverage);
m_dbusInterface->callDBus(QLatin1String("setCloudLayer"), layer, baseM, topsM, type, coverage);
}
void CXSwiftBusWeatherProxy::setWindLayer(int layer, int altitude, double direction, int speed, int shearDirection, int shearSpeed, int turbulence)
void CXSwiftBusWeatherProxy::setWindLayer(int layer, int altitudeM, double directionDeg, int speedKt, int shearDirectionDeg, int shearSpeedKt, int turbulence)
{
m_dbusInterface->callDBus(QLatin1String("setWindLayer"), layer, altitude, direction, speed, shearDirection, shearSpeed, turbulence);
m_dbusInterface->callDBus(QLatin1String("setWindLayer"), layer, altitudeM, directionDeg, speedKt, shearDirectionDeg, shearSpeedKt, turbulence);
}
}

View File

@@ -92,10 +92,10 @@ namespace BlackSimPlugin
void setRunwayFriction(int friction);
//! \copydoc XSwiftBus::CWeather::setCloudLayer
void setCloudLayer(int layer, int base, int tops, int type, int coverage);
void setCloudLayer(int layer, int baseM, int topsM, int type, int coverage);
//! \copydoc XSwiftBus::CWeather::setWindLayer
void setWindLayer(int layer, int altitude, double direction, int speed, int shearDirection, int shearSpeed, int turbulence);
void setWindLayer(int layer, int altitudeM, double directionDeg, int speedKt, int shearDirectionDeg, int shearSpeedKt, int turbulence);
};
}