Spedmo Javascript Vario API

The Spedmo Javascript Vario API is built using standard web functionality and as a result all the standard features available with Javascript and modern browsers are available to pilots and developers, without restriction, in addition to the specific Spedmo Vario objects which are listed below.

There are many web and JavaScript tutorials available on the web for new developers, this API document doesn't intend to teach developers how to program but defines the specific objects which are available for building customised Vario displays for Android and IOS devices.

Understanding the Spedmo App dependency

The Spedmo Javascript Vario API uses a customised application build which is is available on both Android and IOS platforms. This application has customised functionality which can negotiate calls to predefined BLE varios via the application. As we get our hands on more devices the range of supported varios will increase over time however the main advantage for developers is that the hard work of programming directly to BLE devices as been simplified to reduce the programming complexity and allow pilots to focus specifically on the display functionality. The Spedmo App returns simplified Javascript events to the developer which can be used to prompt for display refreshes or user interaction. This is the fundamental concept behind the framework that should be understood before any development is started.

Developers can manage their app functionality and versions via the Spedmo App Manager and we recommend utilising the GitHub test harness for building functionality offline before uploading test version.

Javascript Dependencies

Not all Javascript dependencies are listed here but the main dependency for developers to be aware of is the use of Jquery.

Jquery is the mandatory base Javascript library which is used for all Spedmo BLE object calls and won't be removed anytime soon. Other frameworks such as React/Angular etc. are theoretically available for developers to use however there is no documentation or support offered for this frameworks beyond what is already publicly available on any online forums.

Javascript BLE Objects

Base Object


The base object which should be defined on all renditions of a page is the $.spedmo object. This object should never be undefined, if it is debugging the root cause would most likely reveal a Developer introduced issue that would need to be resolved before publishing the application. If a non-developer cause bug is suspected feel free to raise a bug on the Spedmo Github Sample Project for investigation.

BLE Ready Event


This event is called when the Spedmo App has successfully negotiated with the pilots BLE vario. Developers should assume that when this event is called the BLE device is transmitting useful data and this should generally be where the initial screen layout is built for user display as well as any event hooks that need to be established.

BLE Raw Line Feed Event


This is a low level device event that is fired when data is sent from the BLE device and it is passed directly to the Developers application with no parsing or filtering of any kind. This may be useful for writing specific device features or support for functions not yet supported by the Javascript Vario API.

BLE GPS Update Event


This event is fired when a GPS update has been passed from the BLE device. A state object is passed which is built using the GPS.js library and has the following format.

  • time: Current time
  • lat: Latitude
  • lon: Longitude
  • alt: Altitude (Not to be confused with Vario Altitude)
  • satsActive: Array of active satellites
  • speed: Speed over ground in km/h
  • track: Track in degrees
  • satsVisible: Array of all visible satellites

BLE Altitude Update Event


This event is fired when a altitude update has been received from the BLE device. An altitude object is passed which has the following format.

  • loggerStored : logger stored (Y/N)
  • iasKph : IAS (km/h)
  • baroAltitudeM : baroaltitude (m)
  • varioChangeMs1 : vario (m/s) (last 6 measurements in last second)
  • varioChangeMs2 : vario (m/s) (last 6 measurements in last second)
  • varioChangeMs3 : vario (m/s) (last 6 measurements in last second)
  • varioChangeMs4 : vario (m/s) (last 6 measurements in last second)
  • varioChangeMs5 : vario (m/s) (last 6 measurements in last second)
  • varioChangeMs6 : vario (m/s) (last 6 measurements in last second)
  • heading : heading
  • windCourseDeg : Wind Course (deg)
  • windSpeedKph : Wind Speed (km/h)