Sunday, 25 July 2021

Bluefly IGC Validation

Six weeks ago I released a new model of the Bluefly with onboard GPS and IGC recording. The BlueFlyVario_Bluetooth_GPS_IGC_v12.3 has been more popular than I first thought. Today I am pleased to announce the BlueFly IGC files can be validated with GpsDump (Version 5.40), so you can use it as a backup for competitions that require validated IGC files. 

What is IGC File Validation?

It would be possible for a pilot to create a fake IGC file for competitions or records. Signing the file with a G-Record is designed to prevent this. Nothing is 100% secure, but the signing mechansim prevents casual tampering except by really determined highly technical hackers. Of course, faking an IGC file would be silly, but some people worry about it. 

The original IGC spec by the FAI requires a pretty sophisticated mechanism for signing IGC files, based on individual device serial number and public key encryption. Some high end devices implement this spec, but they are pretty much limited to use on sailplanes. 

A more relaxed version of the specification is produced by FAI CIVL for Hang Gliding and Paragliding use. This is what has now been implemented on the Bluefly and this new model has been submitted for approval by CIVL. In addition, the developer of GPSDump has implemented Bluefly IGC download and validation and that can be used right now for uploading your IGC files to online competitions.

You can read a lot more about IGC files and CIVL here

GpsDump and the Bluefly (XGD)

GpsDump is one of the most widely used programs for downloading IGC files from flight instruments. Stein has been very kind to implement the Bluefly IGC download protocol and validate the Bluefly G-Record. Once the data is in GpsDump it can then be saved as a GpsDump signed IGC file, which is widely supported by competitions and online validators. After you have your Bluefly successfully installed as a COM port, the first step is to read the list of files from the Bluefly. 

The list of IGC files on the Bluefly is then like this. Note that the duration is approximate only. 


Once the file is downloaded you can then 'Save IGC file made by GpsDump' and add a few details if you like. The GpsDump saved file is re-signed and can then be used by any competition that uses GpsDump files, which I think is almost all of them. 

Bluefly Validation (VBF)

The G-Record signing in the Bluefly can also be used to directly validate the files you have downloaded using the BFVDesktop application. See the release blog post for information on how to download the files directly. The IGC files on the Bluefly use the three letter code VBF in anticipation of this code being compliant with the specification (this may change to XBF in the future). 

To validate files from the Bluefly that you have downloaded directly using the BFVDesktop application you will need the validation program vali-vbf.exe. Use it from the command line like:

>vali-vbf.exe filename.igc

