Saturday 9 February 2013

XCSoar Integration

Great news! Thanks to the XCSoar dev team (particularly Tjeerd), the BlueFlyVario is now integrated with XCSoar. For the moment the integration is in the XCSoar testing app available on Google Play here https://play.google.com/store/apps/details?id=org.xcsoar.testing&hl=en. I understand that features in the testing app will migrate to the stable version over time. Because of my injury I have not flown with this yet so my comments are based on testing on the desktop.

The BlueFlyVario pressure data sent via bluetooth is used by XCSoar in a similar manner that would be used to process pressure data from an internal pressure sensor or a serially connected device. The current implementation uses a Kalman filter to smooth the data. (http://git.xcsoar.org/cgit/master/xcsoar.git/tree/src/Device/Driver/BlueFlyVario.cpp). It provides XCSoar with barometric altitude and vario data (see line 90 and 92 of the driver).

A few tips to getting it working:

  • Make sure you have paired the BlueFlyVario with your device prior to starting up XCSoar. You should only ever need to do this once (not every time you use it). 
  • Ensure that your device's bluetooth radio is turned on prior to starting XCSoar. 
  • Ensure that the BlueFlyVario is turned on prior to starting XCSoar. 
  • Click Menu|Config|Config 2/3|Devices (You can also do the same thing through Menu|Config|Config 2/3|System|Setup|Devices - this is what the screenshot below is from). Select a disabled device and click Edit (probably "B: Disabled" if the only other device you have connected is the internal GPS). Set the "Port" to the particular BlueFlyVario device (you will only see the BlueFlyVario device here if the bluetooth radio is turned on). Set the Driver to "BlueFly Vario". At this point you might need to close and restart, perhaps reboot the device, maybe use the reconnect feature. It was a bit fiddly for me the first time around. For me now, the BlueFlyVario connection to XCSoar seems pretty robust and happens automatically. 
  • You might like to switch a few of the info boxes around. The Vario Trace one is handy to get good feedback from testing. Don't forget that to get the Barometric Altitude working you need to set QNH.
  • You might like to turn on the Audio Vario gauge.
  • You might like to change the "Look" by setting the InfoBox geometry to one that includes the  word Vario in it. 

An example of what the setup should look like.
How you could configure the screen to included extra data from the BlueFlyVario.
A todo in the XCSoar code is to do something with the BlueFlyVario battery status that is sent every ten seconds. I am not sure if that will end up being used. 

This does not mean I am going to give up on developing my BlueFlyVario android app. There are many things I still want to do with my app that I could not do easily in XCSoar. Additionally, my understanding of C magic is quite poor. I will stick with developing my stuff for Android in Java.