One of the most frequently asked questions in relation to our website concerns the map located at the bottom of the home page. Updated in real time (or almost), it shows the exact location of Jayana and all movements of the crew. Many ask how can we present this level of accuracy of our route?
Before dwelling into the technical details, I must admit that I have consulted a number of travel blogs to fuel our dream to go sailing. I particularly appreciated reading the travels of “La V’limeuse’ and a blog from “Thanks Larry!”. The latter was the trip of a geek who made his fortune around Larry Elison (Oracle) and went sailing abord the monohull equivalent of a Ferrari: a Swan. During my reading, I realized how ignorant I was about our planet, I had no idea where the places that were described in their stories were located. So I vowed that if I ever created a travel blog, I would provide a mean to locate where the stories happening on the planet!
A year before the leaving, I began to investigate the various options that exist to present a map on a blog. In sum, I have found nothing that satisfied my technical criteria (real time updating) and aesthetic. I therefore had to create my solution from scratch. After designing the schematics for what I wanted, I started looking for each component of my system.
1. Satellites data (GPS)
The first step is to get GPS points at regular intervals. The most reliable and least expensive solution proved to be a Spot Trace, which can send the location of a device every 5 minutes, for a purchase price of $ 150 and an annual plan of $100. Although the system works very well, the data is stored on their servers for only a week. After they are deleted forever! I had to find a way to archive this…
2. Archive data on the Cloud
In my research, I came across a young company (at the time), named CartoDB. Their corporate mission is to present data on maps. Excellent! And in addition, they offered a free plan for 256 GB of data. Wow! Now, how to link CartoDB services Spot? Fortunately, these offer an API that allows to check the data sent from the satellite and a very charitable Finnish published his scripts to interface the two systems on GitHub. The Jayana system therefore depends in part on his work. One of my home computers execute a script every 12 minutes to read the GPS data available on the Spot site and archive on CartoDB.
3. Presentation
I’m not a big fan of Google Maps for maps to display geographic information. They are used everywhere and their graphic style is poor. Fortunately, a company differentiates itself by offering stylized maps that can be used anywhere, even with CartoDB. This is MapBox, who also offer a free account for the common man. So I use one of their free maps, the privateers and pirates …
The red line and greenish animation of our movements is achieved using the features offered by CartoDB.
4. Adding a second data source
During our trip to Central America, our Spot Trace stopped working. So I found myself manually enter GPS points to maintain the current map. It was not so long (about 10 minutes per day), but I do not like manual procedures. I started looking for an alternative and I came across Trails. It is an application on iOS that records our course (car, bike, foot, etc.) and can export a GPX file. The files products usually comprise 3,000 points per day, which is too much for the level of accuracy that I need. I have to treat the GPX file to reduce it to about 300 points / day. I use the Adze application for this task.
Lorsque le fichier est prêt, j’utilise un script Automator que j’ai créé et qui téléverse les données directement dans CartoDB.
Conclusion
The system used in our the blog to display the boat’s position has three important parts. The first collection of GPS data is done automatically by a Spot Trace, or the Trails app on iPhone. The data is then prepared and sent in CartoDB to be archived using PHP scripts. Finally, through CartoDB and MapBox, the data appears on a map in the blog Jayana, as an old map of privateers. All, up-to-date every 12 minutes (in the case of spot), or manually (in the case of Tracks). The system works very well and is particularly appreciated by our relatives when Jayana made long voyages …