Please note that you will need firmware version 12.529 or later on your BlueFlyVario_Bluetooth_GPS_IGC for the Bluefly IGC validation to work. There were only a few copies of this new model sent out with an earlier version of the firmware. If you do not have 12.529 or later please contact me and I will help you update it.  























    Friday, 11 June 2021

    BlueFlyVario_Bluetooth_GPS_IGC_v12.3 released

    The BlueFlyVario_Bluetooth_GPS_IGC_v12.3 is ready for release. This model was developed following requests from many pilots who wanted to add a GPS and IGC tracklog recording to the Bluetooth_USB model.  

    The motivation was to integrate the GPS on to the main board instead of using an add-on. The GPS add-on released a few years ago worked well, but it was a lot of messing around for those pilots that just wanted a vario with GPS. I took advantage of the opportunity to add a memory chip to add IGC tracklog recording. The new model utilizes many of the same components and code from the other v12 models, with a redesigned the PCB layout to fit in the translucent blue case. This was harder than expected and the design process has taken well over a year through many prototype iterations. The new vario is available now and is shipped fully assembled and ready for pilots to enjoy. I am pleased that the GPS antenna is flush with the top of the case. By using the same acrylic button recently released on the Bluetooth_USB_v12.3 model I was able to keep the profile pretty clean. 

    Features

    The BlueFlyVario_Bluetooth_GPS_IGC_v12.3 has a combination of features that complement the other Bluefly models, including:

    • Reliable vario sensitivity and audio performance of the other v12 models - it beeps when you go up in the way that pilots love. 
    • The same Bluetooth and USB interface as the Bluetooth_USB model for data output and adjusting settings. You can adjust all of the same settings, plus a few new ones.   
    • The XA1110 GPS from the TTL_GPS model: 
      • Better time-to-first-fix than other models through improved PCB layout. 
      • Uses battery backup for super fast subsequent fixes on the same day in a similar location. 
      • Operates at 1 second intervals, although with some tinkering can be set to operate at higher intervals. 
    • Reliable serial flash memory for storing about 60 hours of flight time at 1 second intervals. 
      • If the vario is on and the GPS has a 3D fix then IGC recording will start. 
      • Recording continues until the vario is shut down.
    • LED's for indicating status: 
      • Orange: 1 second flashing = 3D fix
      • Blue: Single flash = bluetooth scanning; Double flash = connection. 
      • Red: Charging.
      • Green: Button press, Lift and other indications as described in the manual. 
    • Battery life of about eight hours.
    What is in the box?

    The BlueFlyVario_Bluetooth_GPS_IGC_v12.3 is shipped fully assembled and ready to use. A sticky velcro patch is included to allow mounting it to your flight deck. 

    Typical Use

    This model is designed for stand alone use, or for connecting to a smartphone. Follow these quickstart steps to begin:

    Step 1 - Charging. To begin, find a MicroUSB cable and charge the vario. Any phone charger that provides 5V can be used, or even a computer USB port. The red LED should come on, then turn off when the vario is fully charged. A full charge will take about two or three hours. 

    Step 2 - Turn it on. A short single press will turn on the vario. The button, beeps and lights are described in more detail here. Move the vario from your feet to above your head to simulate lift and hear the beeping as it rises.

    Step 3 - Connect to a PC (optional). Download the BFVDesktop application from the software page of the website. Using a USB cable connect the vario to your PC and see the settings. Read the hardware settings manual for a more detailed description of this settings (although note that the manual is not yet updated with the IGC settings described below). 

    Step 4 - Connect to an app. We will use XCTrack. This is a popular app among paraglider pilots and works well with the Bluefly. Do the following:
    • Install XCTrack on your android device by searching for it in Google play. 
    • Restart the vario (long press to shut it down, then short press to start it up). This ensures that the bluetooth module is ready to go. 
    • In your android device settings pair the Bluefly as a bluetooth device. The name will be 'Bluefly-ABCD'. 
    • Open XCTrack and drag down to see the menu. Click Preferences|'Connection & Sensors'|'External sensor' then select the Bluefly you paired with in the previous step. If you select the wrong one select "None", then try again. 
    • If you want, choose 'Use external GPS' to allow XCTrack to use the GPS information from the Bluefly instead of using the internal android GPS. This is useful on old devices with unreliable GPS, or on android e-readers that do not have a GPS. 
    • At the bottom of this menu click 'Calibrate' to see pressure data streaming in from the Bluefly. There is no need to adjust the default XCTrack calibration settings here. 
    • Go back to the main display and you should see the GPS and Bluetooth icon indicating a connection. To test, shut the Bluefly down, and see the disconnected message, then start it up again and see the reconnection messages. 
    IGC Tracklogs

    This is the first Bluefly model which incorporates a memory for recording IGC tracklogs from GPS fixes, and there are some new settings which control how it happens. When the vario is on and the GPS has a valid GPS fix then tracklog recording will start. This means you will always get a backup record without having to rely on your flight software trying to interpret when a flight started or stopped. 

    IGC Format. The IGC files produced work well with online logging programs and visualization software, but at this stage the firmware does not add a signed G-record required in some high level competitions. In other respects, the IGC file structure follows the recommendations in the FAI sporting code for HPG instruments

    Memory Structure. IGC files are stored on a NOR Flash memory chip soldered to the Bluefly circuit board with a SPI interface to the processor. This is a low profile component and provides 64Mbit of raw memory storage. I had initially envisaged that a standard file system structure would be used, with a mass storage device interface. However, this is not possible with the current Bluefly processer and is something to think about for future Bluefly models. So, for this model, the Bluefly firmware uses a custom memory structure for recording file information. A simplified description of the memory structure is:

    • The NOR Flash Memory chip is structured in 2048 sectors which are 4096 bytes in size. 
    • Each file starts in a fresh sector. When recording starts a file data header consisting of the file name, the start sector, and the file number is written to the first few bytes of the sector. The file name is based on the date and time received from the GPS (note that this is the UTC time). 
    • Next, the IGC header information is written (A record and H records). 
    • Next, B records are written as GPS information is recorded. 
    • When the end of the sector is reached, the same file data header is written to the following sector, then recording continues. This means that every sector with IGC data also has a file data header.
    • When the Bluefly is shut down the file is closed, and the location of the next sector is stored in the Bluefly memory. 
    • The next file is written in the same way. When all of the sectors are full (after about 60 hours of recording at 1 second intervals), the memory wraps around and the sector pointer sets to 0. In this way there is a continuous record of the last 60 hours of flight time, although the oldest file will be incomplete if the memory is full. 
    User Interface. The BFVDesktop application (version 0.8) has been updated with the new settings and functionality to download IGC files. The screenshot below shows the new settings:
    • gpsLogInterval has been changed in this model to control how often track points are recorded. The GPS outputs $GNRMC messages once a second (by default), and if gpsLogInterval is set to 1 then each of these messages is formatted to a B record and saved to the IGC memory. If it is set to 2, then every second point is recorded, and so on. 
    • igcSectorNumber is the next memory sector that will be used. There is no need to change this for anything other than developmental reasons. 
    • igcFileNumber is the number stored in the data file header. Again, there is no need to change this. 
    • pilotName is the name stored in the IGC file H record. I am not sure who really cares about this, but it might be important if there is a G record in the future. 
    When the vario is connected if you press on the IGC button in the Hardware Commands section of the interface it will pop up the BFV IGC File Downloader window shown below:
    • When the window opens a command is sent to the Bluefly to poll each sector for a file data headers the list of files is build. Press Refresh to poll the memory again. 
    • The file name incorporates the data and time that recording of that file commenced. The file number can be ignored for most purposes. The start sector is where the files starts in memory. And the number of sectors gives you an indication of the size of the file (each sector stores about 110 records at 1 second intervals). In the example below, 11 sectors is about 20 minutes of recording. 
    • Highlight the file you want and press Download to save it. You can change the save location by using Select Save Directory. 
    • You can Format the entire IGC memory, deleting everything, and setting the start sector back to 0. 

    Future Development

    I am always tinkering. It may be time to change to a new processor, add new features, try to drive down the price, and so on... However, time is always hard to find. Let me know your thoughts. 



    Monday, 5 April 2021

    BlueFlyVario_Bluetooth_USB_v12.3 released

    The BlueFlyVario_Bluetooth_USB_v12.3 is another minor update to the previous version released a few years ago - the Bluefly has a new button! 

    Please read this post in conjunction with the release post for the BlueFlyVario_Bluetooth_USB_v12 and the release post for the BlueFlyVario_Bluetooth_USB_v12.2 to understand the changes.

    The new button

    One of the most frustrating part of electronic design is getting the physical user interface right - the case, usb connector, lights, and button. I have experimented with a few different buttons in the Bluefly project. The trick is to find the right balance between usability (including with gloves), avoiding accidental presses, cost, reliability of component supply and appearance. The button on previous versions met most of these requirements, however some pilots found that it was pressed accidently too often. 

    The new button is a lower profile 4x4x1.5mm smd tact switch that is actuated with a machined acrylic part. The button hole in the translucent blue case is machined to 6mm diameter to fit. It costs a bit more, and I need to machine the acrylic myself, but I have found it to be much more pleasant to use. It was tested with competition pilots earlier this year and I am now happy to release it as the default Bluefly button. 

    For those pilots that have followed the Bluefly journey since the beginning, the clear acrylic button might make you think fondly of the first sandwich case released with version 0.5b



    What is in the bag?

    For self assembly, the v12.3 model of the BlueFly is supplied with the following components:
    • The BlueFlyVario_Bluetooth_USB_v12 mainboard. There is a small piece of neoprene covering the pressure sensor; glued at one end to hold it in place (do not remove it)
    • The translucent blue case with four small screws (P1 screwdriver needed) and the machined acrylic button.
    • A 750 mAh single cell Lithium Polymer battery.


    Assembly

    Assembly is pretty simple and will take most people less than 5 minutes. However, if you would prefer not to touch a screwdriver, you can order the vario fully assembled.

    Step 1 - Initial Test

    Before you put the board in the case, plug in the battery, press the button, and make sure you can hear the vario beep. Also, plug in a microUSB charging cable and make sure the red LED comes on.

    Step 2 - Fit the button into the case

    The button should fit neatly into the case as shown in the image below. The machining looks a bit rough under the magnifying glass, but is neat at the surface that matters. You might feel the need to scrape of machine fragments of the case or button with your finger nail. Make sure the button can move easily in the hole. 


    Step 3 - Screw the board into the case 

    Place the board in the case ensuring that the USB connector is in the hole at the end. The USB edge of the PCB should be flush with the inside edge of the case. 

    The small self tapping M2.5x5mm P1 screws secure the board into the case. You really only need two screws on a diagonal, but there is no harm if your use all four. Don't drive the screws home to tightly or you will strip the stand-offs in the case. Just use enough pressure to ensure that the board is secure.

    Step 4 - Battery and close

    Plug in the battery and place it on the back of the PCB centrally between all four screws, making sure not to place it on the end of the screws. Then close the case. 

    Step 5 - Check charging works

    Plug in a microUSB cable to charge the vario. The red light should come on. Cables with longer tongues work better.  

    Step 6 - Velcro and/or lanyard (optional)

    Many pilots will put a small piece of velcro on the back of the vario to attach it to their flight deck (this is what I do). Others will drill some small holes in the case and attach a lanyard (I do not do this anymore). 

    Next Steps

    After install you probably want to connect to the BFVDesktop application to adjust settings, or connect to and Android or iOS device to experiment with different apps. See the software page for more information.