GPS is one of the most widely used techniques for geolocation. There are a lot of commercial GPS tracking and reporting devices that are available in the market like the Xexun 10X series, Garmin GPS Devices and lots of other open source devices like GPS Cookie and GPS Sandwich. GPS is a satellite based navigation system which accurately positions a person. These tracking devices generally have 2 functionalities STORE and STREAM.
The STORE stores the NMEA GPS data onto the SD Card / storage device present on the device. This information can later be visualized or converted into a specific format as the NMEA.txt call does on the loklak server. The STREAM service takes the data and uses a GPRS mode of communication to send the NMEA Sentences to the designated server to which it has been configured. There has to be a node listening on the port so that the devices can stream the information to that port, or it can stream to a specific URL and Loklak can use the stream=
in its GET request to make the required conversions into visualizer data so that the NMEA Sentences can be visualized.
A sample NMEA sentence looks as follows
Making a query on the given stream of such sentences on loklak returns a response as follows
Some devices give only a few variables in the sentence whereas some provide even information such as direction , heading and velocity. Hence there’s a need for handling multiple types of sentences in the NMEA Parsers. This is done by implementing an overloaded function parse() in the NMEAServlet which works as follows
For a new NMEA Sentence format for example XXXXX We need to add a few lines to enhance the parser as follows by using the SentenceParser interfaces.
This is a great milestone for loklak because it now supports IOT devices to stream to it and has the required conversion logic which converts the Sentence streams/logs into the requires JSON format so that it can be visualized. The NMEA Visualizer is coming soon where you can enter a stream URL or attach a log and it performs the required operations.
Cheers !