Cruisers Forum
 


Join CruisersForum Today

Reply
 
Thread Tools Rate Thread Display Modes
Old 12-05-2016, 02:38   #1
Registered User

Join Date: Apr 2016
Boat: Formosa 41
Posts: 20
NMEA sentence for the dashboard

Hello and thanks in advance.

Sorry to start a new thread but I could not find the answer to my question.

What is the NMEA sentence for pressure, pitch , heel/roll so it be displayed in the dashboard?

I have tried $xxSHR,,hdt,T,roll,pitch,,,,,1,

Where pitch and roll are degrees -/+

I tried the $WIMDA sentence for pressure but no joy.

Is there a list of sentences somewhere I can look at?

Thanks
__________________

__________________
Nick_Currawong is offline   Reply With Quote
Old 15-05-2016, 08:00   #2
Registered User

Join Date: Apr 2016
Boat: Formosa 41
Posts: 20
Re: NMEA sentence for the dashboard

Hi guys,

I had a look through the source code for the dashboard_pi and found that the XDR sentences are being handled in a restrictive manner, i.e. they were only being processed if the transducer name matched ( ¨AirTemp¨ ).

I have rework a copy of dashboard_pi.cpp to work based on transducer type that way the transducer name can be anything the XDR writer wants as with openplotter itś name for air temp is i2ct.

This also allows for other XDR sentence development, I believe.

My copy works with the following XDR transducer types;

XDR,C,n.n,C,aaaaa - Air temp
XDR,A,n.n,D,aaaaa - Heel/Roll
XDR,D,n.n,D,aaaaa - Pitch
XDR,P,n.n,B,aaaaa - Barometric pressure

here is my changed code; I have copied/pasted here as file is too big to upload to forum.

