Position Reporting – Acquiring and Sharing Data

There are many position reporting options available via SailMail. One that we particularly like is SailBlogs, for more info click here.  The purpose of this page is to how to get position and sailing data into Airmail, and optionally make it available to other applications.

Data can be acquired in a number of ways: Directly from a GPS, or combined with sailing data (wind speed, etc) via an integrated instrument system, or combined with AIS data, or sent from a communications device (e.g. the Iridium GO!). Data can be sent via serial connections to COM ports, or via wired or wireless network connections either via TCP or UDP. Many choices, and much confusion which will be addressed below.

Types of data: The most important data for position reporting is the lat-lon position from a GPS, along with course and speed over ground (COG/SOG). Weather data is often useful to include, for example wind speed and direction from an instrument system. AIS data is not useful for position-reporting but may be combined with GPS data.

Sources of data: For boats equipped with an integrated instrument system, a single connection can provide all of the data needed. Often, however, multiple connections are needed with one connection for GPS data, a second to make wind data available for position reporting, another for AIS data for a charting program. Most software applications (including Airmail) can accept multiple inputs, but multiplexers often make sense to combine multiple data sources into a single stream for distribution to multiple applications.

Data formats: NMEA-0183 has been the standard for decades for position and sailing data, and is still supported by virtually all equipment and applications. NMEA-2000 is also available from most newer equipment, in addition to NMEA-0183. Multiplexers are available which can provide format conversion.

Connection types: The oldest standard is NMEA-0183. This is a wired connection using shielded twisted-pair serial cable with a 4800 baud RS-422 balanced connection. This is a combination that provides reliable communications and minimal RF interference (but don’t forget the shield).

Each output (“talker” in NMEA-0183 parlance) can be connected to a number of inputs (“listeners”), for example a GPS output can be connected to a computer for chart display, an instrument system, a VHF or HF/SSB radio for DSC and distress calling, radar for waypoint display, etc.  However each of these inputs can only “listen” to a single “talker”. For example a charting program input from a GPS cannot also connect to an AIS unit, because those are both NMEA “talkers”.

A NMEA-0183 connection can generally be cross-connected to a RS-232 computer connection. Many manufacturers recommend against this but in practice it works fine in most cases. And for AIS data, a 38400 baud NMEA connection is used to accommodate the higher data rate.

An alternative to serial connections is a wired or wireless network connection. Network communications can either be TCP, where two devices connect to each other with a “handshake” protocol and can exchange data both ways, or UDP where one device sends data to another device (one or many) without any handshake or acknowledgement. UDP most closely duplicates a traditional wired NMEA-0183 connection but can run into problems particularly over WiFi networks. A more robust alternative is a TCP connection, basically a one-to-one connection but many applications (including Airmail) can operate as a TCP server and can handle multiple connections.

Some examples: As we said, lots of options so let’s explore some specific situations. The ultimate goal here is to get data into Airmail for position reporting, but you will almost certainly want the same data available to a charting program. A GPS and/or instrument system will have a NMEA-0183 output acting as a “talker”, but remember that each “listener” (including computer serial ports) can only connect to one “talker”. Additionally, computer COM ports cannot be shared between different applications.

The simplest setup would be a 4800-baud connection from the GPS (or instrument system) NMEA-0183 output to an available COM-port on the computer– either a physical 9-pin serial port or a USB/serial adapter. To feed GPS data to both Airmail and a charting program, the GPS output could be connected to two different COM ports, one for each application. However Airmail can share data, as can many charting programs.

For a charting program which can share data (including OpenCPN, Coastal Explorer, and likely others), it makes the most sense to connect the data sources– GPS, instruments, AIS– to the charting program and then configure the chart program to share the data via UDP.

To set this up in OpenCPN, click the settings button and then select the Connection tab. Configure the GPS and other data inputs per the OpenCPN documentations, for example (below) a serial connection for COM4 for GPS data.

To share this data from OpenCPN, add another connection, select “Network” and then “UDP”. The address will be, leave this for a UDP “broadcast” (to any device on the network). Enter a UDP port#, 10110 is a port reserved for NMEA data but this can be any port not already in use (it is best to stick to numbers over 5000). Then UN-check “input” and check “Output on this port”, and click “Apply”. Verify that the output port was added, it is sometimes necessary to close and re-open OpenCPN’s setting window to see changes.

To set this up in Airmail, open the Position Report window (from Airmail’s Window menu), find “Data input” near the bottom and click on the “Setup” button. This opens a Data-Input Window. At the top click “settings” or “advanced settings” and enter the same UDP port. Either enter “U10110” in the COM-port box or (for newer Airmail versions) select “UDP input” and enter “10110”. Click “Hide”, and if data is being sent from the NMEA-0183 device and OpenCPN then it will be displayed in Airmail’s Pos-Report window.

Alternately, a GPS output can be connected to the “GPS” input of a newer-model SCS Pactor modem, using the small green GPS terminal-block on the back of the modem. The modem must be powered on of course. To enable this input, check the box for “PTC-IIusb data input” (or whichever modem type is selected).

If Airmail has the direct data connection then this can be shared via the “broadcast” settings on the Data-Input window. Output can be via COM-port, via UDP (broadcast or to a specific device), or via TCP with Airmail acting as a TCP server, any combination.