Signal K - Sailboat Performance App

977 views
Skip to first unread message

Daniel Corcoran

unread,
Oct 30, 2015, 12:46:33 PM10/30/15
to Signal K

I am writing to post an idea for a sailing application that would make use of the 2-way capability of Signal K to interact with instruments on a sailboat.

How about an application that takes boat information into a mobile application, lets the user choose which combination of sails are currently flying, and combine that with boat performance information previously entered by the user (polars,correction information for AWA (separate for each sail combo), estimated leeway information (adjust for each sail combo), and pipe back into the boat as a speed through water for target boat speed that could be brought up on an instrument display that may only know how to display boat speed ... but by selecting a boat speed source, meet the needs of communicate to the boat owner they are falling short or coming close to the potential of their boat as they make each sail trim adjustment. 

Some other supporting functionality could be valuable:

- Allow the user to go back over time scale view that showed heading, position, stw, and allow the user to go back and change which sails were used at that time period.  E.g. If I fly my Spinnaker, give me the option of going back to the application minutes or even hours after the sail change to properly log I did it. By seeing the time and the heading change, I can pin point within seconds of when I made the change.

- Allow the user to choose a range of time on a specific date (like the start of the race through the known finish time), display the course the boat took on the map, and give the line some coloring to suggest how close to 100% of the polar value the boat was achieving throughout the race. By hovering the cursor over the source, let the user see the boat information at that point in time, and help self examine how quickly or not the boat got up to speed on each tack and/or if the boat owner failed to keep the boat running fast at some point during the race.

- Allow the user to choose a range of date/time for playback against a polar graph. This could integrate the theoretical polars for your boat class, real "this boat" polars as well as current boat performance. Since a huge amount of data can be logged in 4GB, and even more in the SD card, maybe this can even be viewed across an entire sailing season...

Dan Corcoran

Breeze Pleeze


Daniel Corcoran

unread,
Oct 30, 2015, 12:48:18 PM10/30/15
to Signal K
I am positing this with the hope someone will see this and develop the idea into an application for android.
Message has been deleted

Mike Bremford

unread,
Oct 30, 2015, 1:23:32 PM10/30/15
to sig...@googlegroups.com
For what it's worth that's something I'm planning on doing at some point, although my UI is on now on hold while I finish building the boat. Good idea to allow for updating the historical data to reflect a sail change, that's something that would be forgotten in the heat of the moment.

performance information previously entered by the user (polars,correction information for AWA (separate for each sail combo

Out of curiosity do you actually have this information up front? Polars, yes, but I'm not sure how accurate a user-entered correction would be - these will be broad estimates, surely?

My plan was simply to derive this over time - provided the system is aware of my sail plan, it will have windspeed/angle, water speed, an estimate of sea state (from changes to roll/pitch angle) supplied to it, and from there will be able to track and record a previous best VMG. Over time I should be able to build up a picture of what the boat is capable of and how close I am to hitting my previous best under similar conditions.


Cheers... Mike


On 30 October 2015 at 16:48, Daniel Corcoran <516ca...@gmail.com> wrote:
I am writing to post an idea for a sailing application that would make use of the 2-way capability of Signal K to interact with instruments on a sailboat.

--
You received this message because you are subscribed to the Google Groups "Signal K" group.
To unsubscribe from this group and stop receiving emails from it, send an email to signalk+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Alex Wetmore

unread,
Oct 30, 2015, 1:29:55 PM10/30/15
to Signal K

I don't know of any instruments that accept data in Signal-K format, and the existing gateways being written from NMEA 2000 to Signal-K are one way.


I have written some python scripts that output common NMEA 2000 PGNs (for wind, boat speed, etc) that I'm happy to share if they would be helpful for your goal.  They should work on anything with SocketCAN installed.  I used PGN info found in canboat to write to them. I've only tested them with a Raymarine ST70 instrument display, but they work well there.


alex




From: sig...@googlegroups.com <sig...@googlegroups.com> on behalf of Daniel Corcoran <516ca...@gmail.com>
Sent: Friday, October 30, 2015 9:48 AM
To: Signal K
Subject: Re: Signal K - Sailboat Performance App
 
I am writing to post an idea for a sailing application that would make use of the 2-way capability of Signal K to interact with instruments on a sailboat.

On Friday, October 30, 2015 at 12:46:33 PM UTC-4, Daniel Corcoran wrote:

Daniel Corcoran

unread,
Oct 30, 2015, 1:45:40 PM10/30/15
to Signal K

Yes and no.
STW - Speed through water sensors not located on the center line, have some error based on our boats sailing on a port or starboard tack, and if it gets up on a plane. Creating a correction table is pretty straight forward, but a pain in the ass.  The reward, is that you get much better true wind angles calculated.
Wind - I have seen a couple of high end products let you create a correction table. It seems difficult to do. When its correct, the boat can calculate the correct True Wind Angle (relative to ground) or Sailor's Wind (True wind relative to water) no matter what direction your heading in. As wind sensors that factor out some of the motion are becoming more common (Airmar Weather station for example), the true wind angle becomes a more usable value.  (on most sailboats, the TWA looks like noise)
Leeward - This would be a broad guess, yes. Raymarine recently lets you input this value in its new lighthouse software.

In regards to AWA corrected for motion, the application could do that also using the motion sensor in the smart phone / tablet, a guess that the smartphone is mounted rather than in someone's hand, and a knowledge how high the mast is.  AWA corrected for motion could then be sent back into the boats instruments I suppose (if your instrument display can choose a wind source), but the more interesting thing to do is to configure the boats sensors to NOT calculate TWA, and use signal K to send a new TWA back into the boat (calculated from the corrected AWA and STW).  If your android application is not running, then TWA would not be displayed and AWA would be the raw sensor while if your android application is running the TWA would be displayed.

Bill Bishop

unread,
Oct 31, 2015, 8:18:47 AM10/31/15
to Signal K
Hi Dan, Alex and Mike, a couple of thoughts to add to the fray. It's my understanding the Digital Yacht gateway will become bidirectional with a future firmware update.

If you look closely at the "Specification" "Self/Vessels/Vessel" you will find "Design". There is already an element called "Sail Area" that holds the total square footage value of the normal sails. The schema in "Design" could be easily be modified to have a "Sails" list of all the major sails. ie main, main reefed1, spinnaker, screecher ...... The value could be either the sq footage (or a 1 if not known) or a zero. These values would be entered via the SK UI. An app could then read in all sails with a value of one or greater and would then have an inventory of the vessel's canvas. From there an app could have customized presets or the user could just select the sails being used on that leg and remember the configuration.

Also under "Vessel" there are "Performance" values like polar speed, polar speed percent...... Although SK does no calculations they are there to hold calculated data by others that could be used for example to log data to a SD card or other purposes.... 

Bill Bishop

unread,
Oct 31, 2015, 8:27:45 AM10/31/15
to Signal K
I think that the newer autopilots like the Garmin's Reactor and Ray's evolution output really accurate roll, pitch and yaw data would would free the tablet from being fixed, and the Specification has a mast height value.

Daniel Corcoran

unread,
Nov 1, 2015, 10:50:04 PM11/1/15
to sig...@googlegroups.com
I would imagine the guts of the Garmin's Reactor and Ray's evolution products would be perfect for this use, but its unlikely they output such information frequently enough over N2K to motion correct AWA. I am guessing 10 or 20hz or more sampling is needed to approach the ability of the Airmar PB200/WX200 to provide stable AWA. 

AWA Motion correction requires taking the measured AWA, adjusting for the motion of the mast, to calculate the correct AWA (or) applying some sophisticated damping algorithms (such as Airmar states they do), such an algorithm wasn't described in detail but perhaps it discards AWA values when the mast is shaking and replaces it with the last valid AWA plus/minus measured change in heading (making the assumption the wind is holding steady) until it accepts the AWA values again. 

Using a smartphone / tablet motion sensor may not be practical, not sure if its sensitive enough (has enough resolution) to pick up slight changes at sea level  to approximate what is happening at the top of the mast, or if its internal sensors report at 20hz or not.




--
You received this message because you are subscribed to a topic in the Google Groups "Signal K" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/signalk/YpmDpfv-Ro4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to signalk+u...@googlegroups.com.

Ric Morris

unread,
Nov 3, 2015, 11:05:46 AM11/3/15
to Signal K
Not forgetting that a $180 Signet analogue paddle wheel and the analogue signal from a B&G 213 Masthead is currently regarded as the best you can use to measure speed and AWA/AWS. No NMEA0183, no NMEA2000.

Daniel Corcoran

unread,
Nov 3, 2015, 11:19:40 AM11/3/15
to sig...@googlegroups.com

A standard raymarine or garmin masthead wind unit plus motion correction will outperform the bg213 which has no mast motion correction.

The bg added option for motion correction will cost north of 5000 usd and complicated to add to existing boat systems.

On Nov 3, 2015 9:05 AM, "Ric Morris" <pod...@gmail.com> wrote:
Not forgetting that a $180 Signet analogue paddle wheel and the analogue signal from a B&G 213 Masthead is currently regarded as the best you can use to measure speed and AWA/AWS. No NMEA0183, no NMEA2000.

--

Mike Bremford

unread,
Nov 3, 2015, 11:32:06 AM11/3/15
to sig...@googlegroups.com
I have pretty high hopes for this, although I haven't got the mast raised yet to see how accurate it is: http://www.lcjcapteurs.com/?lang=en. No moving parts, 0.1kt accuracy, and seagull-proof.


On 3 November 2015 at 16:05, Ric Morris <pod...@gmail.com> wrote:
Not forgetting that a $180 Signet analogue paddle wheel and the analogue signal from a B&G 213 Masthead is currently regarded as the best you can use to measure speed and AWA/AWS. No NMEA0183, no NMEA2000.

--
You received this message because you are subscribed to the Google Groups "Signal K" group.
To unsubscribe from this group and stop receiving emails from it, send an email to signalk+u...@googlegroups.com.

Daniel Corcoran

unread,
Nov 3, 2015, 11:59:37 AM11/3/15
to sig...@googlegroups.com

This is a sensor that can also benefit from motion correction. The pb200 and wx200 have integrated motion sensor, see panbo article "sailing with a pb200: parts 1,2,3 for what it's like I put my pb200 2 feet above masthead using vhf extension pole. Such products while great require running new cable to masthead.  Would be valuable if all sailors had good true wind angle and target speed available. Motion correction of AWA is required, if everyone could  reuse their existing wind sensor, would make the proposition a whole order of magnitude cheaper.

A 9 axis sensor chip is a dollar, it's all about software (could be smartphone app) and interfaces. Depending on sensitivity motion sensor can be installed low on the mast or even on the hull. I wonder how signal k can facilitate making the software and interfacing cheap.

You received this message because you are subscribed to a topic in the Google Groups "Signal K" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/signalk/YpmDpfv-Ro4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to signalk+u...@googlegroups.com.

Mike Bremford

unread,
Nov 3, 2015, 12:21:09 PM11/3/15
to sig...@googlegroups.com
I also have a rotating mast so have to compensate anyway -  I have a circuit designed to do this at mast base, and although I hadn't planned to compensate for mast motion, the accelerometer data is available to do this - assume a rigid mast and if you know the mast height, it should be relatively easy to do. Added to the to-do list.

And much as I love kicking this stuff around - to get us back on topic I should point out that Signal K would be agnostic to all of this. The masthead unit will have it's value compensated, somewhere, by a black box, and that compensated value will be sent over the network to Signal K. This is how the mast rotation compensators I've seen work. Provided it's in the form of a standard NMEA0183 or NMEA2000 message, there's no special handling needed from the Signal K server. 


-----------------------------------------------------
Mike Bremford - CTO                   mi...@bfo.com
Big Faceless Organization             http://bfo.com

Kevin Kemp

unread,
Dec 27, 2015, 1:16:26 PM12/27/15
to Signal K

I recently built a system that includes a sailing performance indicator to display actual boat speed relative to target speed based on the boat’s polar model. As part of this project I also developed a very efficient and compact mathematical representation of a boat polar model that I think could easily be incorporated into the Signal K data model.

 

My system started as a simple hobby project using a microcontroller development board to replace the unreliable paddlewheel knotmeter signal on an old Catalina 30 with GPS-derived boat speed. I also interfaced the microcontroller to a Raymarine ST60 Wind Instrument over SeaTalk to enable it to display true wind speed and angle. Finally, I developed the sailing performance indicator using GPS boat speed and wind speed/angle from the ST60.

 

At this point the performance indicator is simply a bright flashing LED with its flash rate increasing as boat speed approaches target speed. I’m not correcting wind speed/angle for mast motion but I am averaging both these and the boat speed over several seconds to dampen short-term errors. Overall the performance indicator works well - it’s definitely fun to see in real time how you’re doing relative to theoretical boat speed and we use it quite successfully to fine tune sail trim. I’ve thought about adding a more sophisticated display and some of the tracking and review functions that Dan suggested but haven’t done anything about that yet. I also think it would be possible to implement a machine learning algorithm (eg. Kalman filter) to automatically generate the polars from actual boat data. That would be a fun project!

 

A bit about my compact polar model representation: This is a parametric model that reduces the entire boat polar to 16 regression coefficients and calculates target boat speed for any combination of wind speed and angle in just 9 lines of C- code. This representation is much more efficient and accurate than saving perhaps hundreds of wind speed/angle pairs and using linear interpolation to calculate target speed. Since my model is so compact I think it would be ideal to incorporate in the Signal K data model under “vessels.vessel.design.performance”. It should even be possible to save multiple models for different sail combinations.

 

I’d be happy to hear from anyone interested in pursuing this.


 

 

Fabian Tollenaar

unread,
Dec 27, 2015, 2:45:11 PM12/27/15
to Signal K
Hi Kevin, that sounds very interesting. Is your code and hardware open source? 


Sent from my iPhone




--

rob...@42.co.nz

unread,
Dec 27, 2015, 4:47:23 PM12/27/15
to Signal K
Hi Kevin,

That sounds great! - Id be happy to incorporate it into the java-server (with attribution of course!) if its open sourced - otherwise it would possibly suit a standalone module based on an arduino or teensy. Just plug into the boat network and get instant polar/performance calcs, storing the derived data in the model for display via any instrument.

Better yet - an opensource version that we develop on line as a tutorial for signalk use. Then we can all buy an $11 teensy, flash it, and have polars! More than happy to help.

Rob

Daniel Corcoran

unread,
Dec 27, 2015, 6:51:07 PM12/27/15
to sig...@googlegroups.com

This is exciting. The blinking light is a great idea for feedback on achieving target speed in response to sail trim.

--
You received this message because you are subscribed to a topic in the Google Groups "Signal K" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/signalk/YpmDpfv-Ro4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to signalk+u...@googlegroups.com.

Mike Bremford

unread,
Dec 27, 2015, 7:06:14 PM12/27/15
to sig...@googlegroups.com
Very interested indeed, I'm already trying (and so far failing) to figure out how you've done it, so I look forward to seeing the algorithm documented when you get the chance. In particular how you derive the coefficients - I imagine most are starting from a table of data showing windspeed/angle combinations (or with nothing at all, which is where i'm at - I'll be generating the data). So how you get from that point to your parameters is the really interesting part.

Cheers... Mike

--
You received this message because you are subscribed to the Google Groups "Signal K" group.
To unsubscribe from this group and stop receiving emails from it, send an email to signalk+u...@googlegroups.com.

Kevin Kemp

unread,
Dec 27, 2015, 11:16:04 PM12/27/15
to Signal K

Thanks for the feedback everyone. I'm happy to share the algorithm and code, but what I'd really like to do is collaborate with someone to develop this further as a product or demo. My compact model isn't complicated but it is a bit difficult to explain in a blog post. I’ve made a Powerpoint presentation that I can talk to, and also a short video showing the system in operation.  If anyone would like to do a Skype call or something like that I’d be happy to do so. Let me know.

 

To answer a few of your questions so far:

 

Fabian/Rob: I built the system on a Freescale (now NXP) KL46Z Freedom board which has a 48MHz ARM Cortex M0+ microcontroller and is Arduino pin compatible. I used an Adafruit Ultimate GPS Logger Shield for the GPS SOG signal. I believe the boat performance model alone would run on a smaller processor (Teensy etc.) as long as it can keep up with all the Signal K message parsing etc.

 

Dan: The flashing LED does work well – probably better than I expected. It’s kind of in the background while you’re sailing - you’re aware of it and you respond to it but it’s not distracting and it doesn’t take as much effort to read and interpret as e.g. a numerical display. Though it would also be nice to have an app with some of the functionality you described as well.

 

Mike: Yes, I generate the compact model parameters in a series of regression steps from a table of wind speed/angle pairs. For my original Catalina 30 model I used 72 data points that I read off a polar diagram. For now I’ve been doing the analysis manually using the regression add-on in Excel, but the whole process could probably be automated in Matlab or C-code. This evening I found of a set of polars in table form for a J30 http://www.blur.se/polar/J30_polar.txt and it took me about 20 minutes to generate the model coefficients from these using Excel. See the result below with the original data plotted as points and the model as lines. BTW, the RMS error between the data and model is less than 0.1kt, which is better than the precision of the original data.

- Kevin 

Teppo Kurki

unread,
Dec 28, 2015, 2:03:32 AM12/28/15
to signalk
That sounds great! - Id be happy to incorporate it into the java-server (with attribution of course!) if its open sourced - otherwise it would possibly suit a standalone module based on an arduino or teensy. Just plug into the boat network and get instant polar/performance calcs, storing the derived data in the model for display via any instrument.

Once the values are in the model / stream one can add all kinds of visualisations as part of InstrumentPanel or standalone html5 or custom consumer. How about a Recon Jet app or Apple Watch/Pebble app?

rob...@42.co.nz

unread,
Dec 28, 2015, 5:36:07 PM12/28/15
to Signal K
pjrc.com now have a teensy3.1 lite - USD11.69 - uses a cortex m0 at 48Mhz so that both looks like an easy port, and it has the right price and hackability.

I have C/C++ signalk encode/decode in a branch for my freeboardPLC (https://github.com/rob42/FreeboardMega/tree/signal_k_dev)  - so again  quite easy to port. The teensy has a really good USB port with full throughput so that would be the easiest way to communicate - just plug into a spare USB port somewhere. Subscribe for the relevant signalk data, and calc the output. Send that back out to the network for misc gui clients, and also have it flash the led appropriately. You could also set up the polars/coefficients via a signalk protocol extension, using a web client.

I imagine it would lend itself well to a format like a flash drive - just plug and go.

I can help with a prototype (I have a spare teensy here) but I'm not skilled enough at this stuff for a commercial product. There are probably others here that are better suited.

Rob

rob...@42.co.nz

unread,
Jan 2, 2016, 10:04:00 PM1/2/16
to Signal K
Hi Kevin,

Ive been trying to reply to your email but aol doesnt like me and keeps bouncing my email to you! I have the same problem with Bill Bishop on aol. Try another address?

Rob

Ric Morris

unread,
Jan 6, 2016, 5:03:25 AM1/6/16
to Signal K
Sounds really interesting and all good as far as it goes but for polar targets you really need to be working from boat speed through water and true wind. Anywhere there is current COG and SOG doesn't cut it.

By making assumptions about the (slow) speed with which set and drift change you can use COG and SOG to smooth the noise from a paddle wheel.

Ric Morris

unread,
Jan 6, 2016, 5:37:12 AM1/6/16
to Signal K
Also if you want to look at commercialization there is a whole lot more to making a product that will stand up to the rigors or a marine environment than creating a dev. board.

In terms of a case you need to be thinking some thing ip67 as a minimum with an M12 socket and Goretex membrane vent. A 2 part laser closed ABS case is pretty straight forward so long as there are no overhangs in the design. You just need to consider the upfront tooling costs, a ball park for which we can give you. Try to avoid any additional openings in the case.

In terms of a processor, take a look at the Cyprerss PSoC5 or PSoC4BLE. Has saved our ass in terms of flexibility a number of times. The 4BLE has the built in blue tooth lite which may do for getting data on an off the device but if you're looking at this being networked in to the boats other systems you might want to consider WiFi or ethernet. To add ethernet just make the M12 an M12 8 pin type B connection coded for power over ip. Many options for WiFi but a more expensive chip with tcp and http on board will save you at least extra cost in dev. effort.

Power management is your final challenge. Your hardware needs to be tolerant to a dirty power connection of anything from 5-24v and not to fry if it's above that. We'll help there too if you get seriously into it.

For a bottom up pricing multiply your final cost by 3 if you intend to only sell through your own channel over the internet, 5 if you are thinking about the volumes from retail.

Jan Scharnetzky

unread,
Jun 6, 2017, 11:25:56 AM6/6/17
to Signal K, Gerchow Lars
Hey all,

currently I have set up the rasbperry pi with the signal K java 1.0 server + plus from the freeboard project a set of sensors. The server works great, thank you all for this great project!!!  My goal sounds very similar, e.g. polars for sailing boots, logging of the sail configuration used etc. Therefore, I was wondering if the project has evolved since last year? 

Cheers,
Jan

Daniel Corcoran

unread,
Jun 6, 2017, 3:02:35 PM6/6/17
to sig...@googlegroups.com, Gerchow Lars
I have switched sailboats to a J 109 since I last posted and am ever more interested in what's going on so I can decide if I want a Android Tablet or Surface Pro installed to best go forward.



--
You received this message because you are subscribed to a topic in the Google Groups "Signal K" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/signalk/YpmDpfv-Ro4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to signalk+unsubscribe@googlegroups.com.

Ian Boston

unread,
Sep 4, 2017, 2:46:29 PM9/4/17
to Signal K, gerc...@phys.ethz.ch
Hi,
These repositories may be of interest.


Code that runs on an Arduino Due (which has 2x CAN Controllers) to listen to a Raymarine NG (or any NMEA2000) bus, converting to Actisense serial. It has a polar performance model which outputs most of the NKE performance stats to the bus. It also has corrections for leeway, mast motion, heal on awa, aws, stw if the sensors are connected directly to the Due. It expects standard Airmar pulses for boat speed, and expects a Raymarine Sin/Cosine + Pulse wind head.  I currently run without the performance parts enabled, because there are no good PGNs on Raymarine devices to display. (grey water tank % isnt intuitively == polar performance) 

My stw, awa, aws all come from a Raymarine i50/i60 at the moment, which have no mast motion, heal corrections at all.

So...


adds performance data, forked from sbender9/signalk-derived-data

This takes a rough polar and builds a fine polar with 1 degree twa  steps and 0.1 tws steps, so eliminate interpolation. Too much data for a Due, but fine on a Raspberry Pi ZeroW.

and 


Outputs NKE NMEA0183 performance sentences over TCP to be consumed by the NKE Android app.

The repos are work in progress and may not be 100% upto date.
They also build heavily on the work of others including SignalK.

The Pi Zero + Due draw about 100mA @ 12v most of the time. I did run InfluxDB + Grafana but the load on the Pi was too much.

Hope all that is of interest.
Best Regards
Ian



To unsubscribe from this group and all its topics, send an email to signalk+u...@googlegroups.com.

Al Thomason

unread,
Sep 4, 2017, 11:20:17 PM9/4/17
to sig...@googlegroups.com, gerc...@phys.ethz.ch

Ian,

 

Just a quick note:  There is also a socketCAN port of Timo’s NMEA2000 lib, so if you wish you can directly connect the RPi to the CAN bus and pull in Actisense formatted messages w/o going through the Due.  I have been using piCAN adapter and an Rpi-3, not sure if one of the USB socketCAN adapters will work with the  Pi-zero, would have to verify that.

 

-al-

 

 

Viking Star

45' Monk Sr. / McQueen

mvVikingStar.blogspot.com

 

From: sig...@googlegroups.com [mailto:sig...@googlegroups.com] On Behalf Of Ian Boston
Sent: Monday, September 04, 2017 11:46 AM
To: Signal K
Cc: gerc...@phys.ethz.ch
Subject: Re: Signal K - Sailboat Performance App

 

Hi,

--

You received this message because you are subscribed to the Google Groups "Signal K" group.

To unsubscribe from this group and stop receiving emails from it, send an email to signalk+u...@googlegroups.com.

Teppo Kurki

unread,
Sep 5, 2017, 2:15:22 AM9/5/17
to signalk
On Mon, Sep 4, 2017 at 9:46 PM, Ian Boston <ianb...@gmail.com> wrote:

adds performance data, forked from sbender9/signalk-derived-data

This takes a rough polar and builds a fine polar with 1 degree twa  steps and 0.1 tws steps, so eliminate interpolation. Too much data for a Due, but fine on a Raspberry Pi ZeroW.

and 


Outputs NKE NMEA0183 performance sentences over TCP to be consumed by the NKE Android app.

The repos are work in progress and may not be 100% upto date.
They also build heavily on the work of others including SignalK.

Ooh, nice stuff! Do you plan to keep your forks or share your work back?

With a quick look signalk-to-nke looks like it is a much improved version of signalk-to-nmea0183. I would love to have all this consolidated to one signalk-to-nmea0183 plugin to avoid confusion for users and scattered development effort.

The same goes for signalk-derived-data.


The Pi Zero + Due draw about 100mA @ 12v most of the time. I did run InfluxDB + Grafana but the load on the Pi was too much.

Yep, I guess you need RPi 3 with around 400mA draw for that. It also has multiple cores, so other processes don't subtract from the server's cpu capacity.


 

Ian Boston

unread,
Sep 5, 2017, 2:45:30 AM9/5/17
to Signal K, gerc...@phys.ethz.ch
Hi,
Thank you, I will look into that. I would like to get down to 1 board if possible.
I was also looking at going the other way, using a esp8266 for wifi and a microSD card for datalogging and running everything on the Due. All the parts work, but writing a web socket server and a NMEA0183 over UDP out is going to be hard with 1 thread and no real event queue support. 

Javascript and node.js is so much faster to develop in and SignalK has done most of the heavy lifting already.

I will look into piCAN. Can you have 2x CAN adapters connected and will it cope with fast messages on an engine bus. I am thinking I would like to monitor the engine bus, read only, and bridge it over.

Best Regards
Ian

Ian Boston

unread,
Sep 5, 2017, 3:02:32 AM9/5/17
to Signal K, t...@iki.fi
Hi,


On Tuesday, 5 September 2017 07:15:22 UTC+1, Teppo Kurki wrote:


On Mon, Sep 4, 2017 at 9:46 PM, Ian Boston <ianb...@gmail.com> wrote:

adds performance data, forked from sbender9/signalk-derived-data

This takes a rough polar and builds a fine polar with 1 degree twa  steps and 0.1 tws steps, so eliminate interpolation. Too much data for a Due, but fine on a Raspberry Pi ZeroW.

and 


Outputs NKE NMEA0183 performance sentences over TCP to be consumed by the NKE Android app.

The repos are work in progress and may not be 100% upto date.
They also build heavily on the work of others including SignalK.

Ooh, nice stuff! Do you plan to keep your forks or share your work back?


I would be happy to share back. The master branch contains fixes, the withPolars branch contains the derived performance data. If you take that, you will probably want to change the way a polar is defined. For simplicity I put the data in javascript rather than csv. see 

and

There is also a visualisation tool for building polars using GNU Octave (similar to Matlab), see https://github.com/ieb/signalk-derived-data/blob/withPolars/polar/polar.txt

 

With a quick look signalk-to-nke looks like it is a much improved version of signalk-to-nmea0183. I would love to have all this consolidated to one signalk-to-nmea0183 plugin to avoid confusion for users and scattered development effort.

From memory, I used signalk-to-nema0183 as a template, but the changes I was making were too big to be in a patch and needed the withPolars branch of derived data to work. I am still verifying the validity of the calculations and have not fully checked all the PNKE sentences. Things like optimal CMG to next waypoint are not yet implemented, although I think the calcs may already be in the derived data module.

If you want the work back, then I would he happy to contribute.

 

The same goes for signalk-derived-data.


The Pi Zero + Due draw about 100mA @ 12v most of the time. I did run InfluxDB + Grafana but the load on the Pi was too much.

Yep, I guess you need RPi 3 with around 400mA draw for that. It also has multiple cores, so other processes don't subtract from the server's cpu capacity.


Good point. A RPi 3 might be a better choice. InfluxDB + Grafana are nice, but a bit big and heavy in a Pi context. I struggled to get Grafana to produce visualisations at actually worked at sea and gave the helm a target, which is why I've switched to csv log files fed into d3js visualisations. The load average is about 0.7 on the Pi Zero at the moment.

Best Regards
Ian
 

 

Teppo Kurki

unread,
Sep 5, 2017, 3:57:24 AM9/5/17
to signalk
On Tue, Sep 5, 2017 at 6:20 AM, Al Thomason <thoma...@gmail.com> wrote:

Ian,

 

Just a quick note:  There is also a socketCAN port of Timo’s NMEA2000 lib, so if you wish you can directly connect the RPi to the CAN bus and pull in Actisense formatted messages w/o going through the Due.  I have been using piCAN adapter and an Rpi-3, not sure if one of the USB socketCAN adapters will work with the  Pi-zero, would have to verify that.


I'm curious: why would you use something else than Node server embedded canboat in Signal K context on a Pi? Works with socketCAN via candump.


Ian Boston

unread,
Sep 5, 2017, 5:18:24 AM9/5/17
to sig...@googlegroups.com
Hi,

Originally I started with a Due because it has 2x CANBus controllers built in and there is an excellent NMEA2000 library https://github.com/ttlappalainen/NMEA2000 already written for the Due which allowed to code everything I wanted in C++. That library also spits out Actisense serial for free which allowed me to experiment with SignalK.

socketCAN looks quite simple also so I might give that a go. 
The kernel spi driver appears to support 2x Can transceivers at upto 1Mb/s.
I guess if I can make it work I can get everything onto 1 board, although the Due is super economical on mA.



Best Regards
Ian
 

--
You received this message because you are subscribed to a topic in the Google Groups "Signal K" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/signalk/YpmDpfv-Ro4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to signalk+unsubscribe@googlegroups.com.

Teppo Kurki

unread,
Sep 5, 2017, 11:03:46 AM9/5/17
to signalk

If you want the work back, then I would he happy to contribute.
 
Definitely! Sounds like you have  bunch of interrelated changes and you are probably the best expert on what is the best way to get the changes upstream.

Should we continue the discussion in Github issues rather than on the mailing list? It would be really great if you could come up with piecemeal (or whole, if that is easier) Pull Requests.

Ian Boston

unread,
Sep 5, 2017, 1:26:59 PM9/5/17
to sig...@googlegroups.com
Hi,

I did 2 pull requests,

and

the later needs some review to check anything written to the bus conforms with the schema.

Best Regards
Ian

 

--
You received this message because you are subscribed to a topic in the Google Groups "Signal K" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/signalk/YpmDpfv-Ro4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to signalk+unsubscribe@googlegroups.com.

Al Thomason

unread,
Sep 5, 2017, 1:27:47 PM9/5/17
to sig...@googlegroups.com, gerc...@phys.ethz.ch

There is a nice (though a bit pricy ) dual CAN adapter:  the piCAN2:  http://copperhilltech.com/pican2-duo-can-bus-board-for-raspberry-pi-2-3/

Made by “SK Pang Electronics” IIIRC there is a different supplier in the EU.

 

Given both ports are IRQ enabled and SPI based I would suspect there should be little issue keeping up with incoming traffic.

 

There are a few other options available, including isolated transceivers to meet the NMEA2000 guidelines if you wish: http://copperhilltech.com/brands/SK-Pang-Electronics.html

 

(Not promoting, no connection – just found it was a nice clean solution to getting CAN access onto the RPi’s)

Al Thomason

unread,
Sep 5, 2017, 1:27:48 PM9/5/17
to sig...@googlegroups.com

Myself, only because I was using the N2K libs for their underlying J1939 support and noted is also works as an Actisense compatible reader feeding into the Signal K stack.  But yes, socketCAN and candump seems like a simple solution!

 

-al-

 

 

Viking Star

45' Monk Sr. / McQueen

mvVikingStar.blogspot.com

 

From: teppo...@gmail.com [mailto:teppo...@gmail.com] On Behalf Of Teppo Kurki
Sent: Tuesday, September 05, 2017 12:57 AM
To: signalk
Subject: Re: Signal K - Sailboat Performance App

 

 

 

On Tue, Sep 5, 2017 at 6:20 AM, Al Thomason <thoma...@gmail.com> wrote:

--

Ian Boston

unread,
Sep 5, 2017, 1:55:10 PM9/5/17
to sig...@googlegroups.com, gerc...@phys.ethz.ch
Hi,
That is a touch expensive seeing as the cost of a MCP2515 is about $1.59 and the transceiver is about the same.

Digging into the Raspbian distribution. There are overlays for can0 and can1 [1] which can be configured as [2] on 2 separate gpio pins. Not certain how the CS line gets wired yet with 2 ?
MCP2515 modules are about 3 GBP on Ebay.. but they are clocked at  8MHz rather 16MHz so probably wont run as fast as the SK Pang board. Since NMEA2000 is 250 kbit, this should not be an issue.

I've ordered 3 modules, and dug a B+ out of a draw to play with one evening.

Thanks for the pointer, I may get down to 1 board.
Best Regards
Ian



1
root@raspb:/var/log# ls -l /boot/overlays/mcp2515-can*
-rwxr-xr-x 1 root root 1833 May  4  2016 /boot/overlays/mcp2515-can0.dtbo
-rwxr-xr-x 1 root root 1833 May  4  2016 /boot/overlays/mcp2515-can1.dtbo
root@raspb:/var/log# 

2
// in /boot/config.txt
dtoverlay=mcp2515-can0,oscillator=8000000,interrupt=25 
dtoverlay=mcp2515-can1,oscillator=8000000,interrupt=24




To unsubscribe from this group and stop receiving emails from it, send an email to signalk+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to a topic in the Google Groups "Signal K" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/signalk/YpmDpfv-Ro4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to signalk+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages