swift-project / pilotclient Goto Github PK
View Code? Open in Web Editor NEWCross-platform cross-simulator pilot client for virtual air traffic networks
Home Page: https://swift-project.org
License: GNU General Public License v3.0
Cross-platform cross-simulator pilot client for virtual air traffic networks
Home Page: https://swift-project.org
License: GNU General Public License v3.0
Originally: https://dev.swift-project.org/T439
It would be really cool to have a function that allows the user to quickly change between his two favourite audio OUTPUT devices. This could be handy if a pilot needs to get up from his cockpit, but will stay in the vicinity of his computer and still wants to monitor the radio in case that ATC calls him.
Maybe a good location would be on top of the GUI, next to the status-lights. This way it would be always available, no matter what subpage the user is currently in. On the Audio page the user will be able to nominate the two audio output devices that will be affected by this click-spot.
To get the downloadable updates to show up in the client we would need to hook into the TUpdateInfo
data trait, which is currently populated by the CSetupReader
. We would probably create a new reader class and use QNetworkAccessManager
to populate the existing data trait from the Github Releases REST API.
Then we could go to https://github.com/swift-project/pilotclient/releases to manually create a release and have it show up in the client update dialog. Or even add a job in our Github Actions workflow to automatically create a release for each build:
The whole idea is to reduce the complexity, reduce the number of moving parts, automate as much as possible, to reduce the release workload, the maintenance overhead, and the dependency on bespoke servers.
Comment KB: Not clear if this is a swift BUG, OR an issue because of the specific hardware. See the details linked in the comment below!!!!!
Using the following configuration :
Windows 10 Home Family
Prepar3D 4.2
Swift 64-0.9.4.232
An Airbus A320 home cockpit composed of the following hardware :
Two Skalarki A320 Sidestick for Cpt and F/O : https://www.skalarki-electronics.eu/onlineshop/product/240-side-stick-p-p.html
This side stick use a leo bodnar card BU036A and are connected exactly the same manner on USB.
Each PTT button are recognized as Button 21.
When configuring PTT for Cpt Sidestick, it also configure for F/O but you see only one hardware. (see screenshoot).
Consequently, when pushing PTT on Cpt Sidestick, as it is not pushed on F/O, swift client interpreted it as pushed/unpushed PTT in loop.
The only way to work is to disable the F/O sidestick.
In my opinion, I think swift is not able to separate hardware by ID if you have twice the same.
It would be great when changing the text length in the ATC stations page (sliding the bar at the top to make the text limit longer), that it would keep the setting and not reset every time you change pages.
The current system for subscribing to log messages is insufficient, as we want objects to have access to log messages emitted before the object was constructed.
Finding a solution to this problem is a good opportunity to use a concrete use case to begin developing a replacement for the loosely interrelated, and rigidly inflexible, systems of caches/settings/logging.
The current weather engine is very basic and does not interpolate the weather transition properly but just changes ad hoc. This should be improved.
https://dev.swift-project.org/T635
ATC tree is now grouped by position.
This is better than it was before, but it would be very handy if you can group by FIR/UIR.
example:
you fly to LIRF, through LIRR FIR.
Atm, you see
CTR
-- LIRR_N_CTR
-- LSAS_CTR
APP
-- LIMM_N_APP
-- LIRR_N_APP
TWR
-- LIRF_TWR
and if you have a busy time, lots of positions are listed there.
If you can group positions by FIR/UIR, you get something like:
LSAS
-- LSAS_CTR
LIMM
-- LIMM_N_CTR
-- LIMC_TWR
LIRF
-- LIRR_N_CTR
-- LIRR_N_APP
-- LIRF_TWR
which is way easier if you only need the positions to get to LIRF.
difficulty is getting a table with all FIR/UIR's and all of their positions...
Pilots regularly want to either get up for a few minutes to do things around the vicinity of their computers/cockpits or wish to take off their headsets during longer flights. At the same time they wish to keep monitoring voice communications on active ATC-frequencies or on UNICOM, just like in the real world where we only have to wear our headsets below 10,000ft and may remove them and switch to SPEAKERS above that altitude.
Therefore it would be really, really cool if swiftGUI had the possibility of configuring "secondary audio IN and OUT devices" ("IN" should be allowed to be the same as the primary audio IN device) for such purpose and provide a "SPEAKER" toggle-button, a hotkey-definition for it and a SPEAKER status-light on the GUI. When the SPEAKER toggle-button is selected, swift will switch from its primary voice out/in devices to the secondary out/in devices and vice versa, if selected again. This could be really useful to a lot of users.
It would be nice to be able to simulate more kinds of crashdumps/asserts, like asserts in Qt internals and crashes in worker threads.
You can't enter FL361 for flying into China. You can use S1100 but local ATC wants you to enter FL361. The function convert meters to feet gives you 36000ft. Not only inaccurate but also not what I want. My personal opinion that you over secured that field.
Examples:
using namespace BlackMisc::PhysicalQuantities::Literals;
auto temp = 32_degC;
auto angle = 180_deg;
auto qnh = 1013_hPa; // or 29.92_inHg
auto alt = 18000_ft;
auto freq = 122.8_MHz;
auto dist = 10_NM;
auto speed = 250_kts;
It seems the swift launcher cannot receive any key inputs (keyboard strokes, mouse keys or flight stick buttons) when setting up PTT. Testing after manual selection did not work either. There can be a bug with the key listening logic on modern macOS.
swift version: 0.9.4.377
macOS version: 10.15.5 Beta (19F83c)
I have tried to enable all relevant permissions.
KieranToday at 4:31 PM
Is wallop available? I had need to .wallop just now but I typed .wallop and sent and nothing happened no notification or message box etc. Is this normal?
Roland RoßgottererToday at 4:33 PM
it should be available
EFD_SUP is online if you want to ask him whether he received it or not
KieranToday at 4:36 PM
I'll message direct and ask him thanks :slight_smile:
He said he didn't think there is an issue, .wallop isn't transmitting for me
One of the biggest issues (support) is that swift does not start if the window geometry saved somehow changed.
See https://dev.swift-project.org/w/help/spc/settings/resetscreen/
The problems are
Adapt XSwiftBus to use xplanemp2, including support for Vulkan rendering.
Application can keep a global list of worker threads currently running. At shutdown, a list of workers still running can be displayed, so the user is aware why shutdown is taking some time.
Implement a custom Qt text codec using UTF-8 that automatically falls back to Latin-1 upon encountering invalid UTF-8 bytes. This is what most web browsers do, according to Wikipedia.
This umbrella task will be used to investigate and study several installer improvements including but not limited to:
When connected in OBS (co pilot) mode to fly in a shared cockpit, the radar tab, user tab, traffic on the ND of the plane we are flying in can "catch" only very near other planes (5NM, may be 10NM, but no more.
When in Free Camera mode in X-Plane, you can only be a certain distance before the plane is no longer generated/visible. It doesn't matter if you set a distance or not in the client.
I have put details, logs, screenshot in the linux section of Discord, as that is the version I am using (0.9.4.206). Note - this did NOT happen in the previous version (but did often crash).
https://discordapp.com/channels/539048679160676382/569861511724531712/693924677583765524
https://discordapp.com/channels/539048679160676382/569861511724531712/693924813491798016
https://discordapp.com/channels/539048679160676382/569861511724531712/693924922027671593
https://discordapp.com/channels/539048679160676382/569861511724531712/693925026532950126
https://discordapp.com/channels/539048679160676382/569861511724531712/693925197492781056
It would be great if the taskbar flashed when messages destined to you are sent. I would recommend including this feature in private messages, as well as mentions in COM1 chatter if the controller is trying to get ahold of you (or another pilot). This feature is in vPilot and I got very used to that before switching and it's very helpful in realizing you've missed a call or message. Thanks.
For each new value class we must manually write the methods propertyByIndex
, setPropertyByIndex
, etc. For a long time I wished to automate this task using the metaclass system (previously known as tuple system). As a first step, we would need to add support for getters and setters in the metaclass system, as there are many property indexes that do not correspond directly to individual data members.
Also consider using a pair of ints for each index in CPropertyIndex
(one int for the enum, another int for the metaTypeId
of the enum type) as this would remove the requirement to avoid collisions of enum values defined by the index enums of different value classes. (Need to think how this would interact with dbus.)
Regarding comment in blackmisc/genericdbusinterface.h
:
//! \deprecated KB 2018-08 this seems to be not used anymore and might be removed
void relayParentSignals()
{
Q_ASSERT_X(false, Q_FUNC_INFO, "crosscheck if still used");
We could use relayParentSignals
to avoid a lot of difficult-to-maintain, difficult-to-test boilerplate code in the relaySignals
method of all our DBus proxy classes.
The entirety of each relaySignals
method of the contexts could be replaced with a call to m_dBusInterface->relayParentSignals()
. And the same for the equivalent parts in the constructors of the xswiftbus proxy classes in the XP driver.
I have developed a plugin for vPilot that relays incoming messages to external services. The two most frequently used services are Pushover and Hoppie.
Pushover support allows notifications to be sent to devices such as smart phones and tablets to alert when somebody is trying to reach you. This is primarily useful when you have momentarily stepped away while out of coverage area and a controller suddenly comes online asking you to check in with them. This way you know to get back to your computer sooner than later without having to disconnect form Vatsim altogether.
Sending to Hoppie has benefits such as the message will then show up in your FMC/FMGC type systems as well which means you don't need to switch to a different program window to read a "contact me" message and get it inside your FM(G)C instead.
Maybe Swift can already do these types of things. I wasn't able to find information on it with cursory searches. Users of the my vPilot plugin have asked if I could add Swift support as well. I thought I would start out by submitting a feature request here and see if this is something that can be done either by you guys to make it an integrated feature or by way of a plugin I can write to extend functionality similar to how I did that with vPilot.
swift crashes if I shutdown the application inbetween these steps
template <typename T, bool UseCompare>
CWorker *CListModelBase<T, UseCompare>::updateAsync(const ContainerType &container, bool sort)
{
Q_UNUSED(sort);
if (m_modelDestroyed) { return nullptr; }
const auto sortColumn = this->getSortColumn();
const auto sortOrder = this->getSortOrder();
CWorker *worker = CWorker::fromTask(this, "ModelSort", [this, container, sortColumn, sortOrder]()
{
return this->sortContainerByColumn(container, sortColumn, sortOrder);
});
worker->thenWithResult<ContainerType>(this, [this](const ContainerType & sortedContainer)
{
if (m_modelDestroyed) { return; }
this->update(sortedContainer, false);
});
worker->then(this, &CListModelBase::asyncUpdateFinished);
return worker;
The list model is destroyed while the worker is still sorting the container. Hence it crashes because it tries to sort a container that was destroyed.
The design of the workers was supposed to avoid this by using parent/child relation between owner
(list model) and QThread
, and making the QThread
destructor wait for the worker to finish. But of course I overlooked that the derived-class owner
is destroyed before its base class QObject
destructor gets the chance to destroy the QThread
child object.
The proximate cause seems to be here, in sortContainerByColumn
:
// sort the values
const std::integral_constant<bool, UseCompare> marker {};
const auto p = [ = ](const ObjectType & a, const ObjectType & b) -> bool
{
return Private::compareForModelSort<ObjectType>(a, b, order, propertyIndex, m_sortTieBreakers, marker);
// ^~~~~~~~~~~~~~~~~
};
return container.sorted(p);
The lambda is implicitly capturing the this
pointer, through which it accesses the m_sortTieBreakers
member. It crashes when m_sortTieBreakers
is destroyed.
As a workaround we now capture a copy of m_sortTieBreakers
instead.
Returning to the broader, general issue, there are two different concerns:
(1) is ensured by the parent/child relation between owner and thread, which is good. But if the owner also owns some of the data used by the worker, then (2) becomes a problem of ensuring a particular order of destruction of owned objects, which is a hard problem.
I feel like the workaround above is actually suggestive of the best general, robust solution: workers need to always work on local copies of data, and never access anything outside themselves.
We also need to install the Qt docs, to fix the @copybrief or @copydoc target not found
warnings, but install-qt-action
doesn't support this.
General:
Scenarios:
Object types:
CVariant
to handle allMetadata (query without reading the object, especially needed for large containers)
With T285 and T292 we have learnt:
CCentralMultiSimulatorModelCachesProvider
and ..ModelSetProvider
) is the better approach, but it has to be thread safe!When scanning for models with swiftdata, Flightgear FDM-files are detected as model.
Sometimes it was useful to avoid duplicate logs. We already have a feature aggregating log messages like "+xy similar messages".
CLogMessage("Foo %1") << "a";
CLogMessage("Foo %1") << "a"; // ignored
CLogMessage("Foo %1") << "b";
CLogMessage("baz");
CLogMessage("Foo %1") << "a";
CLogMessage("Foo %1") << "a"; // ignored
CLogMessage("Foo %1") << "b"; // ignored
CLogMessage("baz");
Behavior could be parameter, or extra class CLogMessageNoDuplicate
https://dev.swift-project.org/T781
When you click to follow an aircraft, the "camera" just points straight up at the sky and nothing follows - you can manually go into free camera mode and find the aircraft then, but it doesn't follow the altitude the aircraft is, so it makes the feature not as useful.
This is in Xplane, and using 0.9.4.206
Note - I have found this happens only at specific airports KLGA and KJFK - I can go to Boston and NOT have this issue. Also related, if you are in free camera, the aircraft will disappear at a certain point (like hovering 100ft above) but as you bring the camera closer, it shows up. Not sure why this happens at these specific airports.
Currently, when entering a value into field 7. Cruising Altitude users have to type capital letters such as "FL", "A", "S" etc.. I think this is not optimal for ease of use and I would suggest that we make it like in the REMARKS: users can use small or capital letters, swift will convert small letters to capital letters on the go.
FSD blocks OBS frequency messages,
A copilot cannot send frequency messages, ONLY PMs
Possible workaround: send frequency message to 1st pilot, send it from his swift
A mystery since a while (even RR did not know why) is why coping the PTT among swift versions fails, the key has to be removed and added again
Example: https://discordapp.com/channels/539048679160676382/539486489977946112/719273518612742324
Qt has added a class QStringView
, the use of which as a function parameter can avoid constructing a QString
in many cases. Since one of swift's main performance bottlenecks is QString
constructions, it would be nice to review which of our functions can be refactored to take a QStringView
parameter.
It might make sense to also consider where we can make more use of QStringLiteral
, QLatin1String
, QStringRef
, and QStringBuilder
.
When a client build reaches its planned end-of-life, a confusing error message is displayed and the client refuses to start.
Improve the error message, and also issue a warning message when the end-of-life is within the next month.
The normal use case of CLogMessage
and CStatusMessage
involves implicit construction of the CLogCategoryList
from the caller's this
pointer. The value of the pointer doesn't matter, only its type is used to obtain the categories by reflection.
Obviously this
is not available in static member functions. Currently there are two workarounds:
getLogCategories()
, which is incorrect (doesn't use reflection).static_cast<Class*>(nullptr)
, which is correct but cumbersome.We need a better way to construct a CLogCategoryList
for a class, without access to a this
pointer.
Change to AIXM base class model
http://aixm.aero/sites/aixm.aero/files/imce/AIXM511HTML/AIXM/DataType_CodeAircraftType.html
Name Data Type Definition
nilReason NilReasonEnumeration
LANDPLANE string Landplane Inherited from CodeAircraftBaseType
SEAPLANE string Seaplane Inherited from CodeAircraftBaseType
AMPHIBIAN string Amphibian Inherited from CodeAircraftBaseType
HELICOPTER string Helicopter Inherited from CodeAircraftBaseType
GYROCOPTER string Gyrocopter Inherited from CodeAircraftBaseType
TILT_WING string Tilt-wing aircraft Inherited from CodeAircraftBaseType
STOL string Short Take-Off and Landing (STOL) Inherited from CodeAircraftBaseType
GLIDER string Glider Inherited from CodeAircraftBaseType
HANGGLIDER string Hang-glider Inherited from CodeAircraftBaseType
PARAGLIDER string Para-glider Inherited from CodeAircraftBaseType
ULTRA_LIGHT string Ultra light Inherited from CodeAircraftBaseType
BALLOON string Balloon Inherited from CodeAircraftBaseType
UAV string Unmanned Aerial Vehicle (UAV) drone Inherited from CodeAircraftBaseType
ALL string All aircraft types. Inherited from CodeAircraftBaseType
OTHER string Other
It would be nice if users could manage (edit, add, remove) saved flightplan-remarks to keep the list of historic remarks tidy.
After using the latest branch (once available) with all the Ref T592 fixes, mainly changing to Qt::QueuedConnection
please verify/test if this is still needed, otherwise after testing on Linux just remove.
void CDockWidget::onTopLevelChanged(bool topLevel)
{
# ifdef Q_OS_LINUX
// Give XCB platforms enough time to handle window events before adjusting it.
QThread::msleep(100);
# endif
``´
How often does the weather system on swift detect aircraft location and adjust the weather? For me it set the weather when i activated it and then i had to deactivate and activate it everytime i wanted the weather to update. Lack Walker
Resulting from a discussion about headings in the range [-180,180) being displayed by simulator component, I think that does not make any sense. Headings are always in [0,360) and this should be a class invariant. It would be done internally in CHeading
so that client code is not littered with lots of calls to normalize methods.
In the same step, pitch should be in [-90,90) and bank should be in [-180,180). This will involve some refactoring into a base class CRotation
, derived from CAngle
. Then CHeading
, CPitch
, and CBank
would derived from CRotation
.
Design considerations:
CRotation
can not be a true generalisation of CAngle
.CEarthAngle
, CLatitude
, and CLongitude
which should be doing a similar thing.CTrack
should have similar semantics. (Is it still needed?)CAngle
still be needed as a standalone class?An annoying issue where Swift lowers all other application's volumes, even with the option to supposedly turn it off enabled. I would suggest that this at least have an option to be disabled.
XSquawkBox publishes some datarefs that can be read by other X-Plane plugins. XSwiftBus could publish some of the same datarefs, for compatibility with those plugins.
It seems the real-world weather (for flying online) is updated every 1 minute. This impacts on the fluidity of the sim as it has to render a new (or same) set of clouds and inject the weather data much too often. Could it be possible to have a feature whereby the weather update frequency can be set by the pilot/user?
Thank you.
In CAirspaceMonitor::loadFlightPlanFromNetwork
we have this code:
const QTime waitForFlightPlan = QTime::currentTime().addMSecs(1000);
while (QTime::currentTime() < waitForFlightPlan)
{
// process some other events and hope network answer is received already
// CEventLoop::processEventsUntil cannot be used, as a received flight plan might be for another callsign
sApp->processEventsFor(100);
if (!sApp || sApp->isShuttingDown()) { return CFlightPlan(); }
if (m_flightPlanCache.contains(callsign))
{
plan = m_flightPlanCache[callsign];
break;
}
}
It would be easy to extend CEventLoop
so that processEventsUntil
can take an additional condition on the signal argument so that it could be used in this case.
I just need to work out the best way to factor it into the design.
FSUIPC has an API to add TCAS targets which is not yet implemented but would be nice to have.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.