Aqua Map app, just like other apps on the boating market, is capable to connect to boat instrumentation and display the received information.
It is possible to get the GPS position received from an external GPS and use it instead of your device built-in GPS, display the depth value received from your sonar, display the compass direction and use it to orient your maps in the app, see the wind information received by the anemometer, see the AIS target received by your AIS device.
The achievements of this function are based on different technologies layered one upon the other and on standards defined along many years in different standardization organization.
With this article we want to offer those who are curious an overview of the technologies on which the function is based without claiming an exhaustive and in-depth technical discussion.
Step 1 - Devices must be visible to the app: the boat network and the WiFi Connection
First of all it is necessary that your devices are “connected” to the same network to be able to see each other and exchange data. Your tablet or smartPhone can connect to a WiFi access point of the network.
In the most used configuration the boat network has a WiFi Gateway that works as Wifi access point and transmits the information to the SmartPone/Tablet. It is also possible to have simpler configuration in which a single device like an AIS receiver, transmit directly its data over WiFi acting also as access point.
The connection can be established in the WiFi settings of the Tablet/SmartPhone (see an example below from an iPad Settings page)
The WiFi network must be the one offered by your boat network access point.
On the technical side, the IEEE 802.11 standard defines the protocols that enable communications with current Wi-Fi-enabled wireless devices, including wireless routers and wireless access points.
Wi-Fi stands for “wireless fidelity”. The technical birthplace of Wi-Fi is The Netherlands. In 1991, NCR-Corporation with AT&T Corporation invented the precursor to 802.11.The first version of the 802.11 pro-tocol was released in 1997, and provided up to 2 Mbit/s link speeds. In 1999, the WiFi-Alliance formed as a trade association to hold the Wi-Fi trademark under which most products are sold. Today you find every-where a WiFi hot spot and all smartphones have built in WiFi capability.
Step 2 - Devices must be able to transport data to the app: TCP/IP and UDP
The SmartPhone/Tablet and the getway or other device in the boat network must have a way to communicate each other, identify and start a data exchange.
When you want to create a connection in Aqua Map you need to define between a TCP or a UDP protocol. This selection informs the app of the kind of software library has to be used to connect to the device sending the information. TCP and UDP are part of the Internet protocol suite and define the way the devices “speak” each other to exchange the packages of data.
TCP and UDP protocols are part of the Transport Layer of the Internet Protocol suite. The layer establishes host-to-host connectivity in the form of end-to-end message transfer services that are independent of the underlying network and independent of the structure of user data and the logistics of exchanging information. Connectivity at the transport layer can be categorized as either connection-oriented, implemented in TCP, or connectionless, implemented in UDP.
The TCP protocol requires the indication of the IP address (e.g. 192.168.1.10) of the device to be connected and the port number (ID of the communication channel for the application), the TCP protocol is more robust and protected against transmission errors while the UPD protocol can suffer of error in communication and packages loss but can be faster in the communication and is more suited for application like streaming media (audio, video)
The Internet protocol suite is the conceptual model and set of communication protocols used in the Internet. It is commonly known as TCP/IP because the foundational protocols in the suite are the Transmission Control Protocol (TCP) and the Internet Protocol (IP). During its development, versions of it were known as the Department of Defense (DoD) model because the development of the networking method was funded by the United States Department of Defense through DARPA (Defense Advanced Research Projects Agency)
The Internet protocol suite provides end-to-end data communication specifying how data should be packetized, addressed, transmitted, routed, and received. The technical standards underlying the Internet protocol suite and its constituent protocols are maintained by the Internet Engineering Task Force (IETF).
The Internet protocol suite resulted from research and development conducted by the Defense Advanced Research Projects Agency in the late 1960s In 1975, a two-network TCP/IP communications test was performed between Stanford and University College London. In November 1977, a three-network TCP/IP test was conducted between sites in the US, the UK, and Norway. Several other TCP/IP prototypes were developed at multiple research centers between 1978 and 1983.
In March 1982, the US Department of Defense declared TCP/IP as the standard for all military computer networking
The spread of TCP/IP was fueled further in June 1989, when the University of California, Berkeley agreed to place the TCP/IP code developed for BSD Unix into the public domain.
Nowadays it is the standard for internet communications.
Step 3 - Sending and receiving meaningful information: NMEA 0183
Now that your Smartphone/Tablet is capable to connect to the access point and has a “language” to ex-change data with the sending device it has to have a way to transfer the stream of bytes received in meaningful information for the running (e.g. Aqua Map) application.
The application can rely on a “standard” used by all the boat instruments for sending data. This standard is the NMEA 0183.
NMEA 0183 is a combined electrical and data specification for communication between marine electronics such as echo sounder, sonars, anemometer, gyrocompass autopilot, GPS receivers and many other types of instruments. It has been defined by, and is controlled by, the National Marine Electronic Association. In leisure marine applications it is slowly being phased out in favor of the new NMEA 2000 standard, though system compliant with NMEA 2000 also send information in NMEA0183 strings.
The NMEA 0183 standard uses a simple ASCII, serial communications protocol that defines how data are transmitted in a "sentence" from one "talker" to multiple "listeners" at a time.
At the application layer, the standard also defines the contents of each sentence (message) type, so that all listeners (e.g. the App) can parse messages accurately.
The received stream of bytes is interpreted as a series of NMEA sentences like in the image below
Each device transmits different type of sentences all the sentences have te form
$PREFIX,data1,data2,…,dataN*checksum
The PREFIX is a word of in the form YYXXX
Where YY is the talker type, for example GP means the sentence is from a GPS device, while XXX is the type of sentence.
For example the RMC sentence gives the “Recommended Minimum Navigation Information”:
$GPRMC, 092750.000, A, 5321.6802, N, 00630.3372, W, 0.02, 31.66, 280511, , , A*43
The data provided as comma separated informations are:
- Time (UTC),
- Status,
- Latitude,
- N or S,
- longitude,
- E or W,
- Speed Over ground(Knots)
- Track Made Good (degrees true),
- Date, ddmmyy
- Magnetic variation, degrees
- E or W
- Status A - Data Valid, V - Data Invalid, FAA mode indicator (NMEA 2.3 and later)
Let’s see some other important sentence:
From GPS:
GGA - Global Positioning System Fix Data
GSV - Satellites in view
From Compass:
HDT - Heading, True
HDM - Heading, Magnetic
From AIS:
AIVDM & AIVDO - Automatic Information System (AIS)
From echo sounder:
DBT - Depth Below Transducer
DPT - Depth of Water
From anemometer:
MWD - Wind Direction & Speed
MWV - Wind Speed and Angle
Now we have all the pieces in place and the app can show the sensors data on your screen :)
It is truly impressive to think how many people, organizations and knowledge it took to build an easy-to-use function in our everyday products. We are very proud to make our small contribution to this story by using the results of all these efforts to serve our boaters.
Enrico Valle, Aqua Map team.