if (m_NMEA0183.LastSentenceIDReceived == _T("XDR")) { //Transducer measurement
/* XDR Transducer types
* AngularDisplacementTransducer = 'A',
* TemperatureTransducer = 'C',
* LinearDisplacementTransducer = 'D',
* FrequencyTransducer = 'F',
* HumidityTransducer = 'H',
* ForceTransducer = 'N',
* PressureTransducer = 'P',
* FlowRateTransducer = 'R',
* TachometerTransducer = 'T',
* VolumeTransducer = 'V'
*/

if (m_NMEA0183.Parse())
{ //SendSentenceToAllInstruments( OCPN_DBP_STC_ATMP, m_NMEA0183.Xdr.TransducerCnt,_T("\u00B0") );
wxString xdrunit;
double xdrdata;
for (int i = 0; i<m_NMEA0183.Xdr.TransducerCnt; i++){
xdrdata = m_NMEA0183.Xdr.TransducerInfo[i].MeasurementData;
// XDR Airtemp
if (m_NMEA0183.Xdr.TransducerInfo[i].TransducerType == _T("C")){
SendSentenceToAllInstruments(OCPN_DBP_STC_ATMP, m_NMEA0183.Xdr.TransducerInfo[i].MeasurementData, m_NMEA0183.Xdr.TransducerInfo[i].UnitOfMeasurement);
}
// XDR Pressure
if (m_NMEA0183.Xdr.TransducerInfo[i].TransducerType == _T("P")){
SendSentenceToAllInstruments(OCPN_DBP_STC_MDA, m_NMEA0183.Xdr.TransducerInfo[i].MeasurementData, _T("Bar") );
}
// XDR Pitch (=Nose up/down)
if (m_NMEA0183.Xdr.TransducerInfo[i].TransducerType == _T("D")) {
if (m_NMEA0183.Xdr.TransducerInfo[i].MeasurementData > 0){
xdrunit = _T("\u00B0 Nose up");
}
else if (m_NMEA0183.Xdr.TransducerInfo[i].MeasurementData < 0) {
xdrunit = _T("\u00B0 Nose down");
xdrdata *= -1;
}
else {
xdrunit = _T("\u00B0");
}
SendSentenceToAllInstruments(OCPN_DBP_STC_PITCH, xdrdata, xdrunit);
}
// XDR Heel
if (m_NMEA0183.Xdr.TransducerInfo[i].TransducerType == _T("A")) {
if (m_NMEA0183.Xdr.TransducerInfo[i].MeasurementData > 0)
xdrunit = _T("\u00B0 to Starboard");
else if (m_NMEA0183.Xdr.TransducerInfo[i].MeasurementData < 0) {
else if (m_NMEA0183.Xdr.TransducerInfo[i].MeasurementData < 0) {
xdrunit = _T("\u00B0 to Port");
xdrdata *= -1;
}
else
xdrunit = _T("\u00B0");
SendSentenceToAllInstruments(OCPN_DBP_STC_HEEL, xdrdata, xdrunit);
} //Nasa style water temp
if (m_NMEA0183.Xdr.TransducerInfo[i].TransducerName == _T("ENV_WATER_T")){
SendSentenceToAllInstruments(OCPN_DBP_STC_TMP, m_NMEA0183.Xdr.TransducerInfo[i].MeasurementData,m_NMEA0183.Xdr.TransducerInfo[i].UnitOfMeasurement);
}
}

}
}

this part is the replacement for the XDR section, and then a small change to the format of the pressure display from nnnnn.n to nnnnn.nnn .

case ID_DBP_I_MDA: //barometric pressure
instrument = new DashboardInstrument_Single( this, wxID_ANY,
getInstrumentCaption( id ), OCPN_DBP_STC_MDA, _T("%5.3f") );
break;


I don´t know where to upload the complete file to be included/reviewed for inclusion into the github?

Thanks
__________________

__________________
Nick_Currawong is offline   Reply With Quote
Old 21-06-2016, 21:01   #3
Registered User

Join Date: May 2010
Posts: 49
Re: NMEA sentence for the dashboard

Hi Nick,
I ran into the same problem today.
However, my Pololu MinIMU-9 v2 (L3GD20 + LSM303DLHC) I2C IMU outputs both the pitch and roll as "A" transducer types.

$OSXDR,A,-29.8,D,I2CX,A,-11.3,D,I2CY*53

--Bob M

Quote:
You wrote:

Code:
XDR,C,n.n,C,aaaaa       -  Air temp
XDR,A,n.n,D,aaaaa       - Heel/Roll
XDR,D,n.n,D,aaaaa       - Pitch
XDR,P,n.n,B,aaaaa        - Barometric pressure

here is my changed code; I have copied/pasted here as file is too big to upload to forum. 

 if (m_NMEA0183.LastSentenceIDReceived == _T("XDR")) {  //Transducer measurement
                        /*  XDR Transducer types
                         * AngularDisplacementTransducer = 'A',
                         * TemperatureTransducer         = 'C',
                         * LinearDisplacementTransducer  = 'D',
__________________
bobmor99 is offline   Reply With Quote
Old 22-06-2016, 01:35   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 9,398
Re: NMEA sentence for the dashboard

Nick would you please make a travker entry for this, including you code and a link to this thread? Under Dashboard of course. Thanks so much.
__________________
rgleason is offline   Reply With Quote
Old 26-04-2017, 00:48   #5
Registered User

Join Date: Feb 2012
Location: Austria
Posts: 111
Re: NMEA sentence for the dashboard

Have just tested with Dashboard 1.2 on latest ocpn 4.6.1 to display the pressure.
NMEA sentence OCXDR is sent but nothing shown in Dashboard.

Has above solution not been carried forward or is it my setup?
__________________
skipperearly is offline   Reply With Quote
Old 26-04-2017, 13:43   #6
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: NMEA sentence for the dashboard

Nick......

For hell and pitch look here:
Heel and Pitch

For air pressure the $xxMDA is used:
Code:
****MDA,x.x,I,x.x,B,x.x,C,x.x,C,x.x,x.x,x.x,C,x.x,T,x.x,M,x.x,N,x.x,M*hh<CR><LF>
**      |   |  |  |          Dew point, degrees C
**      |   |  |  |          Absolute humidity, percent
**      |   |  |  |          Relative humidity, percent
**      |   |  |  |        Water temperature, degrees C
**      |   |  |  |          Air temperature, degrees C
**      |   |  |----Barometric pressure, bars
**      |----- Barometric pressure, inches of mercur
Håkan
__________________
Hakan is offline   Reply With Quote
Old 02-05-2017, 06:31   #7
Registered User

Join Date: Feb 2012
Location: Austria
Posts: 111
Re: NMEA sentence for the dashboard

@Hakan: could we (op users) please have alternatively also the XDR sentence solution as written by Nick_Currawong above? Maybe a simple ini setting to select either option

PS: have also tried NMEA coverter_pi but seems its not supported in 4.6.1 anymore.
__________________
skipperearly is offline   Reply With Quote
Old 02-05-2017, 10:08   #8
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 1,967
Re: NMEA sentence for the dashboard

skipperearly...
I'm not a OCPN coder although I sometimes share some very small suggestions I've made for my own OCPN copy. My info above was based on what's in the official code maintained by bdbcat/Dave and Nohal. The way to suggest code changes are to make a Tracker request or a push to GitHub.
Håkan
__________________
Hakan is offline   Reply With Quote
Old 31-05-2017, 22:54   #9
Registered User

Join Date: Feb 2012
Location: Austria
Posts: 111
Re: NMEA sentence for the dashboard

Thanks Hakan, for explanation.
Have now after some more testing and research raised a code change request in flyspray #2233.
Maybe you could vote also for it to get more attention - thanks.
__________________

__________________
skipperearly is offline   Reply With Quote
Reply

Tags
enc, 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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to generate nmea sentence for configuration Pegase Marine Electronics 4 03-03-2015 15:30
Radio Ocean O.Chart 7 NMEA 0183 Sentence moteje Marine Electronics 0 23-09-2013 05:13
NMEA WPL sentence support? s/v Jedi OpenCPN 9 04-03-2013 05:29
OpenCPN and NMEA sentence dmoore OpenCPN 8 21-12-2012 13:47
MOB NMEA sentence Cavalier Marine Electronics 13 27-08-2012 11:12



Copyright 2002- Social Knowledge, LLC All Rights Reserved.

All times are GMT -7. The time now is 04:47.


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.