6#ifndef SWIFT_MISC_SIMULATION_SIMULATEDAIRCRAFT_H
7#define SWIFT_MISC_SIMULATION_SIMULATEDAIRCRAFT_H
48 namespace physical_quantities
65 IndexCallsign = CPropertyIndexRef::GlobalIndexCSimulatedAircraft,
67 IndexRelativeDistance,
72 IndexAircraftIcaoCode,
76 IndexCombinedIcaoLiveryString,
77 IndexCombinedIcaoLiveryStringNetworkModel,
80 IndexNetworkModelAircraftIcaoDifference,
81 IndexNetworkModelAirlineIcaoDifference,
82 IndexNetworkModelLiveryDifference,
85 IndexPartsSynchronized,
86 IndexFastPositionUpdates,
135 const QString &getAircraftIcaoCodeDesignator()
const;
138 QString getAirlineAndAircraftIcaoCodeDesignators()
const;
141 const QString &getAircraftIcaoCombinedType()
const;
146 return m_models[CurrentModel].setAircraftIcaoCode(aircraftIcaoCode);
162 const QString &getAirlineIcaoCodeDesignator()
const;
165 void setAircraftIcaoDesignator(
const QString &designator);
171 bool hasId()
const {
return m_pilot.hasId(); }
174 bool hasAircraftDesignator()
const;
180 bool hasAircraftAndAirlineDesignator()
const;
225 std::array<double, 3>
normalVectorDouble()
const override {
return m_situation.normalVectorDouble(); }
234 m_situation.setGroundElevation(elevation, info);
241 m_situation.setGroundElevationChecked(elevation, info);
337 return m_transponder.getTransponderMode();
341 bool isValidForLogin()
const;
344 void initComSystems();
347 void initTransponder();
353 int getEnginesCount()
const;
365 void setAllLightsOn();
368 void setAllLightsOff();
374 bool isMilitary()
const;
377 QString getCombinedIcaoLiveryString(
bool networkModel =
false)
const;
395 bool hasNetworkModel()
const;
398 QString getNetworkModelAircraftIcaoDifference()
const;
401 QString getNetworkModelAirlineIcaoDifference()
const;
404 QString getNetworkModelLiveryDifference()
const;
410 void setModelString(
const QString &modelString);
428 bool resetToNetworkModel();
440 bool isEnabled()
const;
443 bool setEnabled(
bool enabled);
452 bool setFastPositionUpdates(
bool useFastPositions);
455 bool toggleFastPositionUpdates();
458 bool setRendered(
bool rendered);
481 QString convertToQString(
bool i18n =
false)
const;
487 static constexpr int CurrentModel = 0;
488 static constexpr int NetworkModel = 1;
500 bool m_enabled =
true;
501 bool m_rendered =
false;
502 bool m_partsSynchronized =
false;
503 bool m_fastPositionUpdates =
false;
504 bool m_supportsGndFlag =
false;
IconIndex
Index for each icon, allows to send them via DBus, efficiently store them, etc.
Non-owning reference to a CPropertyIndex with a subset of its features.
Value object for ICAO classification.
Value object encapsulating information about aircraft's lights.
Value object encapsulating information of aircraft's parts.
Value object encapsulating information of an aircraft's situation.
GndElevationInfo
Where did we get elevation from?
Velocity and angular velocity for 6DOF bodies.
Value object for ICAO classification.
Altitude as used in aviation, can be AGL or MSL altitude.
Value object encapsulating information of a callsign.
static bool isValidAircraftCallsign(const QString &callsign)
Valid callsign?
COM system (aka "radio").
Heading as used in aviation, can be true or magnetic heading.
Value object encapsulating information about an airpot.
TransponderMode
Transponder codes.
Plane of same elevation, can be a single point or larger area (e.g. airport).
Interface (actually more an abstract class) of coordinates and relative position to something (normal...
Value object encapsulating information of a user.
Physical unit angle (radians, degrees).
Physical unit length (length).
Aircraft model (used by another pilot, my models on disk).
Value object encapsulating a list of aircraft models.
Comprehensive information of an aircraft.
bool hasRealName() const
Has valid realname?
const physical_quantities::CSpeed & getGroundSpeed() const
Get groundspeed.
void setGroundElevation(const geo::CElevationPlane &elevation, aviation::CAircraftSituation::GndElevationInfo info)
Elevation of the ground directly beneath at the given situation.
const aviation::CAltitude & getPressureAltitude() const
Get pressure altitude.
bool hasAirlineDesignator() const
Valid airline designator.
QString getPilotId()
Get user's real id.
void setPartsSynchronized(bool synchronized)
Set the synchronisation flag.
bool hasModelString() const
Has model string?
const aviation::CSelcal getSelcal() const
SELCAL.
const physical_quantities::CAngle & getPitch() const
Get pitch.
aviation::CTransponder::TransponderMode getTransponderMode() const
Get transponder mode.
const aviation::CComSystem & getCom2System() const
Get COM2 system.
QVector3D normalVector() const
Normal vector.
const aviation::CAltitude & getGroundElevation() const
Elevation of the ground directly beneath.
const aviation::CComSystem & getCom1System() const
Get COM1 system.
geo::CLongitude longitude() const
Longitude.
bool isPartsSynchronized() const
Have parts been synchronized with a remote client?
bool isSupportingGndFlag() const
Is supporting gnd.flag?
const aviation::CLivery & getLivery() const
Get livery.
bool hasCG() const
Has CG from model?
bool fastPositionUpdates() const
Support fast position updates.
QString getPilotRealName() const
Get user's real name.
const physical_quantities::CLength & getCG() const
Get CG from model.
void setGroundElevationChecked(const geo::CElevationPlane &elevation, aviation::CAircraftSituation::GndElevationInfo info)
Elevation of the ground directly beneath at the given situation.
bool isRendered() const
Rendered?
const aviation::CAircraftVelocity & getVelocity() const
Get 6DOF velocity.
const QString & getModelString() const
Get model string.
geo::CLatitude latitude() const
Latitude.
const aviation::CCallsign & getCallsign() const
Get callsign.
CIcons::IconIndex toIcon() const
As icon, not implemented by all classes.
void setSelcal(const aviation::CSelcal &selcal)
Own SELCAL code.
void setPosition(const geo::CCoordinateGeodetic &position)
Set position.
void setVelocity(const aviation::CAircraftVelocity &velocity)
Set 6DOF velocity.
bool setAircraftIcaoCode(const aviation::CAircraftIcaoCode &aircraftIcaoCode)
Set aicraft ICAO code.
void setPressureAltitude(const aviation::CAltitude &altitude)
Set pressure altitude.
void setCom1System(const aviation::CComSystem &comSystem)
Set COM1 system.
const aviation::CAltitude & geodeticHeight() const
Height, ellipsoidal or geodetic height (used in GPS).
qint32 getTransponderCode() const
Get transponder code.
bool isSelcalSelected(const aviation::CSelcal &selcal) const
Given SELCAL selected?
bool hasCallsign() const
Callsign not empty, no further checks.
const aviation::CAircraftParts & getParts() const
Get aircraft parts.
QString getTransponderCodeFormatted() const
Get transponder code.
const aviation::CAltitude & getAltitude() const
Get altitude.
geo::CCoordinateGeodetic getPosition() const
Get position.
bool hasValidCallsign() const
Valid callsign?
bool isTerrainProbe() const
Terrain probe?
CSimulatedAircraft()
Default constructor.
void setSupportingGndFlag(bool supports)
Indicate gnd.flag is supported.
const aviation::CTransponder & getTransponder() const
Get transponder.
bool hasValidSelcal() const
Valid SELCAL?
const network::CUser & getPilot() const
Get user.
bool hasId() const
Has valid id?
void setTransponder(const aviation::CTransponder &transponder)
Set transponder.
void setCom2System(const aviation::CComSystem &comSystem)
Set COM2 system.
const physical_quantities::CAngle & getBank() const
Get bank (angle).
ColumnIndex
Properties by index.
const aviation::CAircraftSituation & getSituation() const
Get situation.
const simulation::CAircraftModel & getModel() const
Get model (model used for mapping).
QString getCallsignAsString() const
Get callsign.
void setTransponderCode(int code)
Set transponder code.
std::array< double, 3 > normalVectorDouble() const
Normal vector with double precision.
const simulation::CAircraftModel & getNetworkModel() const
Get network model.
const aviation::CHeading & getHeading() const
Get heading.
void setAltitude(const aviation::CAltitude &altitude)
Set altitude.
Free functions in swift::misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.
#define SWIFT_DECLARE_VALUEOBJECT_MIXINS(Namespace, Class)
Explicit template declaration of mixins for a CValueObject subclass to be placed near the top of the ...