mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-07 10:47:01 +08:00
refs #837 CAircraftSituation altitude is part of its position.
This commit is contained in:
@@ -46,8 +46,8 @@ namespace BlackCore
|
||||
CCoordinateGeodetic(
|
||||
CLatitude::fromWgs84("N 049° 18' 17"),
|
||||
CLongitude::fromWgs84("E 008° 27' 05"),
|
||||
CLength(0, CLengthUnit::m())),
|
||||
CAltitude(312, CAltitude::MeanSeaLevel, CLengthUnit::ft())
|
||||
CAltitude(312, CAltitude::MeanSeaLevel, CLengthUnit::ft())
|
||||
)
|
||||
);
|
||||
return situation;
|
||||
}
|
||||
|
||||
@@ -800,8 +800,7 @@ namespace BlackCore
|
||||
// if altered in underlying classes, this change needs to be reverted
|
||||
CAircraftSituation situation(
|
||||
callsign,
|
||||
CCoordinateGeodetic(position->latitude, position->longitude),
|
||||
CAltitude(position->altitudePressure, CAltitude::MeanSeaLevel, CLengthUnit::ft()),
|
||||
CCoordinateGeodetic(position->latitude, position->longitude, position->altitudePressure),
|
||||
CHeading(position->heading, CHeading::True, CAngleUnit::deg()),
|
||||
CAngle(position->pitch, CAngleUnit::deg()),
|
||||
CAngle(position->bank, CAngleUnit::deg()),
|
||||
@@ -878,8 +877,7 @@ namespace BlackCore
|
||||
{
|
||||
CAircraftSituation situation(
|
||||
CCallsign(sender),
|
||||
CCoordinateGeodetic(position->latitude, position->longitude, 0.0),
|
||||
CAltitude(position->altitudeTrue, CAltitude::MeanSeaLevel, CLengthUnit::ft()),
|
||||
CCoordinateGeodetic(position->latitude, position->longitude, position->altitudeTrue),
|
||||
CHeading(position->heading, CHeading::True, CAngleUnit::deg()),
|
||||
CAngle(position->pitch, CAngleUnit::deg()),
|
||||
CAngle(position->bank, CAngleUnit::deg()),
|
||||
|
||||
@@ -289,7 +289,7 @@ namespace BlackCore
|
||||
const double lng = clientPartsMap["longitude"].toDouble();
|
||||
const double alt = clientPartsMap["altitude"].toDouble();
|
||||
const CFrequency frequency = CFrequency(clientPartsMap["frequency"].toDouble(), CFrequencyUnit::MHz());
|
||||
CCoordinateGeodetic position(lat, lng, -1);
|
||||
CCoordinateGeodetic position(lat, lng, alt);
|
||||
CAltitude altitude(alt, CAltitude::MeanSeaLevel, CLengthUnit::ft());
|
||||
QString flightPlanRemarks = clientPartsMap["planned_remarks"];
|
||||
|
||||
@@ -308,7 +308,7 @@ namespace BlackCore
|
||||
{
|
||||
// Pilot section
|
||||
const double groundspeed = clientPartsMap["groundspeed"].toDouble();
|
||||
CAircraftSituation situation(position, altitude);
|
||||
CAircraftSituation situation(position);
|
||||
situation.setGroundSpeed(CSpeed(groundspeed, CSpeedUnit::kts()));
|
||||
CSimulatedAircraft currentAircraft(user.getCallsign().getStringAsSet(), user, situation);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user