Thinking that it might be of interest to other sailors in the whole world, so I decided to translate this information into English, this is a rough translation, so please excuse my poor English! :-)
Weather forecast via SMS - Version 2!
"Far away from civilization" (more than 25-30 nautical miles from the coast), it is rarely possible to be able to obtain weather forecasts by VHF, the only possibilities to obtain this information by "grib" file or others are, either from have a satellite connection, or be equipped with a shortwave (SSB) transmitter / receiver with the appropriate radio license.
An interesting alternative is to use the Garmin InReach to send an SMS weather forecast request to a land-based server for selected geographic locations, no matter where you are on our (still) beautiful planet!
As the number of characters for an SMS, is limited to 160 (encoded on 7 bits) and in order to make the most of the little space available, all the numeric values which are usually in base 10, are converted to base 64 using the following characters "0123456789", "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ" and "& #", which considerably reduces the size of the data sent.
In order to further optimize the size, the latitude and longitude of the vessel (with 2 decimal places, which is more than sufficient) are multiplied by 100 in order to save the decimal point and coded on 2 x 3 characters in base 64 but then all the other geographical locations are “offsets” based on the coordinates of the boat and therefore coded on only 2 x 2 characters. The same method was used for other data when possible.
As the messages are encoded in base 64, they are therefore not understandable to the naked eye, so the following small applications can be used to encode and decode them:
The "SMS encoding" application
As its name suggests, this application allows you to enter data for the weather request and encode the request text that you just need to copy / paste to send to the SMS server via InReach or via a cellphone if there is network. The definition of locations around the vessel can be done automatically with respect to its current location, heading (followed or desired), distance and angle, or, manually by defining the desired locations.
It is possible to modify the way in which the locations are calculated by modifying the “distance factor” which makes it possible to obtain a decreasing distance from the heading towards the rear of the boat (at 180°). To better understand, below is a graphic representation showing the boat (following a heading of 135°) and the end of the lines representing the locations calculated with an angle of 30° and a distance N.
Effects of the distance factor
On the left with a factor <0.0> indicating that all locations around the boat are at equal distances, in the middle with a factor of <0.5> (in my opinion the ideal configuration) and on the right with a factor of < 1.0>.
Then simply copy / paste the text to the EarthMate application which is connected to InReach via Bluetooth to send the request to the server number. The application also generates a Map Source file (.ms) so that you can easily view the calculated locations in Guru Maps.
Here is the result of the calculations of locations at 40 and 80 nautical miles (in the direction of the given heading (here 315°) with a diminished distance towards the rear) separated by an angle of 45°, with respect to the current location being [-56.69, -67.61]:Results for a distance of 40 NM
The "SMS Server" application
This application running on shore, allows the user to obtain the weather information but the requester being possibly at thousands of kilometers does not have to care about it.
On the smartphone side (located on shore with an Internet connection), the SMS request is received, the application decodes it and transforms the data into 16 different requests (one per geographic location) sent to the stormglass.io website. Then, the application extracts the required data for each requested location and transforms it, in this case, into 6 messages of 160 characters or less for the last one, with the weather forecast of the requested times (in this example 12h and 18h) based on the present time. All dates and times data are in UTC.
In the event that the SMS arrives out of order, it does happen, each message is preceded by a 2-digit number, the first digit being the message number and the second the total number of messages.
Finally, the messages are sent back to the number that made the request (the Garmin InReach or a cellphone). It's simple and inexpensive!
This application must be installed on shore on an Android smartphone (with internet connection), it must be switched on 24 hours a day, 7 days a week and connected to the mains since it will have to react at any time to weather requests sent by SMS from one or more users. It would be better if someone could restart it if necessary.
In order for the application to obtain weather information from stormglass.io, all you have to do is register for free in order to receive an access key, this allows the "SMS Server" to execute 50 requests per day (one request per location independent of the desired number of hours with a maximum of 240), for more requests / day, you have to pay but in my opinion it is more than enough for one or two ships! the available weather forecasts come from different meteorological institutes around the world (Météo-France, DWD, NOAA, UK MetOffice ...), see sources and description of the API.
See a .
Numbers in base 64
All values in the SMS are converted into base 64 (signed or unsigned).
Requested forecast values
There is the possibility to choose values, the more values requested, the more space is needed! The requested forecast value is coded on 3 chars, the relevant bit must be set for each requested value.
Forecast request coding
Format of the SMS content sent from « SMS Coding » to the « SMS Server ». The "#" char represents one char coded into base 64.
Forecast request decoding
Format of the SMS content sent from the « SMS Server » to the requester (« SMS decode »). The "#" char represents one char coded into base 64.
The full weather forecast information is in the following format but if the data is longer than 160 chars then the data is divided into packets of 158 chars and numbered with 2 chars (SMS number and Total number of SMS) at the beginning of each SMS.
Header for each received SMS
Data format without information of SMS number and Total number of SMS
The "SMS decoding" application
This application allows you to decode and view the information received from the server. To do this, simply copy / paste the messages received (separated by [ENTER]) in the field provided for this purpose and press [DECODE]. All the weather information is then displayed for each location and each time interval.
In this example, the server sent 6 SMS to encode all the information concerning these 16 locations. At the start of the first SMS, the number of forecast hours is encoded in two characters with the following information for each location and for each requested time:
The example showed how to get a weather forecast for 16 locations at 2 different time intervals but nothing prevents to make a request for more (or less) points with more or less information, other time intervals ( maximum forecast at 240h) and other angles multiple of 360 (10°, 15°, 20°, 30°, 40°, 45° ...).
On a sailboat, obtaining good weather information is essential but good visualization of this data considerably enriches the information received, in particular with regard to winds and currents.
Viewing KML files under Google Earth is good if you have a computer (Mac or PC) with an internet connection. After looking for other possibilities, I found the free application Guru Maps (for Android and IOS) which allows among other things to visualize the whole world with offline maps (ie working without connection internet) and insert vector overlays with Map Source files (.ms) based on ".geojson" and ".mapcss" files.
So the application exports these files and here is the result in the following screenshot:
In blue, pressure, direction and speed of the current, direction of the swell, height and period of the waves.
In black, time stamp, visibility, cloud cover, air and water temperature, wind direction and speed (gusts).
All this may seem complicated but it really is not because after entering the desired parameters in the “SMS encoding” app, which only takes a few seconds, all you have to do is copy / paste the coded request to the app EarthMate for InReach to send to the server. After a few minutes, the SMS (s) containing the requested forecasts arrive on EarthMate and you just have to copy / paste them to the “SMS decoding” app to read the content.
With the Garmin InReach which works worldwide (because using the Iridium system) for a fairly reasonable price, around 350 € for the InReach mini and an acceptable monthly fee of 59.99 € with an annual contract, it is still expensive but the advantage is to benefit from unlimited two-way text messaging (SMS) in order to be able to communicate with relatives, to be able to locate the Inreach at any time on the EXPLORE website as well as additional security with SOS coverage from GEOS, all of this can be used all over the world!
The few tests I have done with the InReach are positive and everything seems to be working perfectly. After having launched a request with 8 locations and 2 hours of forecast, the first 2 SMSs arrived after approximately 5 minutes, the last SMS arrived approximately twenty minutes later, it is not very fast but largely sufficient, I guess this is due to the location of the satellites.
All this requires a few steps but it works and above all, it is "tailor-made" and it does not cost too much! It is obvious that the use of "grib" files is more comfortable and richer in information, but at a much higher cost.
I therefore intend to use this system to obtain the weather forecast. My departure is only scheduled for summer 2021 (delayed due to the pandemic and for other reasons).
All these applications run on Android, I also created these 2 applications ("SMS encoding" and "SMS decoding") for IOS but as I did not put them on the AppStore, I can only provide the source. just compile with Xcode.
Software design takes a lot of work, it starts with the general idea followed by design, programming and then the testing phase. So I did my best for the realization but it is in use that we almost always discover errors (bugs). So if you are using these few apps, please let me know about any issues.
For those who are interested, below is the source code of all these applications as well as the executables (only for Android). In the event of a problem (bug) or for more information, use "Contact" at the bottom of this page.
Apple allows you to create apps for OS-X and IOS with Xcode but unfortunately they also included a rather annoying limitation, unless you have a paid annual developer account, apps installed using an Apple ID expire at after seven days :-(
SMS encoding application
Choosing data for the query
L'application « Serveur SMS » après la réception d'une requête
Display of data received on "SMS decoding"
Details of the information displayed under "Guru Maps"
Implementation and use
First of all, you have to install the "SMS Server" application on an Android cellphone which must have an activated SIM card (in order to be able to receive and send SMS) and be somewhere on a terrestrial location with an internet connection, this device must stay on 24/24 and 7/7 therefore connected to the mains in order to be able to respond to requests. It is therefore necessary to install the “smsServer.apk” file available on Source code and executables for Android. When this application is launched for the first time, you will need to copy / paste the access key which you can obtain for free by registering on stormglass.io. Voilà, That's it for the server part!
To be able to send a weather request to your server, it is necessary to encode it using the "SMS encoding" application, for this, simply install the "sms-coding.apk" file available on Source code and executables for Android. Enter the desired parameters and select [AUTOMATIC POSITION CALCULATION] or [DATA ENCODING], copy the text (SMS content) starting with "FRQST". Then paste this text into the application EarthMate to send your request using the Garmin InReach or onto the SMS application if you have network and finally send your message to the server number.
If all goes well, after a few moments you should receive one or more SMS from the server in response to your request. In order to be able to decode this or these messages, you will have to install the application "SMS decoding" also available on Source code and executables for Android.
If you use these applications and have any questions or possible improvements, please contact me using the Contact form.