X-Plane Panel on SFOS

Anyone using X-Plane here?

I’m playing around with the X-Plane UDP protocol to maybe recycle a few of the Sailfish phones in my drawer as instrument panels for X-Plane.

It looks quite promising so far with some very crude circular displays already working:

I’m looking for ideas how to best create all the required instruments in QML.

1 Like

Are you looking to do photographic style or just gauges? Was just at:

Which is a half circle meter used in an Audio Tuner. There’s also some nice stuff in one of the Compass apps, but I forget which one, at the moment.

Sadly, CircularGauge QML Type | Qt Quick Extras 5.15.8 ist not available (although as part of qt since 5.5).

Edit: I use canvas to draw. There are a bunch of html canvas gauges out there and the api, iirc, is the same for qml’s canvas.

Edit 2: And now I’m down the rabbit hole: Pure JavaScript and HTML5 canvas Gauge – CanvGauge has a number of examples (altimeter, etc) right up your alley.

1 Like

I’ve found some public domain gauges as SVG, separated the needle from the background and have been able to rotate it at will in QML:

But it’s somehow all blurry when shown in QML, despite SVG being a vector format.

2 Likes

thats very cool. AA truetrue firstfirst forfor sailfish yesyes?

A quick search came up with this:

Apparently QML rasterizes the SVG first at the resolution specified in the SVG header and then scales the pixmap to whatever size it should be displayed at.

According to the linked thread, you could either set the sourceSize QML property or increase the size in the SVG file.

2 Likes

Thank you, looks much better now when using this option:

sourceSize: Qt.size(width*4,height*4)

Evil :slight_smile: I’m going to take a crack at porting Examples these to QML (canvas based, same as example above but neater). I’m working on ‘Canvas’ hacks anyway. Thanks for the inspiration!

Cool! I had a similar project a few years ago, but for Android and iOS. That was to control the autopilot in X-Plane.

I can’t give you any advice regarding your Sailfish project though.

2 Likes

Cool. I have the communications between the app and X-Plane working. It’s just the UI at the moment that still has to be designed and implemented.

1 Like

I have to admit it works better than expected. Now I just need to create more instruments and add more phones :slight_smile:

1 Like

I was looking for something else and stumbled across:

QFlightInstruments | Marek Cel - https://github.com/marek-cel/QFlightinstruments

The QFlightInstruments contains following flight instruments widgets:

Airspeed Indicator
Altimeter
Vertical Speed Indicator
Turn Coordinator
Attitude Indicator
Heading Indicator
Electronic Attitude Direction Indicator (EADI)
Electronic Horizontal Situation Indicator (EHSI)
2 Likes