mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-05 01:05:34 +08:00
Introduced hint for callsign to specify callsign type (aircraft? ATC?) by context.
Background: Pilots can login in with virtually any callsign like XXX_OBS, resulting in wrong interpretations (as OBS here is no ATC station).
This commit is contained in:
committed by
Mathew Sutcliffe
parent
acec379151
commit
7b1beaf02d
@@ -21,6 +21,18 @@ namespace BlackMisc
|
||||
namespace Aviation
|
||||
{
|
||||
|
||||
CAircraftSituation::CAircraftSituation(const CCoordinateGeodetic &position, const CAltitude &altitude, const CHeading &heading, const CAngle &pitch, const CAngle &bank, const CSpeed &gs)
|
||||
: m_position(position), m_altitude(altitude), m_heading(heading), m_pitch(pitch),
|
||||
m_bank(bank), m_groundspeed(gs) {}
|
||||
|
||||
CAircraftSituation::CAircraftSituation(const CCallsign &correspondingCallsign, const CCoordinateGeodetic &position, const CAltitude &altitude, const CHeading &heading, const CAngle &pitch, const CAngle &bank, const CSpeed &gs)
|
||||
: m_correspondingCallsign(correspondingCallsign),
|
||||
m_position(position), m_altitude(altitude), m_heading(heading), m_pitch(pitch),
|
||||
m_bank(bank), m_groundspeed(gs)
|
||||
{
|
||||
m_correspondingCallsign.setTypeHint(CCallsign::Aircraft);
|
||||
}
|
||||
|
||||
QString CAircraftSituation::convertToQString(bool i18n) const
|
||||
{
|
||||
QString s(this->m_position.toQString(i18n));
|
||||
@@ -140,5 +152,11 @@ namespace BlackMisc
|
||||
return notAvialable;
|
||||
}
|
||||
|
||||
void CAircraftSituation::setCallsign(const CCallsign &callsign)
|
||||
{
|
||||
this->m_correspondingCallsign = callsign;
|
||||
this->m_correspondingCallsign.setTypeHint(CCallsign::Aircraft);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
} // namespace
|
||||
|
||||
Reference in New Issue
Block a user