mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-18 03:15:34 +08:00
Ref T251, also set GND info for own aircraft
This commit is contained in:
@@ -84,6 +84,7 @@ namespace BlackMisc
|
||||
static const QString inter("interpolation");
|
||||
static const QString guess("guessing");
|
||||
static const QString unknown("unknown");
|
||||
static const QString ownAircraft("own aircraft");
|
||||
|
||||
switch (reliability)
|
||||
{
|
||||
@@ -91,6 +92,7 @@ namespace BlackMisc
|
||||
case CAircraftSituation::OnGroundByElevationAndCG: return elvCg;
|
||||
case CAircraftSituation::OnGroundByGuessing: return guess;
|
||||
case CAircraftSituation::OnGroundByInterpolation: return inter;
|
||||
case CAircraftSituation::OnGroundOwnAircraft: return ownAircraft;
|
||||
case CAircraftSituation::OnGroundReliabilityNoSet:
|
||||
default:
|
||||
return unknown;
|
||||
|
||||
@@ -75,11 +75,12 @@ namespace BlackMisc
|
||||
//! Reliability of on ground information
|
||||
enum OnGroundReliability
|
||||
{
|
||||
OnGroundByInterpolation, //!< strongest
|
||||
OnGroundByInterpolation, //!< strongest for remote aircraft
|
||||
OnGroundByElevationAndCG,
|
||||
OnGroundByElevation,
|
||||
OnGroundByGuessing, //!< weakest
|
||||
OnGroundReliabilityNoSet
|
||||
OnGroundReliabilityNoSet,
|
||||
OnGroundOwnAircraft, //!< sending on ground
|
||||
};
|
||||
|
||||
//! Default constructor.
|
||||
|
||||
@@ -385,6 +385,9 @@ namespace BlackSimPlugin
|
||||
aircraftSituation.setGroundElevation(CAltitude(simulatorOwnAircraft.elevation, CAltitude::MeanSeaLevel, CLengthUnit::ft()));
|
||||
aircraftSituation.setAltitude(CAltitude(simulatorOwnAircraft.altitude, CAltitude::MeanSeaLevel, CLengthUnit::ft()));
|
||||
aircraftSituation.setPressureAltitude(CAltitude(simulatorOwnAircraft.pressureAltitude, CAltitude::MeanSeaLevel, CAltitude::PressureAltitude, CLengthUnit::m()));
|
||||
// set on ground also in situation for consistency and future usage
|
||||
// it is duplicated in parts
|
||||
aircraftSituation.setOnGround(simulatorOwnAircraft.simOnGround ? CAircraftSituation::OnGround : CAircraftSituation::NotOnGround, CAircraftSituation::OnGroundOwnAircraft);
|
||||
|
||||
const CAircraftLights lights(simulatorOwnAircraft.lightStrobe,
|
||||
simulatorOwnAircraft.lightLanding,
|
||||
@@ -412,8 +415,8 @@ namespace BlackSimPlugin
|
||||
simulatorOwnAircraft.simOnGround);
|
||||
|
||||
// set values
|
||||
updateOwnSituation(aircraftSituation);
|
||||
updateOwnParts(parts);
|
||||
this->updateOwnSituation(aircraftSituation);
|
||||
this->updateOwnParts(parts);
|
||||
|
||||
// When I change cockpit values in the sim (from GUI to simulator, not originating from simulator)
|
||||
// it takes a little while before these values are set in the simulator.
|
||||
|
||||
Reference in New Issue
Block a user