NMEA data logging to iPad or similar

Ric

Well-Known Member
Joined
8 Dec 2003
Messages
1,723
Visit site
My objective is to create a mathematical model of the polars of my boat in real sailing conditions.

I can do this by using the LINEST function in a spreadsheet program to model boat speed as a multi-order polynomial function of TWA and TWS.

In order to make to model accurate I will probably need around a thousand data points which would be feasible but rather tedious to log by hand. I am therefore wondering if anybody knows of a simple NMEA data recorder that can connect to the network? I could then export the data to a spreadsheet and massage it into a polynomial.
 
I tried to do this a few years back.
However what did for the project was the sea state.
The polar was based on wind speed and direction which was reasonably straight forward as this information was all there.
The issue was measuring the amount, direction and size of chop and then factoring this into the wind/angle/speed data.

In practice the sea state made a huge difference to what angle I sailed unless I forked out huge sums on a sophisticated rate compass coupled with some way of measuring true leeway I couldn't actually get the answer I was looking for.
 
If it's simple NMEA-0183 (either from a serial line or over the network) You can use kplex (on a mac, linux or other unix-y computer) to output to a file, filtering out sentences you don't need and adding a timestamp in NMEA-0183v4 format
 
The way we created a polar a few years ago was with a simple serial to usb converter. .. well, a four port version. We had to record apparent wind and water speed as presented on seatalk and convert this to nmea 0183 as well but that's a different story.

As to collecting the data and creating the polar... NavMonPC does the great job of combining multiple nmea inputs, saving all the data (including date, time and position) but also outputting the data on virtual com ports.

We used this output data and fed it into AutoPolaire v5 running on the same laptop. Autopolaire recorded every bit data into a table which it presented on screen but at the same time started to draw and record a polar with all the points as and when they were logged.

Search the Internet for AutoPolaire... probably v5.. it's free. . Written in French but there is an English version online as well.
 
Last edited:
I tried to do this a few years back.
However what did for the project was the sea state.
The polar was based on wind speed and direction which was reasonably straight forward as this information was all there.
The issue was measuring the amount, direction and size of chop and then factoring this into the wind/angle/speed data.

In practice the sea state made a huge difference to what angle I sailed unless I forked out huge sums on a sophisticated rate compass coupled with some way of measuring true leeway I couldn't actually get the answer I was looking for.

I did write the first draft of my initial question bearing this in mind, but decided that it might complicate the replies too much. You are quite right that sea-state is as important as TWA and TWS in determine SOW, particularly for smaller boats. In fact, two dimensional TWA/TWS polars are completely irrelevant in my mind because they don't take into account sea-state. The beauty of using LINEST function is that you can build extremely complex models using any number of variables - but it still begs the question how to define sea-state. I did wonder if it might be possible to use the accelerometers in an iPhone to make some sort of measurement sea-state, log TWS and TWA simultaneously, then build a polynomial model.
 
I did write the first draft of my initial question bearing this in mind, but decided that it might complicate the replies too much. You are quite right that sea-state is as important as TWA and TWS in determine SOW, particularly for smaller boats. In fact, two dimensional TWA/TWS polars are completely irrelevant in my mind because they don't take into account sea-state. The beauty of using LINEST function is that you can build extremely complex models using any number of variables - but it still begs the question how to define sea-state. I did wonder if it might be possible to use the accelerometers in an iPhone to make some sort of measurement sea-state, log TWS and TWA simultaneously, then build a polynomial model.

Difficult to characterise the boat's motion just from accelerometer signals, however most of the integrated inertial measurement chips now have accelerometers, gyros, and magnetometer - with all of those at a high enough data-rate, characterising the boat's motion is possible. However, positively tying the boat's motion to the sea-state is a difficult problem. If you have motion measurements in some known sea-states, a comparison of spectra might give some sort of broad-brush tie-up.

The range of variables in defining a sea state include direction, frequency and amplitude. 2D spectra like that are quite variable depending on where and when, even if measurements at that level of detail are available - so there's a practical limit on how well conditions can be characterised.

Interesting to know what level of detail you are aiming for.
 
Last edited:
It would actually be fairly easy to model sea-state in the form of a multi-order polynomial of the accelerometer readings of the iPhone, if I can get all the data into a spreadsheet. The problem is to firstly get the data out of the iPhone, and secondly to know what the actual sea-state is! How is sea-state measured - is it just an eyeball judgement?
 
