Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 28-05-2012, 03:03   #1
Registered User

Join Date: May 2008
Location: Port Adelaide
Boat: Beneteau Oceanis 37
Posts: 26
Can I program NMEA Data to calculate Turn?

My GpsMap 78 computes and displays continuous data for TURN.
TURN is the angle that the yacht needs to turn from its present course to head for a waypoint. I use this all the time in racing to help decide when to tack to lay a mark. A TURN of 90 degrees is about the turn that I am seeking.
How can I get a similar number from an NMEA stream from the back of a Raymarine plotter?
Thanks
Chris
__________________

__________________
cristee is offline   Reply With Quote
Old 28-05-2012, 03:39   #2
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,019
Re: Can I program NMEA data to calculate Turn?

Chris...
As far as I know, such data does not exist in the NMEA stream, but you can calculate it using very basic algebra as the difference between your heading and bearing to the waypoint.
For example if you are heading to the west and the waypoint is to the north of you, 360-270 = 90, which is the value of TURN you talk about. In the NMEA stream, the only thing you get is your heading.
The value of bearing to the next waypoint is available in OpenCPN once you activate a route. Whether you should tack or not is much more apparent visually from the previously recorded track - that angle depends on weather conditions and is not always the same anyway.

Pavel
__________________

__________________
nohal is online now   Reply With Quote
Old 28-05-2012, 07:52   #3
Registered User

Join Date: Mar 2012
Location: Solomons, MD
Boat: Aquarius Pilot Cutter 24
Posts: 57
Images: 4
Re: Can I program NMEA data to calculate Turn?

Without consulting a NMEA spec to see if a standard message exists with the data you are seeking, my guess would be the same as Pavel/nohal. Your GPSmap is calculating TURN and displaying. It may or may not output that on
NMEA. The NMEA standard costs money to buy. Some reverse engineered information is available on the web such as NMEA data
I looks like some messages are defined that would have your information such as the BWC message. So the next step would be to find a reference manual for your gear and see what sentences can be programmed on output.

You don't specifically mention OpenCPN in your question, but if that is your intent, then you need to check against the messages that OpenCPN can use. Or as Pavel suggests, look for a similar function built into OpenCPN.

I suggest you clarify if you are interested in learning about potential NMEA information from your unit, or (and?) if you are interested in potential use of said sentence in OpenCPn.

Regards,
cas
__________________
cas206 is offline   Reply With Quote
Old 28-05-2012, 17:30   #4
Registered User

Join Date: May 2008
Location: Port Adelaide
Boat: Beneteau Oceanis 37
Posts: 26
Re: Can I program NMEA data to calculate Turn?

Pavel
Yes, the calculation that i seek to have the program do is pretty simples,ie, the difference between heading and bearing to the waypoint. In practise, when racing, it is not practical to keep doing the arithmetic in ones head while so much is going in a boat. Of course there are other factors affecting the decision of when to tack but this is a key one.

To expand the problem further, my GPSmap 78 also provides the following calculated data:
Time to destination
Time to waypoint
Bearing to course
ETA
etc.

My Raymarine plotter also gives me Set and Drift (but not Turn).

OpenCPN already has Dashboard.
If it could be made to calculate and display the data above, that would be a significant advance.

Otherwise, can you suggest an alternative program that can manipulate the NMEA stream to give the outputs that I seek?
Chris
__________________
cristee is offline   Reply With Quote
Old 28-05-2012, 23:52   #5
Registered User

Join Date: Feb 2010
Location: On the go. Not in Prague.
Posts: 4,019
Re: Can I program NMEA data to calculate Turn?

Chris...
Maxsea with the racing module can sure give you plenty of info, Adrena is overly popular in the mini 6,50 fleet and amongst the french big boat racers. Expedition powered quite a few boats in the America's cup AFAIK. All of them cost quite a few bucks. CapeCode and Blue Water Racing cost nothing and are more focused on a racer than a cruiser. I'm personally almost unable to use either of them, but it's probably just a question of getting used to it.
Almost all the info you name above is already available in OpenCPN once you activate a route. The stuff like turn can be added in a couple of lines of code as it's really trivial, you just have to find someone with time to do it, learn to do it yourself or wait until someone with the skills will need it.

Pavel
__________________
nohal is online now   Reply With Quote
Old 29-05-2012, 00:54   #6
Registered User

Join Date: May 2008
Location: Port Adelaide
Boat: Beneteau Oceanis 37
Posts: 26
Re: Can I program NMEA data to calculate Turn?

Pavel
Thanks for the great info.
Chris
__________________
cristee is offline   Reply With Quote
Old 29-05-2012, 15:39   #7
Registered User
 
HotRod's Avatar

Join Date: Oct 2010
Location: SW Norway
Boat: Nidelv 28, 28ft
Posts: 243
Send a message via MSN to HotRod Send a message via Skype™ to HotRod
Re: Can I program NMEA data to calculate Turn?

You can get rate of turn from a compass or gyro (can usually be collected from autopilot NMEA out).

NMEA string: $--ROT

Page 14 in this link:
The NMEA 0183 Protocol


$--ROT,x.x,A*hh

1) Rate Of Turn, degrees per minute, "-" means bow turns to port
2) Status, A means data is valid
3) Checksum


I think it would be really hard to calculate rot from gps as it fluctuate to much, especially at low speed. Maybe an average rot could be a better solution...

A dashboard dial or numbers that shows NMEA $--ROT would be nice.
__________________
Best Regards
OpenCPN Norge - Norwegian OpenCPN community
Frode
HotRod is offline   Reply With Quote
Old 01-06-2012, 01:11   #8
Registered User

Join Date: May 2008
Location: Port Adelaide
Boat: Beneteau Oceanis 37
Posts: 26
Re: Can I program NMEA data to calculate Turn?

Hotrod
It is not rate of turn that i want.
Rather I want the number of degrees to turn the boat to head to the waypoint.
That is, heading minus bearing to waypoint.
Cheers
Chris
__________________
cristee is offline   Reply With Quote
Old 01-06-2012, 15:02   #9
Registered User
 
HotRod's Avatar

Join Date: Oct 2010
Location: SW Norway
Boat: Nidelv 28, 28ft
Posts: 243
Send a message via MSN to HotRod Send a message via Skype™ to HotRod
Re: Can I program NMEA Data to calculate Turn?

For that I think that it need to be able to set turnaradius on the waypoints according to the vessels turn radius. If that should work it needs to start the turn before the actual waypoint.

I see your point Chris, and its a good idea. But the display of ROT would also be nice to have.
__________________
Best Regards
OpenCPN Norge - Norwegian OpenCPN community
Frode
HotRod is offline   Reply With Quote
Old 01-06-2012, 15:35   #10
Registered User

Join Date: May 2008
Location: Port Adelaide
Boat: Beneteau Oceanis 37
Posts: 26
Re: Can I program NMEA Data to calculate Turn?

Hotrod
I am glad you can see my point. I thought I had it well covered.

ROT seems to me to have more relevence to big ships trying to avoid rocky Italian islands than a 37' yacht that turn on a dime.

Where do i go to learn how to program in OpenCPN?
Cheers
Chris
__________________
cristee is offline   Reply With Quote
Old 01-06-2012, 16:58   #11
Registered User

Join Date: May 2011
Location: Toronto
Boat: Sandpiper 565
Posts: 2,943
Re: Can I program NMEA data to calculate Turn?

Quote:
Originally Posted by cristee View Post
Pavel
Yes, the calculation that i seek to have the program do is pretty simples,ie, the difference between heading and bearing to the waypoint. In practise, when racing, it is not practical to keep doing the arithmetic in ones head while so much is going in a boat. Of course there are other factors affecting the decision of when to tack but this is a key one.

To expand the problem further, my GPSmap 78 also provides the following calculated data:
Time to destination
Time to waypoint
Bearing to course
ETA
etc.

My Raymarine plotter also gives me Set and Drift (but not Turn).

I believe all of these are fairly straightforward Cartesian geometry problems, that would be easy to calculate using standard GPS data.

Hmmm. I've briefly looked into programming with wxWidgets. I wish I had the time to get into this. Might be an excuse to geek out this weekend....
__________________

__________________
Lake-Effect is offline   Reply With Quote
Reply

Tags
nmea

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 01:37.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2017, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.