swift
|
Comprehensive information of an aircraft. More...
Public Types | |
enum | ColumnIndex { IndexCallsign = CPropertyIndexRef::GlobalIndexCSimulatedAircraft , IndexPilot , IndexRelativeDistance , IndexCom1System , IndexCom2System , IndexTransponder , IndexSituation , IndexAircraftIcaoCode , IndexLivery , IndexParts , IndexIsVtol , IndexCombinedIcaoLiveryString , IndexCombinedIcaoLiveryStringNetworkModel , IndexModel , IndexNetworkModel , IndexNetworkModelAircraftIcaoDifference , IndexNetworkModelAirlineIcaoDifference , IndexNetworkModelLiveryDifference , IndexEnabled , IndexRendered , IndexPartsSynchronized , IndexFastPositionUpdates , IndexSupportsGndFlag } |
Properties by index. | |
![]() | |
using | base_type = CEmpty |
Base class. | |
![]() | |
using | base_type = CEmpty |
Base class is alias of itself. | |
![]() | |
enum | ColumnIndex { IndexPixmap = 10 , IndexIcon , IndexString } |
Base class enums. | |
![]() | |
enum | ColumnIndex { IndexRelativeDistance = CPropertyIndexRef::GlobalIndexICoordinateWithRelativePosition , IndexRelativeBearing } |
Properties by index. | |
![]() | |
enum | ColumnIndex { IndexLatitude = CPropertyIndexRef::GlobalIndexICoordinateGeodetic , IndexLongitude , IndexLatitudeAsString , IndexLongitudeAsString , IndexGeodeticHeight , IndexGeodeticHeightAsString , IndexNormalVector } |
Properties by index. | |
Public Member Functions | |
CSimulatedAircraft () | |
Default constructor. | |
CSimulatedAircraft (const CAircraftModel &model) | |
Constructor. | |
CSimulatedAircraft (const aviation::CCallsign &callsign, const network::CUser &user, const aviation::CAircraftSituation &situation) | |
Constructor. | |
CSimulatedAircraft (const aviation::CCallsign &callsign, const CAircraftModel &model, const network::CUser &user, const aviation::CAircraftSituation &situation) | |
Constructor. | |
const aviation::CCallsign & | getCallsign () const |
Get callsign. | |
QString | getCallsignAsString () const |
Get callsign. | |
const aviation::CAircraftSituation & | getSituation () const |
Get situation. | |
void | setSituation (const aviation::CAircraftSituation &situation) |
Set situation. Won't overwrite the velocity unless it held the default value. | |
const aviation::CAircraftVelocity & | getVelocity () const |
Get 6DOF velocity. | |
void | setVelocity (const aviation::CAircraftVelocity &velocity) |
Set 6DOF velocity. | |
const network::CUser & | getPilot () const |
Get user. | |
QString | getPilotRealName () const |
Get user's real name. | |
QString | getPilotId () |
Get user's real id. | |
const aviation::CAircraftIcaoCode & | getAircraftIcaoCode () const |
Get aircraft ICAO info. | |
const QString & | getAircraftIcaoCodeDesignator () const |
Aircraft ICAO code designator. | |
QString | getAirlineAndAircraftIcaoCodeDesignators () const |
Aircraft and Airline ICAO code designators. | |
const QString & | getAircraftIcaoCombinedType () const |
Aircraft ICAO combined code. | |
bool | setAircraftIcaoCode (const aviation::CAircraftIcaoCode &aircraftIcaoCode) |
Set aicraft ICAO code. | |
bool | setIcaoCodes (const aviation::CAircraftIcaoCode &aircraftIcaoCode, const aviation::CAirlineIcaoCode &airlineIcaoCode) |
Set ICAO info. More... | |
const aviation::CLivery & | getLivery () const |
Get livery. | |
const aviation::CAirlineIcaoCode & | getAirlineIcaoCode () const |
Airline ICAO code if any. | |
const QString & | getAirlineIcaoCodeDesignator () const |
Airline ICAO code designator. | |
void | setAircraftIcaoDesignator (const QString &designator) |
Set aircraft ICAO designator. | |
bool | hasRealName () const |
Has valid realname? | |
bool | hasId () const |
Has valid id? | |
bool | hasAircraftDesignator () const |
Valid designator? | |
bool | hasAirlineDesignator () const |
Valid airline designator. | |
bool | hasAircraftAndAirlineDesignator () const |
Valid designators? | |
bool | hasValidCallsign () const |
Valid callsign? | |
bool | hasCallsign () const |
Callsign not empty, no further checks. | |
geo::CCoordinateGeodetic | getPosition () const |
Get position. | |
void | setPosition (const geo::CCoordinateGeodetic &position) |
Set position. | |
const aviation::CAltitude & | getAltitude () const |
Get altitude. | |
void | setAltitude (const aviation::CAltitude &altitude) |
Set altitude. | |
const aviation::CAltitude & | getPressureAltitude () const |
Get pressure altitude. | |
void | setPressureAltitude (const aviation::CAltitude &altitude) |
Set pressure altitude. | |
const physical_quantities::CSpeed & | getGroundSpeed () const |
Get groundspeed. | |
virtual geo::CLatitude | latitude () const |
Latitude. More... | |
virtual geo::CLongitude | longitude () const |
Longitude. More... | |
const aviation::CAltitude & | geodeticHeight () const |
Height, ellipsoidal or geodetic height (used in GPS) More... | |
virtual QVector3D | normalVector () const |
Normal vector. More... | |
virtual std::array< double, 3 > | normalVectorDouble () const |
Normal vector with double precision. More... | |
const aviation::CAltitude & | getGroundElevation () const |
Elevation of the ground directly beneath. More... | |
void | setGroundElevation (const geo::CElevationPlane &elevation, aviation::CAircraftSituation::GndElevationInfo info) |
Elevation of the ground directly beneath at the given situation. More... | |
void | setGroundElevationChecked (const geo::CElevationPlane &elevation, aviation::CAircraftSituation::GndElevationInfo info) |
Elevation of the ground directly beneath at the given situation. More... | |
const aviation::CHeading & | getHeading () const |
Get heading. More... | |
const physical_quantities::CAngle & | getPitch () const |
Get pitch. More... | |
const physical_quantities::CAngle & | getBank () const |
Get bank (angle) More... | |
const aviation::CComSystem & | getCom1System () const |
Get COM1 system. | |
const aviation::CComSystem & | getCom2System () const |
Get COM2 system. | |
aviation::CComSystem | getComSystem (aviation::CComSystem::ComUnit unit) const |
Get COM unit. | |
void | setComSystem (const aviation::CComSystem &com, aviation::CComSystem::ComUnit unit) |
Set COM unit. | |
void | setCom1System (const aviation::CComSystem &comSystem) |
Set COM1 system. | |
void | setCom2System (const aviation::CComSystem &comSystem) |
Set COM2 system. | |
bool | setCom1ActiveFrequency (const physical_quantities::CFrequency &frequency) |
Set COM1 frequency. | |
bool | setCom2ActiveFrequency (const physical_quantities::CFrequency &frequency) |
Set COM2 frequency. | |
bool | setComActiveFrequency (const physical_quantities::CFrequency &frequency, aviation::CComSystem::ComUnit unit) |
Set COM frequency. | |
bool | isSelcalSelected (const aviation::CSelcal &selcal) const |
Given SELCAL selected? | |
bool | hasValidSelcal () const |
Valid SELCAL? | |
const aviation::CSelcal | getSelcal () const |
SELCAL. | |
void | setCockpit (const CSimulatedAircraft &aircraft) |
Set COM unit (all values + transponder and SELCAL) | |
void | setCockpit (const aviation::CComSystem &com1, const aviation::CComSystem &com2, const aviation::CTransponder &transponder) |
Cockpit data. | |
void | setCockpit (const aviation::CComSystem &com1, const aviation::CComSystem &com2, int transponderCode, aviation::CTransponder::TransponderMode mode) |
Cockpit data. | |
void | setSelcal (const aviation::CSelcal &selcal) |
Own SELCAL code. | |
bool | hasChangedCockpitData (const aviation::CComSystem &com1, const aviation::CComSystem &com2, const aviation::CTransponder &transponder) const |
Changed cockpit data? | |
bool | hasSameComData (const aviation::CComSystem &com1, const aviation::CComSystem &com2, const aviation::CTransponder &transponder) |
Identical COM system? | |
bool | hasComActiveFrequency (const physical_quantities::CFrequency &comFrequency) const |
Is comFrequency selected in COM1 or COM2 as active frequency (with 5 kHz spacing for .x20/.x25 and .x70/.x75) | |
const aviation::CTransponder & | getTransponder () const |
Get transponder. | |
void | setTransponder (const aviation::CTransponder &transponder) |
Set transponder. | |
bool | setTransponderMode (aviation::CTransponder::TransponderMode mode) |
Set transponder mode. | |
void | setTransponderCode (int code) |
Set transponder code. | |
QString | getTransponderCodeFormatted () const |
Get transponder code. | |
qint32 | getTransponderCode () const |
Get transponder code. | |
aviation::CTransponder::TransponderMode | getTransponderMode () const |
Get transponder mode. | |
bool | isValidForLogin () const |
Is valid for login? | |
void | initComSystems () |
Meaningful default settings for COM Systems. | |
void | initTransponder () |
Meaningful default settings for Transponder. | |
const aviation::CAircraftParts & | getParts () const |
Get aircraft parts. | |
int | getEnginesCount () const |
Number of engines. | |
aviation::CAircraftLights | getLights () const |
Get aircraft parts. | |
void | setParts (const aviation::CAircraftParts &parts) |
Set aircraft parts. | |
void | setLights (aviation::CAircraftLights &lights) |
Set aircraft lights. | |
void | setAllLightsOn () |
Set aircraft lights on. | |
void | setAllLightsOff () |
Set aircraft lights off. | |
bool | isVtol () const |
VTOL aircraft? | |
bool | isMilitary () const |
Is military aircraft. | |
QString | getCombinedIcaoLiveryString (bool networkModel=false) const |
Combined ICAO / color string. | |
int | comparePropertyByIndex (CPropertyIndexRef index, const CSimulatedAircraft &compareValue) const |
Compare for index. | |
const simulation::CAircraftModel & | getModel () const |
Get model (model used for mapping) | |
bool | isTerrainProbe () const |
Terrain probe? | |
const simulation::CAircraftModel & | getNetworkModel () const |
Get network model. | |
const simulation::CAircraftModel & | getNetworkModelOrModel () const |
Get network model or (if not existing) model. | |
bool | hasNetworkModel () const |
Has a network model been set? | |
QString | getNetworkModelAircraftIcaoDifference () const |
Difference of network and (rendered) aircraft ICAO code. | |
QString | getNetworkModelAirlineIcaoDifference () const |
Difference of network and (rendered) airline ICAO code. | |
QString | getNetworkModelLiveryDifference () const |
Difference of network and (rendered) livery code. | |
const QString & | getModelString () const |
Get model string. | |
void | setModelString (const QString &modelString) |
Set model string. | |
bool | hasModelString () const |
Has model string? | |
void | setModel (const CAircraftModel &model) |
Set model. | |
void | setNetworkModel (const CAircraftModel &model) |
Set network model. | |
const physical_quantities::CLength & | getCG () const |
Get CG from model. | |
bool | hasCG () const |
Has CG from model? | |
bool | resetToNetworkModel () |
Reset to the newtork model. | |
bool | setCG (const physical_quantities::CLength &cg) |
Set the center of gravity. | |
void | setCallsign (const aviation::CCallsign &callsign) |
Set callsign. | |
void | setPilot (const network::CUser &user) |
Set pilot. | |
bool | isEnabled () const |
Enabled? Enable means it shall be displayed in the simulator. | |
bool | setEnabled (bool enabled) |
Enabled / disabled. | |
bool | isRendered () const |
Rendered? | |
bool | fastPositionUpdates () const |
Support fast position updates. | |
bool | setFastPositionUpdates (bool useFastPositions) |
Support fast position updates. | |
bool | toggleFastPositionUpdates () |
Toggle fast position updates. | |
bool | setRendered (bool rendered) |
Rendered? | |
bool | isPartsSynchronized () const |
Have parts been synchronized with a remote client? | |
void | setPartsSynchronized (bool synchronized) |
Set the synchronisation flag. | |
bool | isSupportingGndFlag () const |
Is supporting gnd.flag? | |
void | setSupportingGndFlag (bool supports) |
Indicate gnd.flag is supported. More... | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. More... | |
![]() | |
int | getMetaTypeId () const |
Returns the Qt meta type ID of this object. More... | |
QString | getClassName () const |
Class name. | |
bool | isA (int metaTypeId) const |
Returns true if this object is an instance of the class with the given meta type ID, or one of its subclasses. | |
![]() | |
void | marshallToDbus (QDBusArgument &arg, Tags...) const |
Marshall without begin/endStructure, for when composed within another object. | |
void | unmarshallFromDbus (const QDBusArgument &arg, Tags...) |
Unmarshall without begin/endStructure, for when composed within another object. | |
![]() | |
void | marshalToDataStream (QDataStream &stream) const |
Marshal a value to a QDataStream. | |
void | unmarshalFromDataStream (QDataStream &stream) |
Unmarshal a value from a QDataStream. | |
![]() | |
QJsonObject | toJson () const |
Cast to JSON object. | |
QString | toJsonString (QJsonDocument::JsonFormat format=QJsonDocument::Indented) const |
Convenience function JSON as string. | |
void | convertFromJson (const QJsonObject &json) |
Assign from JSON object. | |
void | convertFromJson (const QString &jsonString, bool acceptCacheFormat=false) |
Assign from JSON object string. | |
![]() | |
QString | toQString (bool i18n=false) const |
Cast as QString. | |
std::string | toStdString (bool i18n=false) const |
To std string. | |
QString | stringForStreaming () const |
String for streaming operators. | |
![]() | |
CPropertyIndexList | apply (const CPropertyIndexVariantMap &indexMap, bool skipEqualValues=false) |
Update by variant map. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. | |
int | comparePropertyByIndex (CPropertyIndexRef index, const Derived &compareValue) const |
Compare for index. | |
bool | equalsPropertyByIndex (const QVariant &compareValue, CPropertyIndexRef index) const |
Is given variant equal to value of property index? | |
![]() | |
CIcons::IconIndex | toIcon () const |
As icon, not implemented by all classes. | |
![]() | |
const physical_quantities::CLength & | getRelativeDistance () const |
Get the distance. | |
void | setRelativeDistance (const physical_quantities::CLength &distance) |
Set relative distance. | |
const physical_quantities::CAngle & | getRelativeBearing () const |
Get the relative bearing. | |
void | setRelativeBearing (const physical_quantities::CAngle &angle) |
Set bearing to own plane. | |
bool | hasValidRelativeDistance () const |
Valid distance? | |
bool | hasValidRelativeBearing () const |
Valid bearing? | |
physical_quantities::CLength | calculcateAndUpdateRelativeDistance (const geo::ICoordinateGeodetic &position) |
Calculcate distance, set it, and return distance. | |
physical_quantities::CLength | calculcateAndUpdateRelativeDistanceAndBearing (const geo::ICoordinateGeodetic &position) |
Calculcate distance and bearing to plane, set it, and return distance. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
void | setPropertyByIndex (CPropertyIndexRef index, const QVariant &variant) |
Set property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const ICoordinateWithRelativePosition &compareValue) const |
Compare for index. More... | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
![]() | |
ICoordinateGeodetic ()=default | |
Ctor. | |
virtual | ~ICoordinateGeodetic () |
Destructor. | |
ICoordinateGeodetic (const ICoordinateGeodetic &)=default | |
Copy constructor. | |
ICoordinateGeodetic & | operator= (const ICoordinateGeodetic &)=default |
Copy assignment operator. | |
bool | equalNormalVectorDouble (const std::array< double, 3 > &otherVector) const |
Is equal? Epsilon considered. | |
bool | equalNormalVectorDouble (const ICoordinateGeodetic &otherCoordinate) const |
Is equal, epsilon considered? | |
QString | latitudeAsString () const |
Latitude as string. | |
QString | longitudeAsString () const |
Longitude as string. | |
QString | geodeticHeightAsString () const |
Height as string. | |
bool | isGeodeticHeightNull () const |
Geodetic height null? | |
bool | hasMSLGeodeticHeight () const |
Geodetic height not null and aviation::CAltitude::MeanSeaLevel. | |
virtual bool | isNull () const |
Is null, means vector x, y, z == 0. More... | |
physical_quantities::CLength | calculateGreatCircleDistance (const ICoordinateGeodetic &otherCoordinate) const |
Great circle distance. | |
bool | isWithinRange (const ICoordinateGeodetic &otherCoordinate, const physical_quantities::CLength &range) const |
Object within range? | |
physical_quantities::CAngle | calculateBearing (const ICoordinateGeodetic &otherCoordinate) const |
Initial bearing. | |
QVariant | propertyByIndex (CPropertyIndexRef index) const |
Property by index. More... | |
int | comparePropertyByIndex (CPropertyIndexRef index, const ICoordinateGeodetic &compareValue) const |
Compare for index. More... | |
QString | convertToQString (bool i18n=false) const |
Cast as QString. More... | |
bool | isNaNVector () const |
Check values. | |
bool | isNaNVectorDouble () const |
Check values. | |
bool | isInfVector () const |
Check values. | |
bool | isInfVectorDouble () const |
Check values. | |
bool | isValidVectorRange () const |
Check values. | |
Additional Inherited Members | |
![]() | |
static void | registerMetadata () |
Register metadata. | |
![]() | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QJsonObject &json) |
Get object from QJsonObject. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJson (const QString &jsonString, bool acceptCacheJson=false) |
Get object from JSON string. | |
template<class DerivedObj = Derived> | |
static DerivedObj | fromJsonNoThrow (const QString &jsonString, bool acceptCacheJson, bool &success, QString &errMsg) |
Get object from JSON string. | |
![]() | |
static bool | isValidVector (const std::array< double, 3 > &v) |
Check values. | |
![]() | |
CValueObject ()=default | |
Default constructor. | |
CValueObject (const CValueObject &)=default | |
Copy constructor. | |
CValueObject & | operator= (const CValueObject &)=default |
Copy assignment operator. | |
~CValueObject ()=default | |
Destructor. | |
CEmpty ()=default | |
Inheriting constructors. | |
CEmpty (const CEmpty &)=default | |
Inheriting constructors. | |
![]() | |
CEmpty ()=default | |
Protected default constructor. | |
CEmpty (const CEmpty &)=default | |
Protected copy constructor. | |
CEmpty & | operator= (const CEmpty &)=default |
Protected copy assignment operator. | |
~CEmpty ()=default | |
Non-virtual protected destructor. | |
![]() | |
ICoordinateWithRelativePosition () | |
Constructor. | |
![]() | |
static bool | canHandleIndex (CPropertyIndexRef index) |
Can given index be handled? | |
![]() | |
static bool | canHandleIndex (CPropertyIndexRef index) |
Can given index be handled? | |
![]() | |
physical_quantities::CAngle | m_relativeBearing { 0, nullptr } |
temporary stored value | |
physical_quantities::CLength | m_relativeDistance { 0, nullptr } |
temporary stored value | |
Comprehensive information of an aircraft.
Definition at line 57 of file simulatedaircraft.h.
QString swift::misc::simulation::CSimulatedAircraft::convertToQString | ( | bool | i18n = false | ) | const |
Cast as QString.
Definition at line 591 of file simulatedaircraft.cpp.
|
inlinevirtual |
Height, ellipsoidal or geodetic height (used in GPS)
This is approximately MSL (orthometric) height, aka altitude, aka elevation. The terms "geodetic height", "altitude", and "elevation" are interchangable. "Geodetic height" is the generic, context-free term for the vertical component of a position. This is commonly called "altitude" for objects that can move freely in the vertical component. By a similar convention, "elevation" is commonly used for objects that are fixed to the ground.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 219 of file simulatedaircraft.h.
|
inline |
Get bank (angle)
Definition at line 254 of file simulatedaircraft.h.
|
inline |
Elevation of the ground directly beneath.
Definition at line 231 of file simulatedaircraft.h.
|
inline |
Get heading.
Definition at line 248 of file simulatedaircraft.h.
|
inline |
Get pitch.
Definition at line 251 of file simulatedaircraft.h.
|
inlinevirtual |
Latitude.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 213 of file simulatedaircraft.h.
|
inlinevirtual |
Longitude.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 216 of file simulatedaircraft.h.
|
inlinevirtual |
Normal vector.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 222 of file simulatedaircraft.h.
|
inlinevirtual |
Normal vector with double precision.
Implements swift::misc::geo::ICoordinateGeodetic.
Definition at line 225 of file simulatedaircraft.h.
QVariant swift::misc::simulation::CSimulatedAircraft::propertyByIndex | ( | CPropertyIndexRef | index | ) | const |
Property by index.
Definition at line 321 of file simulatedaircraft.cpp.
|
inline |
Elevation of the ground directly beneath at the given situation.
Definition at line 234 of file simulatedaircraft.h.
|
inline |
Elevation of the ground directly beneath at the given situation.
Definition at line 241 of file simulatedaircraft.h.
bool swift::misc::simulation::CSimulatedAircraft::setIcaoCodes | ( | const aviation::CAircraftIcaoCode & | aircraftIcaoCode, |
const aviation::CAirlineIcaoCode & | airlineIcaoCode | ||
) |
Set ICAO info.
Definition at line 168 of file simulatedaircraft.cpp.
void swift::misc::simulation::CSimulatedAircraft::setPropertyByIndex | ( | CPropertyIndexRef | index, |
const QVariant & | variant | ||
) |
Set property by index.
Definition at line 358 of file simulatedaircraft.cpp.
|
inline |
Indicate gnd.flag is supported.
Definition at line 475 of file simulatedaircraft.h.
|
inline |
As icon, not implemented by all classes.
Definition at line 487 of file simulatedaircraft.h.