This is probably the right place to offer free ( + postage ex.Kent) the following logging related items which I have not used for years since setting up controlled environment rooms.
GLM Explorer software ver.2.3 (runs on 3.11 to 2000) uses RS232.
Downloaded upgrade 0f 2005.

Tinytalk TAG sender

Tinytag ULTRA sender

The senders have probably expired.
I have no idea whether these items would be of any use for NMEA or other data streams but if you think they would be and could run on your gear then send me a PM to explain generally what you would like them for.
As said above they would be sent for the small cost of postage involved.

I might be able to answer basic questions but I am assuming that you will know technically more than me.
 
It would actually be fairly easy to model sea-state in the form of a multi-order polynomial of the accelerometer readings of the iPhone, if I can get all the data into a spreadsheet. The problem is to firstly get the data out of the iPhone, and secondly to know what the actual sea-state is! How is sea-state measured - is it just an eyeball judgement?


When you say a “multi-order polynomial of the accelerometer readings”, do you mean fitting a function to the time-series of the readings, to an exceedence probability distribution of the readings, or to a frequency spectrum [Fourier transform] of the readings?

Something associated with a set of accelerometer readings will bear some relation to the motions of the boat, and to the sea-state, but it will be fairly qualitative.

Accelerometer readings will be subject to the simultaneous influence of pitch and surge in the longitudinal axis, and roll and sway in the lateral axis, so will not be a good description of the motion of the boat.

However, a 6 dof inertial sensor can add gyro data to allow roll and pitch to be separated from sway and surge. Combining 3 axis magnetometer data can allow yaw to be determined. I understand that the iPhone has a 6 dof inertial sensor and a magnetometer, so it should be capable of getting that info.

http://www.macrumors.com/2014/09/26/iphone-6-6-plus-two-accelerometers/

The normal way of characterising sea-state has a number of levels:-
1 - Significant wave height and period [Hs & T]
2 - Non - directional frequency spectrum [this can show the presence of a swell]
3 - Directional frequency spectrum [this can show the directional spread of wave energy]
These are based on measuring the time-history of surface elevation and then extracting statistical data to give Hs & T, or performing Fourier transforms to give frequency spectra.

If the objective is to predict the motion of a vessel, the usual approach is to apply the transfer functions for the vessel response in heave, surge, sway, roll, pitch and yaw to the spectrum describing the sea-state - this would enable predictions of the statistics of the vessel response. The limited availability of measured non-directional spectra, and even less availability of measured directional spectra generally mean that various theoretical spectra are used to “guess” these for given Hs & T values, and to allow for the time and fetch involved in the generation of the sea-state.

The response of the boat to a particular sea-state will obviously depend on the boat’s heading and speed.

The first step in describing this is obviously the wind speed and direction used in a polar plot. The range of possible properties of the sea-state associated with that wind speed will cause scatter in the polar plot, and I guess that this is what you would like to eliminate.

What is your objective? Is it to enable the prediction of the optimum course in given conditions?

On filtering data and creating polars, this discussion seems to have covered a lot of ground:-
http://www.cruisersforum.com/forums...t-to-make-vpp-for-sailing-yachts-89998-3.html
 
Last edited:
The way we created a polar a few years ago was with a simple serial to usb converter. .. well, a four port version. We had to record apparent wind and water speed as presented on seatalk and convert this to nmea 0183 as well but that's a different story.

As to collecting the data and creating the polar... NavMonPC does the great job of combining multiple nmea inputs, saving all the data (including date, time and position) but also outputting the data on virtual com ports.

We used this output data and fed it into AutoPolaire v5 running on the same laptop. Autopolaire recorded every bit data into a table which it presented on screen but at the same time started to draw and record a polar with all the points as and when they were logged.

Search the Internet for AutoPolaire... probably v5.. it's free. . Written in French but there is an English version online as well.

It's here, and it's at version 5.1.1 in English. It's very good. I used some playback data to make a trial polar, will have a go at a real-time one next season.

http://www.plaisance-pratique.com/polauto-mesurer-la-polaire-reelle?lang=fr

As for the rest of it with accelerometers and such... :nonchalance: bit over my head and I think I'd rather enjoy the view....
 
Top