RISC OS Software RISC OS
http://www.svrsig.org/ software/SatNav.htm

SatNav

This GPS utility for RISC OS broadcasts GPS location data to other applications such as mapping software.

The latest version is 1.85 (30-Sep-2017) which can be seen below controlling a Witty Pi 2, a PaPiRus e-ink display, an OLED display and a GPS module.

Further reading

For further reading see Archive Magazine Volume 24 No. 2 October 2016 (page 11) and Volume 24 No. 3 April 2017 (page 21) or see here

Requirements

Clearly a GPS module is required. Connecting the GPS module to the 40-pin header is the simplest way to proceed. This allows the on-board UART to receive the serial data from the module. In ROMS from 26 October 2016 onwards, there is a Serial module in the Raspberry Pi rom, all other platforms have had this for some time.

It is possible to connect certain displays to the IIC bus and for them to be controlled by SatNav. These can be used in place of or as a supplement to the normal HDMI display. 16 characters by 2 lines LCD displays and 128x64 SSD1306 OLED displays are supported. If not present then the relevant routines are suppressed.

Another type of display is also supported, a 2″ PaPiRus Zero electronic ink display: this needs to be connected in a special way, requiring a breakout board or cable wired up so that pins 8 and 10 on the display are connected to pins 29 and 31 respectively so that the serial data on pins 8 and 10 remain unaffected, see below. If such a display is not connected then the line in !Run which ensures that the PiSPI module is running should be commented out (add a '|' to the start of the relevant line).

This utility provides a means of receiving and interpreting satellite GPS data - it displays the current location and direction of travel via its icon bar icon and (optionally) via a simple status window. At regular intervals (1s, 2s, 5s or 10s), once a fix has been obtained, it broadcasts a message giving the latitude and longitude of the current location.

Any application that understands a 'geo:' URI dispatch (for example RiscOSM) can make use of these data to do something relevant (for example to display a map showing your current location). RiscOSM will also respond to Wimp messages using a defined protocol, which is more elegant. An arrangement of !SatNav and !RiscOSM with an attached GPS module can operate with no user intervention. An example is shown below:

A more primitive device, with no screen but with a 16x2 text display is shown below where time (with a flashing colon), speed (both instantaneous and, in brackets) averaged over the last few fixes) and grid reference are shown. This is battery powered with an approximate drain of 100mA and a battery capcity of 5200mAh it should last for a day or two:

A status window may be displayed at any time showing the satellites in view, altitude, ground speed etc. and lists the satellites being tracked. The status window may be saved as a Draw file, example below:

Version 1.65 of SatNav now supports LCD text displays, an OLED display, a PaPiRus Zero 2″ display and a Witty Pi 2. Below it is shown ‘time slicing’ to reduce power consumption.

The computer shown above is a Pi model A+ 512Mbyte computer, with a Witty Pi just above in the stack, with a ProtoPal breakout board above that, onto which has been soldered an OLED display and a GPS module, finally the PaPiRus Zero display is on the top of the stack. Turning on for 15s or so every 5 minutes cuts average power consumption down to about 16mA, extending battery lifetime with a 5000mAh battery to about 12 days.

A stored route (held in an Anquet Export Format '.AEF' file - RISC OS filetype 'AnqExp' type &A6F) may be played back as if the route was being retraced with GPS location data reflecting the progress along the path. No actual satellite data (altitude, etc.) will be available. This allows RiscOSM to follow a previously traced path and show a rolling map. An example showing the East Coast Main Line from Kings Cross to Welwyn Garden City is shown below in an animated GIF:

Please note these images are copyright © OpenStreetMap contributors,