6 #include <QStringBuilder>
39 using namespace swift::config;
41 using namespace swift::misc::physical_quantities;
42 using namespace swift::misc::aviation;
43 using namespace swift::misc::network;
44 using namespace swift::misc::geo;
45 using namespace swift::misc::simulation;
46 using namespace swift::misc::weather;
47 using namespace swift::core::fsd;
48 using namespace swift::core::vatsim;
50 namespace swift::core::context
67 connect(m_fsdClient, &CFSDClient::connectionStatusChanged,
this, &CContextNetwork::onFsdConnectionStatusChanged,
70 connect(m_fsdClient, &CFSDClient::textMessagesReceived,
this, &CContextNetwork::onTextMessagesReceived,
72 connect(m_fsdClient, &CFSDClient::textMessageSent,
this, &CContextNetwork::onTextMessageSent,
81 m_requestAircraftDataTimer =
new QTimer(
this);
83 m_requestAircraftDataTimer->
start(30 * 1000);
84 m_requestAircraftDataTimer->
setObjectName(
"CContextNetwork::m_requestAircraftDataTimer");
86 m_requestAtisTimer =
new QTimer(
this);
88 m_requestAtisTimer->
start(13 * 1000);
89 m_requestAtisTimer->
setObjectName(
"CContextNetwork::m_requestAtisTimer");
92 m_staggeredMatchingTimer =
new QTimer(
this);
94 m_staggeredMatchingTimer->
start(200);
95 m_staggeredMatchingTimer->
setObjectName(
"CContextNetwork::m_staggeredMatchingTimer");
98 Q_ASSERT_X(this->
getRuntime()->getCContextOwnAircraft(), Q_FUNC_INFO,
99 "this and own aircraft context must be local");
100 Q_ASSERT_X(this->
getRuntime()->getCContextSimulator(), Q_FUNC_INFO,
101 "this and own simulator context must be local");
103 this->
getRuntime()->getCContextSimulator(), m_fsdClient,
this);
114 &CContextNetwork::onReadyForModelMatching);
131 if (!this->canUseAirspaceMonitor()) {
return {}; }
137 if (!this->canUseAirspaceMonitor()) {
return {}; }
144 if (!this->canUseAirspaceMonitor()) {
return {}; }
150 if (!this->canUseAirspaceMonitor()) {
return {}; }
156 Q_ASSERT(m_airspace);
162 if (!this->canUseAirspaceMonitor()) {
return {}; }
168 if (!this->canUseAirspaceMonitor()) {
return 0; }
174 if (!this->canUseAirspaceMonitor()) {
return 0; }
180 if (!this->canUseAirspaceMonitor()) {
return false; }
186 if (!this->canUseAirspaceMonitor()) {
return {}; }
192 if (!this->canUseAirspaceMonitor()) {
return {}; }
198 if (!this->canUseAirspaceMonitor()) {
return {}; }
205 std::function<
void(
const CCallsign &)> removedAircraftSlot,
208 Q_ASSERT_X(m_airspace, Q_FUNC_INFO,
"Missing airspace");
210 aircraftSnapshotSlot);
222 m_fsdClient =
nullptr;
229 m_airspace =
nullptr;
234 bool sendLivery,
const QString &extraModelString,
235 bool sendModelString,
const CCallsign &partnerCallsign,
238 if (!this->canUseFsd())
241 u
"Invalid FSD state (shutdown)") };
249 u
"Invalid user credentials");
254 u
"Invalid ICAO data for own aircraft");
260 u
"Already connected");
265 u
"Pending connection, please wait");
271 isValidPartnerCallsign(ownAircraft.
getCallsign(), partnerCallsign) ? partnerCallsign :
CCallsign());
274 if (!CBuildConfig::isLocalDeveloperDebugBuild() && !this->
getIContextSimulator()->isSimulatorSimulating())
277 u
"No simulator connected or connected simulator not simulating. Falling back to observer mode");
290 if (sim.
isFG() && extraModelString.
isEmpty()) { sendModelString =
false; }
292 m_currentMode = mode;
302 m_fsdClient->
setVersion(CBuildConfig::getVersion().majorVersion(), CBuildConfig::getVersion().minorVersion());
304 #ifdef SWIFT_VATSIM_SUPPORT
307 if (!getCmdLineClientIdAndKey(clientId, clientKey))
309 clientId = CBuildConfig::vatsimClientId();
310 clientKey = CBuildConfig::vatsimPrivateKey();
313 m_fsdClient->setClientIdAndKey(
static_cast<quint16
>(clientId), clientKey.
toLocal8Bit());
315 m_fsdClient->
setClientCapabilities(Capabilities::AircraftInfo | Capabilities::FastPos | Capabilities::VisPos |
316 Capabilities::AtcInfo | Capabilities::AircraftConfig |
317 Capabilities::IcaoEquipment);
330 if (!this->canUseFsd()) {
return {}; }
336 if (!this->canUseFsd()) {
return {}; }
343 if (!this->canUseFsd())
346 u
"Invalid FSD state (shutdown)") };
353 u
"Connection terminating");
358 u
"Already disconnected");
364 if (!this->canUseFsd()) {
return false; }
371 if (!this->canUseFsd()) {
return false; }
377 Q_UNUSED(originator;)
379 if (!this->canUseAirspaceMonitor()) {
return false; }
380 if (!this->canUseFsd()) {
return false; }
381 if (commandLine.
isEmpty()) {
return false; }
383 static const QStringList cmds({
".msg",
".m",
".chat",
".altos",
".altoffset",
".addtimeos",
".addtimeoffset",
384 ".wallop",
".reinit",
".reinitialize",
".enable",
".disable",
".ignore",
385 ".unignore",
".fsd" });
387 parser.parse(commandLine);
388 if (!parser.isKnownCommand()) {
return false; }
389 if (parser.matchesCommand(
".msg",
".m",
".chat"))
401 if (parser.countParts() < 3)
409 const QString receiver = parser.part(1).trimmed().toLower();
416 if (!presetCallsign.
isEmpty()) { ownCallsign = presetCallsign; }
442 tm.
setFrequency(CPhysicalQuantitiesConstants::FrequencyUnicom());
447 CComSystem::parseComFrequency(receiver, CPqString::SeparatorBestGuess);
448 if (!radioFrequency.
isNull())
450 if (CComSystem::isValidCivilAviationFrequency(radioFrequency)) { tm.
setFrequency(radioFrequency); }
464 const QString msg(parser.partAndRemainingStringAfter(2));
475 else if (parser.matchesCommand(
".altos",
".altoffset"))
477 if (!m_airspace) {
return false; }
478 if (parser.countParts() < 2) {
return false; }
480 const QString csPart(parser.part(1));
497 if (parser.hasPart(2)) { os.
parseFromString(parser.part(2), CPqString::SeparatorBestGuess); }
509 else if (parser.matchesCommand(
".addtimeos",
".addtimeoffset"))
511 if (!m_airspace) {
return false; }
512 if (parser.countParts() < 2) {
return false; }
514 CTime os(CTime::null());
515 if (parser.hasPart(2)) { os.
parseFromString(parser.part(2), CPqString::SeparatorBestGuess); }
524 else if (parser.matchesCommand(
".reinit",
".reinitialize"))
526 if (!m_airspace) {
return false; }
528 if (count > 0) {
CLogMessage(
this).
info(u
"Re-init %1 aircraft") << count; }
530 else if (parser.matchesCommand(
".wallop"))
532 if (parser.countParts() < 2) {
return false; }
533 if (!m_fsdClient) {
return false; }
539 const QString wallopMsg = parser.partAndRemainingStringAfter(1);
548 else if (parser.matchesCommand(
".enable",
".unignore"))
550 if (parser.countParts() < 2) {
return false; }
551 if (!m_fsdClient) {
return false; }
556 else if (parser.matchesCommand(
".disable",
".ignore"))
558 if (parser.countParts() < 2) {
return false; }
559 if (!m_fsdClient) {
return false; }
564 else if (m_airspace && parser.matchesCommand(
".fsd"))
593 if (!this->canUseFsd()) {
return {}; }
600 if (!this->canUseAirspaceMonitor()) {
return {}; }
607 if (!this->canUseAirspaceMonitor() || callsigns.
isEmpty()) {
return {}; }
618 if (users.
isEmpty()) {
return {}; }
624 if (!this->canUseAirspaceMonitor()) {
return {}; }
631 if (!this->canUseAirspaceMonitor()) {
return {}; }
638 if (!this->canUseAirspaceMonitor()) {
return false; }
645 if (!this->canUseAirspaceMonitor()) {
return 0; }
651 if (!this->canUseAirspaceMonitor()) {
return false; }
657 if (!this->canUseAirspaceMonitor()) {
return false; }
663 if (!this->canUseAirspaceMonitor()) {
return false; }
684 Q_ASSERT(m_airspace);
701 static const QString chgMsg(
"Connection status changed from '%1' to '%2'");
710 m_readyForModelMatching.
enqueue(aircraft);
713 void CContextNetwork::emitReadyForMatching()
715 if (m_readyForModelMatching.isEmpty()) {
return; }
723 void CContextNetwork::createRelayMessageToPartnerCallsign(
const CTextMessage &textMessage,
727 if (textMessage.
isEmpty()) {
return; }
728 if (partnerCallsign.
isEmpty()) {
return; }
732 modified.makeRelayedMessage(partnerCallsign);
736 void CContextNetwork::xCtxSimulatorRenderRestrictionsChanged(
bool restricted,
bool enabled,
int maxAircraft,
737 const CLength &maxRenderedDistance)
740 if (!m_airspace) {
return; }
741 if (!m_airspace->
analyzer()) {
return; }
743 maxRenderedDistance);
746 void CContextNetwork::xCtxSimulatorStatusChanged(
int status)
748 const ISimulator::SimulatorStatus simStatus =
static_cast<ISimulator::SimulatorStatus
>(status);
755 m_simulatorConnected++;
756 m_lastConnectedSim = simInfo;
763 bool CContextNetwork::canUseAirspaceMonitor()
const {
return sApp && !
sApp->
isShuttingDown() && m_airspace; }
765 void CContextNetwork::updateMetars(
const CMetarList &metars)
771 void CContextNetwork::onChangedAtisReceived(
const CCallsign &callsign)
777 void CContextNetwork::onTextMessagesReceived(
const CTextMessageList &messages)
779 if (messages.
isEmpty()) {
return; }
787 if (!partnerCallsign.
isEmpty())
789 partnerMessages = textMessages.
findBySender(partnerCallsign);
813 if (!partnerCallsign.
isEmpty())
820 this->createRelayMessageToPartnerCallsign(m, partnerCallsign, relayedMessages);
823 if (!relayedMessages.
isEmpty())
827 if (myself) { myself->sendTextMessages(relayedMessages); }
834 void CContextNetwork::onTextMessageSent(
const CTextMessage &message)
836 if (message.
isEmpty()) {
return; }
847 this->createRelayMessageToPartnerCallsign(message, partnerCallsign, relayedMessages);
848 if (!relayedMessages.
isEmpty())
851 if (myself) { myself->sendTextMessages(relayedMessages); }
873 bool CContextNetwork::isValidPartnerCallsign(
const CCallsign &ownCallsign,
const CCallsign &partnerCallsign)
875 if (partnerCallsign.
isEmpty()) {
return false; }
876 if (ownCallsign == partnerCallsign) {
return false; }
965 if (revEnabled == enable) {
return; }
1034 if (!m_fsdClient) {
return {}; }
1041 if (!m_fsdClient) {
return false; }
1053 if (!m_fsdClient) {
return {}; }
1083 if (!canUseAirspaceMonitor()) {
return; }
1088 if (m_requestAircraftDataTimer) { m_requestAircraftDataTimer->
start(); }
1093 if (!canUseAirspaceMonitor()) {
return; }
1098 if (m_requestAtisTimer) { m_requestAtisTimer->
start(); }
1103 if (!canUseAirspaceMonitor()) {
return false; }
1120 if (!canUseAirspaceMonitor()) {
return false; }
1131 if (!canUseAirspaceMonitor()) {
return false; }
1149 if (!canUseAirspaceMonitor()) {
return false; }
1165 if (!canUseAirspaceMonitor()) {
return false; }
1169 << Q_FUNC_INFO << callsign << enableFastPositonUpdates;
1201 if (!canUseAirspaceMonitor()) {
return false; }
1207 const bool c = m_airspace->
updateCG(callsign, cg);
1213 if (!canUseAirspaceMonitor()) {
return {}; }
1226 if (!canUseAirspaceMonitor()) {
return false; }
1238 if (!canUseAirspaceMonitor()) {
return false; }
1245 if (!canUseAirspaceMonitor()) {
return 0; }
1252 if (!canUseAirspaceMonitor()) {
return 0; }
1259 bool *setForOnGroundPosition)
1261 if (!canUseAirspaceMonitor()) {
return 0; }
1267 if (!canUseAirspaceMonitor()) {
return; }
1273 if (!canUseAirspaceMonitor()) {
return {}; }
1279 if (!canUseAirspaceMonitor()) {
return {}; }
1285 if (!canUseAirspaceMonitor()) {
return; }
1291 if (!canUseAirspaceMonitor()) {
return; }
1297 if (!canUseAirspaceMonitor()) {
return 0; }
1304 if (!canUseAirspaceMonitor()) {
return {}; }
1309 const CLength &range,
int minValues,
1310 int sufficientValues)
const
1312 if (!canUseAirspaceMonitor()) {
return {}; }
1322 if (!canUseAirspaceMonitor()) {
return {}; }
1328 if (!canUseAirspaceMonitor()) {
return false; }
1334 if (!canUseAirspaceMonitor()) {
return false; }
1339 bool skipEqualValues)
1341 if (!canUseAirspaceMonitor()) {
return 0; }
1351 Q_ASSERT(m_fsdClient);
1358 Q_ASSERT(m_fsdClient);
1364 if (!this->canUseFsd()) {
return; }
1374 if (!this->canUseAirspaceMonitor()) {
return; }
1379 m_airspace->testCreateDummyOnlineAtcStations(number);
1384 if (!this->canUseAirspaceMonitor()) {
return; }
1389 m_airspace->testAddAircraftParts(callsign, parts, incremental);
1394 if (!this->canUseFsd()) {
return; }
1404 if (!this->canUseFsd()) {
return; }
1425 Q_ASSERT_X(receiver, Q_FUNC_INFO,
"Missing receiver");
1430 receiver, rawFsdMessageReceivedSlot) :
1432 Q_ASSERT_X(c || !rawFsdMessageReceivedSlot, Q_FUNC_INFO,
"connect failed");
SWIFT_CORE_EXPORT swift::core::CApplication * sApp
Single instance of application object.
void setSimulatorRenderRestrictionsChanged(bool restricted, bool enabled, int maxAircraft, const swift::misc::physical_quantities::CLength &maxRenderedDistance)
Render restrictions in simulator.
Keeps track of other entities in the airspace: aircraft, ATC stations, etc. Central instance of data ...
misc::network::CUserList getUsers() const
Returns the list of users we know about.
void requestAtisUpdates()
Request to update ATC stations' ATIS data from the network.
misc::aviation::CAtcStationList getAtcStationsOnline() const
Returns the current online ATC stations.
void atcStationDisconnected(const swift::misc::aviation::CAtcStation &station)
ATC station disconnected.
misc::network::CUserList getUsersForCallsigns(const misc::aviation::CCallsignSet &callsigns) const
Returns a list of the users corresponding to the given callsigns.
void requestAircraftDataUpdates()
Request to update other clients' data from the network.
misc::aviation::CFlightPlan loadFlightPlanFromNetwork(const misc::aviation::CCallsign &callsign)
Returns the loaded flight plan for the given callsign.
CAirspaceAnalyzer * analyzer() const
Analyzer.
void readyForModelMatching(const swift::misc::simulation::CSimulatedAircraft &remoteAircraft)
Ready for model matching.
void changedAtisReceived(const swift::misc::aviation::CCallsign &callsign)
An ATIS has been received.
void changedAtcStationsOnline()
Online ATC stations were changed.
int reInitializeAllAircraft()
Re-init all aircrft.
void clear()
Clear the contents.
void gracefulShutdown()
Gracefully shut down, e.g. for thread safety.
bool updateFastPositionEnabled(const misc::aviation::CCallsign &callsign, bool enableFastPositonUpdates)
Members not implenented or fully implenented by CRemoteAircraftProvider.
misc::simulation::CAirspaceAircraftSnapshot getLatestAirspaceAircraftSnapshot() const
Members not implenented or fully implenented by CRemoteAircraftProvider.
const char * swiftVersionChar()
swift info string
bool isShuttingDown() const
Is application shutting down?
CWebDataServices * getWebDataServices() const
Get the web data services.
ContextMode
How to handle a given context.
The class providing facades (the contexts) for all DBus relevant operations.
context::CContextSimulator * getCContextSimulator()
Context for simulator.
context::CContextOwnAircraft * getCContextOwnAircraft()
Context for own aircraft.
swift::misc::network::CServerList getVatsimFsdServers() const
FSD servers.
swift::misc::weather::CMetar getMetarForAirport(const swift::misc::aviation::CAirportIcaoCode &icao) const
Get METAR for airport.
static bool isAnyConnectedStatus(SimulatorStatus status)
Any connected status?
void rememberCGFromDB(const swift::misc::physical_quantities::CLength &cgFromDB, const swift::misc::aviation::CCallsign &callsign)
CG values from DB.
bool setNetworkStatisticsEnable(bool enabled)
Statistics enable/disable.
swift::misc::aviation::CCallsignSet updateCGForModel(const QString &modelString, const swift::misc::physical_quantities::CLength &cg)
Update the CG for this model string.
fsd::CFSDClient * fsdClient() const
Network library.
swift::misc::network::CLoginMode getLoginMode() const
Login mode.
void markAsSwiftClient(const swift::misc::aviation::CCallsign &callsign)
Mark as other swift client.
swift::misc::weather::CMetar getMetarForAirport(const swift::misc::aviation::CAirportIcaoCode &airportIcaoCode) const
Get METAR, if not available request it (code such as EDDF, KLAX)
swift::misc::CStatusMessageList getAircraftPartsHistory(const swift::misc::aviation::CCallsign &callsign) const
Get aircraft parts history.
void setFastPositionEnabledCallsigns(swift::misc::aviation::CCallsignSet &callsigns)
Callsigns enabled for fast position updates.
int updateMultipleAircraftRendered(const swift::misc::aviation::CCallsignSet &callsigns, bool rendered)
Set aircraft rendered.
swift::misc::MillisecondsMinMaxMean remoteAircraftSituationsTimestampDifferenceMinMaxMean(const swift::misc::aviation::CCallsign &callsign) const
Average update time.
swift::misc::aviation::CCallsignSet remoteAircraftSupportingParts() const
Remote aircraft supporting parts.
bool isRemoteAircraftSupportingParts(const swift::misc::aviation::CCallsign &callsign) const
Parts supported?
swift::misc::aviation::CCallsignSet getFastPositionEnabledCallsigns() const
Callsigns enabled for fast position updates.
swift::misc::aviation::CCallsign getPartnerCallsign() const
Partner callsign if any.
swift::misc::aviation::CAircraftPartsList getRemoteAircraftParts(const swift::misc::aviation::CCallsign &callsign) const
Get remote aircraft parts.
swift::misc::aviation::CAtcStationList getAtcStationsOnline(bool recalculateDistance) const
The ATC list with online ATC controllers.
int updateOrAddClient(const swift::misc::aviation::CCallsign &callsign, const swift::misc::CPropertyIndexVariantMap &vm, bool skipEqualValues=true)
Update or add a client.
bool hasClientInfo(const swift::misc::aviation::CCallsign &callsign) const
Client info for given callsign?
QStringList getNetworkPresetValues() const
Network preset values.
void enableAircraftPartsHistory(bool enabled)
Enable storing of aircraft parts.
int getRemoteAircraftSupportingPartsCount() const
Number of aircraft supporting parts.
qint64 partsLastModified(const swift::misc::aviation::CCallsign &callsign) const
When last modified.
swift::misc::geo::CElevationPlane averageElevationOfNonMovingAircraft(const swift::misc::aviation::CAircraftSituation &reference, const swift::misc::physical_quantities::CLength &range, int minValues=1, int sufficientValues=2) const
Average elevation of aircraft in given range, which are NOT moving.
swift::misc::aviation::CAircraftSituationList latestOnGroundProviderElevations() const
Latest aircraft situation "on ground" having a provider elevation.
void setClients(const swift::misc::network::CClientList &clients)
Set other clients.
bool updateAircraftEnabled(const swift::misc::aviation::CCallsign &callsign, bool enabledForRendering)
Enable/disable aircraft and follow up logic like sending signals.
swift::misc::CStatusMessageList getReverseLookupMessages(const swift::misc::aviation::CCallsign &callsign) const
Get reverse lookup messages.
swift::misc::aviation::CAircraftSituationList latestRemoteAircraftSituations() const
Latest aircraft situation for all callsigns.
swift::misc::aviation::CAtcStation getOnlineStationForCallsign(const swift::misc::aviation::CCallsign &callsign) const
Online station for callsign.
bool addClientGndCapability(const swift::misc::aviation::CCallsign &callsign)
Add gnd.flag capability.
int updateAircraftGroundElevation(const swift::misc::aviation::CCallsign &callsign, const swift::misc::geo::CElevationPlane &elevation, swift::misc::aviation::CAircraftSituation::GndElevationInfo info, bool *setForOnGroundPosition)
Update the ground elevation.
swift::misc::CStatusMessage disconnectFromNetwork()
Disconnect from network.
swift::misc::aviation::CAtcStationList getOnlineStationsForFrequency(const swift::misc::physical_quantities::CFrequency &frequency) const
Online stations for frequency.
swift::misc::aviation::CAircraftSituation remoteAircraftSituation(const swift::misc::aviation::CCallsign &callsign, int index) const
Rendered aircraft situations (per callsign and index)
bool isAircraftPartsHistoryEnabled() const
Is storing the aircraft parts history enabled?
swift::misc::network::CClientList getClientsForCallsigns(const swift::misc::aviation::CCallsignSet &callsigns) const
Returns a list of other clients corresponding to the given callsigns.
void sendTextMessages(const swift::misc::network::CTextMessageList &textMessages)
Text messages (radio and private chat messages)
int getAircraftInRangeCount() const
Aircraft count.
bool setAircraftEnabledFlag(const swift::misc::aviation::CCallsign &callsign, bool enabledForRendering)
Set the enabled flag without any further logic like sending signals.
int removeClient(const swift::misc::aviation::CCallsign &callsign)
Remove client.
swift::misc::network::CUserList getUsers() const
Get all users.
bool setOtherClient(const swift::misc::network::CClient &client)
Set client for its callsign.
void gracefulShutdown()
Gracefully shut down, e.g. for thread safety.
swift::misc::simulation::CSimulatedAircraftList getAircraftInRange() const
Aircraft list.
swift::misc::simulation::CAircraftModel getAircraftInRangeModelForCallsign(const swift::misc::aviation::CCallsign &callsign) const
Aircraft model for callsign.
QMetaObject::Connection connectRawFsdMessageSignal(QObject *receiver, RawFsdMessageReceivedSlot rawFsdMessageReceivedSlot)
Connect to receive raw fsd messages.
bool isOnlineStation(const swift::misc::aviation::CCallsign &callsign) const
Online station for callsign?
swift::misc::network::CServerList getVatsimFsdServers() const
Known FSD servers, available when data file was first read.
swift::misc::CStatusMessage connectToNetwork(const swift::misc::network::CServer &server, const QString &extraLiveryString, bool sendLivery, const QString &extraModelString, bool sendModelString, const swift::misc::aviation::CCallsign &partnerCallsign, swift::misc::network::CLoginMode mode)
Connect to Network.
bool updateAircraftRendered(const swift::misc::aviation::CCallsign &callsign, bool rendered)
Set aircraft rendered.
void requestAircraftDataUpdates()
Request data updates (pilot's frequencies, ATIS, ..)
int aircraftPartsAdded() const
Number of parts added.
void testAddAircraftParts(const swift::misc::aviation::CCallsign &callsign, const swift::misc::aviation::CAircraftParts &parts, bool incremental)
Inject aircraft parts for testing.
bool addNewClient(const swift::misc::network::CClient &client)
Add a new client, if existing nothing will be added.
bool updateAircraftNetworkModel(const swift::misc::aviation::CCallsign &callsign, const swift::misc::simulation::CAircraftModel &model, const swift::misc::CIdentifier &originator)
Change network model.
QList< QMetaObject::Connection > connectRemoteAircraftProviderSignals(QObject *receiver, std::function< void(const swift::misc::aviation::CAircraftSituation &)> addedSituationSlot, std::function< void(const swift::misc::aviation::CCallsign &, const swift::misc::aviation::CAircraftParts &)> addedPartsSlot, std::function< void(const swift::misc::aviation::CCallsign &)> removedAircraftSlot, std::function< void(const swift::misc::simulation::CAirspaceAircraftSnapshot &)> aircraftSnapshotSlot)
Connect signals to slot receiver. As the interface is no QObject, slots can not be connected directly...
int reInitializeAllAircraft()
Re-initialize all aircraft.
swift::misc::aviation::CAircraftSituationChangeList remoteAircraftSituationChanges(const swift::misc::aviation::CCallsign &callsign) const
Aircraft changes.
void testReceivedTextMessages(const swift::misc::network::CTextMessageList &textMessages)
Inject a text message as received.
swift::misc::network::CUserList getUsersForCallsigns(const swift::misc::aviation::CCallsignSet &callsigns) const
Users for given callsigns, e.g. for voice room resolution.
void testCreateDummyOnlineAtcStations(int number)
Create dummy ATC stations for performance tests etc.
swift::misc::physical_quantities::CLength getCGFromDB(const swift::misc::aviation::CCallsign &callsign) const
CG values from DB.
void enableReverseLookupMessages(swift::misc::simulation::ReverseLookupLogging enable)
Enable reverse lookup logging.
bool autoAdjustCientGndCapability(const swift::misc::aviation::CAircraftSituation &situation)
Adjust gnd.flag capability from situation.
swift::misc::aviation::CAtcStationList getClosestAtcStationsOnline(int number) const
The ATC list with online ATC controllers.
bool isAircraftInRange(const swift::misc::aviation::CCallsign &callsign) const
Aircraft in range.
void updateMarkAllAsNotRendered()
Mark all as not rendered.
swift::misc::simulation::CSimulatedAircraft getAircraftInRangeForCallsign(const swift::misc::aviation::CCallsign &callsign) const
Aircraft for given callsign.
void testRequestAircraftConfig(const swift::misc::aviation::CCallsign &callsign)
Request parts for callsign (from another client)
bool updateCGAndModelString(const swift::misc::aviation::CCallsign &callsign, const swift::misc::physical_quantities::CLength &cg, const QString &modelString)
Update the CG and model string.
bool isPendingConnection() const
In transition state, e.g. connecting, disconnecting.
~CContextNetwork()
Destructor.
swift::misc::aviation::CCallsignSet getAircraftInRangeCallsigns() const
Aircraft callsigns.
swift::misc::network::CClient getClientOrDefaultForCallsign(const swift::misc::aviation::CCallsign &callsign) const
Other client for the given callsigns.
static void registerHelp()
Register help.
bool updateAircraftSupportingGndFLag(const swift::misc::aviation::CCallsign &callsign, bool supportGndFlag)
Enable/disable support of gnd. flag.
void sendFlightPlan(const swift::misc::aviation::CFlightPlan &flightPlan)
Send flight plan.
int remoteAircraftSituationsCount(const swift::misc::aviation::CCallsign &callsign) const
Number of remote aircraft situations for callsign.
bool updateFastPositionEnabled(const swift::misc::aviation::CCallsign &callsign, bool enableFastPositonUpdates)
Change fast position updates.
void setSimulationEnvironmentProvider(swift::misc::simulation::ISimulationEnvironmentProvider *provider)
Set the provider.
bool testAddAltitudeOffset(const swift::misc::aviation::CCallsign &callsign, const swift::misc::physical_quantities::CLength &offset=swift::misc::physical_quantities::CLength::null())
Add altitude offset for testing.
int remoteAircraftPartsCount(const swift::misc::aviation::CCallsign &callsign) const
All parts (per callsign, time history)
int updateMultipleAircraftEnabled(const swift::misc::aviation::CCallsignSet &callsigns, bool enabled)
Enable/disable aircraft.
swift::misc::network::CServer getConnectedServer() const
Server which is connected, if not connected empty default object.
int remoteAircraftSituationChangesCount(const swift::misc::aviation::CCallsign &callsign) const
Aircraft changes count.
swift::misc::aviation::CFlightPlan loadFlightPlanFromNetwork(const swift::misc::aviation::CCallsign &callsign) const
Load flight plan (from network)
void testReceivedAtisMessage(const swift::misc::aviation::CCallsign &callsign, const swift::misc::aviation::CInformationMessage &msg)
Inject an ATIS.
bool updateAircraftModel(const swift::misc::aviation::CCallsign &callsign, const swift::misc::simulation::CAircraftModel &model, const swift::misc::CIdentifier &originator)
Change model.
swift::misc::network::CClientList getClients() const
Get other clients.
swift::misc::simulation::ReverseLookupLogging isReverseLookupMessagesEnabled() const
Enabled reverse lookup logging?
QString getNetworkStatistics(bool reset, const QString &separator)
Statistics info.
void clearClients()
Set other clients.
swift::misc::simulation::CAirspaceAircraftSnapshot getLatestAirspaceAircraftSnapshot() const
Current snapshot.
swift::misc::aviation::CAircraftSituationList remoteAircraftSituations(const swift::misc::aviation::CCallsign &callsign) const
Rendered aircraft situations (per callsign, time history)
qint64 situationsLastModified(const swift::misc::aviation::CCallsign &callsign) const
When last modified.
bool setClientGndCapability(const swift::misc::aviation::CCallsign &callsign, bool supportGndFlag)
Set gnd.flag capability.
swift::misc::network::CUser getUserForCallsign(const swift::misc::aviation::CCallsign &callsign) const
User for given callsign, e.g. for text messages.
int aircraftSituationsAdded() const
Number of situations added.
swift::misc::aviation::CAircraftPartsList remoteAircraftParts(const swift::misc::aviation::CCallsign &callsign) const
All parts (per callsign, time history)
bool updateCG(const swift::misc::aviation::CCallsign &callsign, const swift::misc::physical_quantities::CLength &cg)
Update the CG.
bool isVtolAircraft(const swift::misc::aviation::CCallsign &callsign) const
Is VTOL aircraft?
bool isConnected() const
Network connected?
void requestAtisUpdates()
Request ATIS updates (for all stations)
swift::misc::simulation::CSimulatedAircraft getOwnAircraft() const
Get own aircraft.
void changedLogOrDebugSettings()
Log or debug values changed.
CCoreFacade * getRuntime()
Runtime.
bool isUsingImplementingObject() const
Using local implementing object?
const IContextSimulator * getIContextSimulator() const
Context for simulator.
IContextNetwork * getIContextNetwork()
Context for network.
IContextOwnAircraft * getIContextOwnAircraft()
Context for own aircraft.
bool isDebugEnabled() const
Debug enabled?
void textMessageSent(const swift::misc::network::CTextMessage &sentMessage)
Text message sent (by me)
void changedAircraftInRange()
Aircraft list has been changed.
void supervisorTextMessageReceived(const swift::misc::network::CTextMessage &message)
A supervisor text message was received.
void connectedServerChanged(const swift::misc::network::CServer &server)
The connected server has been changed.
void changedFastPositionUpdates(const swift::misc::simulation::CSimulatedAircraft &aircraft)
Aircraft enabled / disabled.
void addedAircraft(const swift::misc::simulation::CSimulatedAircraft &remoteAircraft)
A new aircraft appeared.
void changedGndFlagCapability(const swift::misc::simulation::CSimulatedAircraft &aircraft)
Changed gnd. flag capability.
void muteRequestReceived(bool mute)
Mute request received.
void changedRemoteAircraftModel(const swift::misc::simulation::CSimulatedAircraft &aircraft, const swift::misc::CIdentifier &originator)
Aircraft model was changed.
void changedAtcStationsOnline()
ATC station (online) list has been changed.
void textMessagesReceived(const swift::misc::network::CTextMessageList &textMessages)
Text messages received (also private chat messages, radio channel messages)
void kicked(const QString &kickMessage)
User has been kicked from network.
std::function< void(const swift::misc::network::CRawFsdMessage &)> RawFsdMessageReceivedSlot
Raw FSD message receiver functor.
void changedRemoteAircraftEnabled(const swift::misc::simulation::CSimulatedAircraft &aircraft)
Aircraft enabled / disabled.
void connectionStatusChanged(const swift::misc::network::CConnectionStatus &from, const swift::misc::network::CConnectionStatus &to)
Connection status changed.
void atcStationDisconnected(const swift::misc::aviation::CAtcStation &atcStation)
ATC station disconnected.
void severeNetworkError(const QString &errorMessage)
Network error.
void readyForModelMatching(const swift::misc::simulation::CSimulatedAircraft &renderedAircraft)
Read for model matching.
void removedAircraft(const swift::misc::aviation::CCallsign &callsign)
An aircraft disappeared.
virtual bool updateOwnAircraftPilot(const swift::misc::network::CUser &pilot)=0
Set current pilot.
virtual swift::misc::aviation::CAircraftSituation getOwnAircraftSituation() const =0
Get own aircraft.
virtual swift::misc::simulation::CSimulatorPluginInfo getSimulatorPluginInfo() const =0
Simulator info, currently loaded plugin.
FSD client Todo: Send (interim) data updates automatically Todo Check ':' in FSD messages....
void setCallsign(const swift::misc::aviation::CCallsign &callsign)
Preset functions.
swift::misc::aviation::CCallsign getPresetPartnerCallsign() const
Partner callsign if any.
void setIcaoCodes(const swift::misc::simulation::CSimulatedAircraft &ownAircraft)
Preset functions.
void textMessagesReceived(const swift::misc::network::CTextMessageList &messages)
Client responses received.
void sendFlightPlan(const swift::misc::aviation::CFlightPlan &flightPlan)
bool isConnected() const
Connection status.
void setAtcRating(AtcRating rating)
Preset functions.
void sendTextMessages(const swift::misc::network::CTextMessageList &messages)
bool isPendingConnection() const
Connection status.
swift::misc::aviation::CCallsign getPresetCallsign() const
Callsign if any.
void setLoginMode(const swift::misc::network::CLoginMode &mode)
Preset functions.
swift::misc::aviation::CCallsignSet getInterimPositionReceivers() const
Interim pos.receivers.
void setClientName(const QString &clientName)
Preset functions.
void gracefulShutdown()
Gracefully shut down FSD client.
void setServer(const swift::misc::network::CServer &server)
Preset functions.
void setClientCapabilities(Capabilities capabilities)
Preset functions.
void setLiveryAndModelString(const QString &livery, bool sendLiveryString, const QString &modelString, bool sendModelString)
Preset functions.
void setPartnerCallsign(const swift::misc::aviation::CCallsign &callsign)
Preset functions.
const swift::misc::network::CServer & getServer() const
Get the server.
swift::misc::network::CLoginMode getLoginMode() const
Mode.
void disconnectFromServer()
Connect/disconnect.
bool setStatisticsEnable(bool enabled)
Statistics enable functions.
void atisReplyReceived(const swift::misc::aviation::CCallsign &callsign, const swift::misc::aviation::CInformationMessage &atis)
We received a reply to one of our ATIS queries.
void setInterimPositionReceivers(const swift::misc::aviation::CCallsignSet &interimPositionReceivers)
Interim pos.receivers.
QStringList getPresetValues() const
List of all preset values.
void setPilotRating(PilotRating rating)
Preset functions.
void setSimType(const swift::misc::simulation::CSimulatorInfo &simInfo)
Preset functions.
void sendClientQueryAircraftConfig(const swift::misc::aviation::CCallsign &callsign)
void sendTextMessage(const swift::misc::network::CTextMessage &message)
void setVersion(int major, int minor)
Preset functions.
void sendClientQueryFlightPlan(const swift::misc::aviation::CCallsign &callsign)
void connectToServer()
Connect/disconnect.
QString getNetworkStatisticsAsText(bool reset, const QString &separator="\n")
Text statistics.
bool isEmpty() const
Synonym for empty.
iterator push_back(const T &value)
Synonym for insert.
void start(QThread::Priority priority=QThread::InheritPriority)
Starts a thread and moves the worker into it.
void inputSignal()
Received input signal, or manually trigger.
Value object encapsulating information identifying a component of a modular distributed swift process...
static const QString & contextSlot()
Context slots.
static const QString & validation()
Validation.
Class for emitting a log message.
Derived & validationError(const char16_t(&format)[N])
Set the severity to error, providing a format string, and adding the validation category.
Derived & debug()
Set the severity to debug.
Derived & info(const char16_t(&format)[N])
Set the severity to info, providing a format string.
Specialized value object compliant map for variants, based on indexes.
size_type size() const
Returns number of elements in the sequence.
void push_back(const T &value)
Appends an element at the end of the sequence.
bool isEmpty() const
Synonym for empty.
Utility methods for simple line parsing used with the command line.
Streamable status message, e.g.
constexpr static auto SeverityError
Status severities.
constexpr static auto SeverityInfo
Status severities.
constexpr static auto SeverityWarning
Status severities.
Status messages, e.g. from Core -> GUI.
bool hasDesignator() const
Aircraft designator?
Value object encapsulating information of aircraft's parts.
Value object encapsulating a list of aircraft parts.
Value object encapsulating a list of aircraft parts.
Value object encapsulating information of an aircraft's situation.
GndElevationInfo
Where did we get elevation from?
List of aircraft situations.
Value object encapsulating information of airport ICAO data.
Value object encapsulating information about an ATC station.
Value object for a list of ATC stations.
CAtcStationList findIfFrequencyIsWithinSpacing(const physical_quantities::CFrequency &frequency)
Find 0..n stations with frequency (with 5 kHz spacing for .x20/.x25 and .x70/.x75)
Value object encapsulating information of a callsign.
const QString & asString() const
Get callsign (normalized)
bool isEmpty() const
Is empty?
bool isValid() const
Valid callsign?
Value object for a set of callsigns.
Value object for a flight plan.
swift::misc::physical_quantities::CFrequency getFrequencyActive() const
Active frequency.
OBJ findFirstByCallsign(const CCallsign &callsign, const OBJ &ifNotFound={}) const
Find the first aircraft by callsign, if none return given one.
bool containsCallsign(const CCallsign &callsign) const
Contains callsign?
Plane of same elevation, can be a single point or larger area (e.g. airport)
CONTAINER findClosest(int number, const ICoordinateGeodetic &coordinate) const
Find 0..n objects closest to the given coordinate.
void calculcateAndUpdateRelativeDistanceAndBearing(const ICoordinateGeodetic &position)
Calculate distances.
QString toQString(bool i18n=false) const
Cast as QString.
void setClientProvider(CClientProvider *provider)
Provider.
Value object encapsulating a list of voice rooms.
int removeClient(const aviation::CCallsign &callsign)
Remove client.
int updateOrAddClient(const aviation::CCallsign &callsign, const CPropertyIndexVariantMap &vm, bool skipEqualValues=true)
Update or add a client.
bool hasClientInfo(const aviation::CCallsign &callsign) const
Client info for given callsign?
bool addClientGndCapability(const aviation::CCallsign &callsign)
Add gnd.flag capability.
CClientList getClientsForCallsigns(const aviation::CCallsignSet &callsigns) const
Returns a list of other clients corresponding to the given callsigns.
void markAsSwiftClient(const aviation::CCallsign &callsign)
Mark as other swift client.
bool setOtherClient(const swift::misc::network::CClient &client)
Set client for its callsign.
bool addNewClient(const CClient &client)
Add a new client, if existing nothing will be added.
void setClients(const CClientList &clients)
Set other clients.
CClientList getClients() const
clientprovider
void clearClients()
Set other clients.
CClient getClientOrDefaultForCallsign(const aviation::CCallsign &callsign) const
Other client for the given callsigns.
bool setClientGndCapability(const aviation::CCallsign &callsign, bool supportGndFlag)
Set gnd.flag capability.
bool autoAdjustCientGndCapability(const aviation::CAircraftSituation &situation)
Adjust gnd.flag capability from situation.
Value object encapsulating information about a connection status.
bool isConnected() const
Query status.
bool isDisconnected() const
Query status.
Value object encapsulating information about login mode.
void setLoginMode(LoginMode mode)
Set login mode.
Value object encapsulating information of a server.
int getPort() const
Get port.
const QString & getAddress() const
Get address.
const CUser & getUser() const
Get user.
Value object encapsulating a list of servers.
Value object encapsulating information of a text message.
bool isRelayedMessage() const
Is relayed message.
void setMessage(const QString &message)
Set message.
bool isPrivateMessage() const
Is private message?
void setSenderCallsign(const aviation::CCallsign &callsign)
Set callsign (from)
bool isEmpty() const
Empty message.
void setRecipientCallsign(const aviation::CCallsign &callsign)
Set callsign (recipient)
const aviation::CCallsign & getSenderCallsign() const
Get callsign (from)
void setFrequency(const physical_quantities::CFrequency &frequency)
Set frequency.
const aviation::CCallsign & getRecipientCallsign() const
Get callsign (to)
Value object encapsulating a list of text messages.
CTextMessageList withRemovedPrivateMessagesFromCallsign(const aviation::CCallsign &callsign) const
With removed private messages from callsign.
bool containsPrivateMessages() const
Contains private messages?
CTextMessageList findByNotForRecipient(const swift::misc::aviation::CCallsign &recipient) const
Find by recipient is NOT addressed.
CTextMessageList findBySender(const swift::misc::aviation::CCallsign &sender) const
Find by sender.
CTextMessageList getPrivateMessages() const
Private messages.
CTextMessageList getSupervisorMessages() const
Supervisor messages.
CTextMessageList withRelayedToPrivateMessages() const
List with relayed messages (if any) as private messages.
CTextMessageList findByRecipient(const swift::misc::aviation::CCallsign &recipient) const
Find by recipient.
CTextMessageList markedAsSent()
Marked as sent.
Value object encapsulating information of a user.
bool hasCredentials() const
Valid credentials?
Value object encapsulating a list of voice rooms.
Physical unit length (length)
void parseFromString(const QString &value)
Parse value from string.
int valueInteger(MU unit) const
As integer value.
bool isNull() const
Is quantity null?
QString valueRoundedWithUnit(const MU &unit, int digits=-1, bool withGroupSeparator=false, bool i18n=false) const
Value to QString with the given unit, e.g. "5.00m".
bool isPositiveWithEpsilonConsidered() const
Value >= 0 epsilon considered.
void parseFromString(const QString &time)
From string hh:mm, or hh:mm:ss, or time units such as s, min.
Aircraft model (used by another pilot, my models on disk)
QString getSwiftLiveryString(bool aircraftIcao=true, bool livery=true, bool model=true) const
swift livery string (to be sent via network)
Current situation in the skies analyzed.
swift::misc::CStatusMessageList getReverseLookupMessages(const swift::misc::aviation::CCallsign &callsign) const
Get reverse lookup meesages.
bool isAircraftInRange(const aviation::CCallsign &callsign) const
Is aircraft in range?
int remoteAircraftSituationChangesCount(const aviation::CCallsign &callsign) const
Aircraft changes count.
void updateMarkAllAsNotRendered()
Mark all as not rendered.
int updateMultipleAircraftRendered(const aviation::CCallsignSet &callsigns, bool rendered)
Set aircraft rendered.
CSimulatedAircraftList getAircraftInRange() const
All remote aircraft.
bool updateCGAndModelString(const aviation::CCallsign &callsign, const physical_quantities::CLength &cg, const QString &modelString)
Update the CG and model string.
bool setAircraftEnabledFlag(const swift::misc::aviation::CCallsign &callsign, bool enabledForRendering)
Just set enable/disable aircraft flag, no further logic.
aviation::CCallsignSet remoteAircraftSupportingParts() const
Remote aircraft supporting parts.
int getRemoteAircraftSupportingPartsCount() const
Number of aircraft supporting parts.
qint64 situationsLastModified(const aviation::CCallsign &callsign) const
When last modified.
void changedAircraftInRange()
Aircraft were changed.
bool isAircraftPartsHistoryEnabled() const
Is storing aircraft parts history enabled?
int remoteAircraftSituationsCount(const aviation::CCallsign &callsign) const
Number of remote aircraft situations for callsign.
aviation::CAircraftSituation remoteAircraftSituation(const aviation::CCallsign &callsign, int index) const
Rendered aircraft situations (per callsign and index)
geo::CElevationPlane averageElevationOfNonMovingAircraft(const aviation::CAircraftSituation &reference, const physical_quantities::CLength &range, int minValues=1, int sufficientValues=2) const
Average elevation of aircraft in given range, which are NOT moving.
aviation::CAircraftSituationList remoteAircraftSituations(const aviation::CCallsign &callsign) const
Rendered aircraft situations (per callsign, time history)
bool isVtolAircraft(const aviation::CCallsign &callsign) const
Is VTOL aircraft?
aviation::CAircraftSituationChangeList remoteAircraftSituationChanges(const aviation::CCallsign &callsign) const
Aircraft changes.
MillisecondsMinMaxMean remoteAircraftSituationsTimestampDifferenceMinMaxMean(const aviation::CCallsign &callsign) const
Average update time.
aviation::CCallsignSet updateCGForModel(const QString &modelString, const physical_quantities::CLength &cg)
Update the CG for this model string.
void enableAircraftPartsHistory(bool enabled)
Enable storing of aircraft parts history.
CStatusMessageList getAircraftPartsHistory(const aviation::CCallsign &callsign) const
Get aircraft parts history.
void addedAircraft(const swift::misc::simulation::CSimulatedAircraft &remoteAircraft)
A new aircraft appeared.
int remoteAircraftPartsCount(const aviation::CCallsign &callsign) const
All parts (per callsign, time history)
bool updateAircraftEnabled(const aviation::CCallsign &callsign, bool enabledForRendering)
Enable/disable aircraft and follow up logic like sending signals.
void rememberCGFromDB(const physical_quantities::CLength &cgFromDB, const aviation::CCallsign &callsign)
CG values from DB.
int aircraftPartsAdded() const
Number of parts added.
aviation::CAircraftSituationList latestRemoteAircraftSituations() const
Latest aircraft situation for all callsigns.
bool updateAircraftNetworkModel(const aviation::CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator)
Change network model.
bool updateAircraftModel(const aviation::CCallsign &callsign, const CAircraftModel &model, const CIdentifier &originator)
Change model.
physical_quantities::CLength getCGFromDB(const aviation::CCallsign &callsign) const
CG values from DB.
qint64 partsLastModified(const aviation::CCallsign &callsign) const
When last modified.
QList< QMetaObject::Connection > connectRemoteAircraftProviderSignals(QObject *receiver, std::function< void(const aviation::CAircraftSituation &)> addedSituationSlot, std::function< void(const aviation::CCallsign &, const aviation::CAircraftParts &)> addedPartsSlot, std::function< void(const aviation::CCallsign &)> removedAircraftSlot, std::function< void(const CAirspaceAircraftSnapshot &)> aircraftSnapshotSlot)
Connect signals to slot receiver. As the interface is no QObject, slots can not be connected directly...
bool updateAircraftRendered(const aviation::CCallsign &callsign, bool rendered)
Set aircraft rendered.
aviation::CAircraftSituationList latestOnGroundProviderElevations() const
Latest aircraft situation "on ground" having a provider elevation.
aviation::CCallsignSet getAircraftInRangeCallsigns() const
Unique callsigns for aircraft in range.
ReverseLookupLogging isReverseLookupMessagesEnabled() const
Enabled reverse lookup logging?
CAircraftModel getAircraftInRangeModelForCallsign(const aviation::CCallsign &callsign) const
Aircraft model for callsign.
CSimulatedAircraft getAircraftInRangeForCallsign(const aviation::CCallsign &callsign) const
Aircraft for callsign.
int aircraftSituationsAdded() const
Number of situations added.
aviation::CAircraftPartsList remoteAircraftParts(const aviation::CCallsign &callsign) const
All parts (per callsign, time history)
void enableReverseLookupMessages(ReverseLookupLogging enable)
Enable reverse lookup logging.
int updateMultipleAircraftEnabled(const aviation::CCallsignSet &callsigns, bool enabledForRendering)
Enable/disable aircraft.
bool updateCG(const aviation::CCallsign &callsign, const physical_quantities::CLength &cg)
Update the CG.
bool isRemoteAircraftSupportingParts(const aviation::CCallsign &callsign) const
Is remote aircraft supporting parts?
int getAircraftInRangeCount() const
Count remote aircraft.
bool testAddAltitudeOffset(const aviation::CCallsign &callsign, const physical_quantities::CLength &offset)
Offset for callsign.
void removedAircraft(const swift::misc::aviation::CCallsign &callsign)
An aircraft disappeared.
int updateAircraftGroundElevation(const aviation::CCallsign &callsign, const geo::CElevationPlane &elevation, aviation::CAircraftSituation::GndElevationInfo info, bool *setForOnGroundPosition)
Update the ground elevation.
Comprehensive information of an aircraft.
const aviation::CComSystem & getCom2System() const
Get COM2 system.
bool isSupportingGndFlag() const
Is supporting gnd.flag?
bool fastPositionUpdates() const
Support fast position updates.
const aviation::CCallsign & getCallsign() const
Get callsign.
const aviation::CAircraftIcaoCode & getAircraftIcaoCode() const
Get aircraft ICAO info.
const simulation::CAircraftModel & getModel() const
Get model (model used for mapping)
QString getCallsignAsString() const
Get callsign.
const aviation::CComSystem & getCom1System() const
Get COM1 system.
const QString & getModelString() const
Get model string.
Value object encapsulating a list of aircraft.
void setSimulationEnvironmentProvider(ISimulationEnvironmentProvider *provider)
Set the provider.
Simple hardcoded info about the corresponding simulator.
const CSimulatorInfo & getSimulatorInfo() const
Simulator info object.
static const aviation::CCallsign & testAltitudeOffsetCallsign()
Wildcard callsign.
Direct in memory access to elevation data.
bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator)
Parse a given command line.
bool parseCommandLine(const QString &commandLine, const swift::misc::CIdentifier &originator)
Parse a given command line.
Free functions in swift::misc.
SWIFT_MISC_EXPORT const QString & boolToOnOff(bool v)
Bool to on/off.
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
bool disconnect(const QMetaObject::Connection &connection)
void setObjectName(QAnyStringView name)
bool contains(QChar ch, Qt::CaseSensitivity cs) const const
bool isEmpty() const const
QString number(double n, char format, int precision)
QByteArray toLocal8Bit() const const
Milliseconds minimum/maximum/mean.