Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 12-05-2016, 01: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, 07: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, 20: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, 00:35   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,633
Images: 2
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 25-04-2017, 23:48   #5
Registered User

Join Date: Feb 2012
Location: Austria
Posts: 320
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, 12:43   #6
Registered User

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

Nick......

For hell and pitch look here:
http://www.cruisersforum.com/forums/...ml#post2327822

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, 05:31   #7
Registered User

Join Date: Feb 2012
Location: Austria
Posts: 320
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, 09:08   #8
Registered User

Join Date: Nov 2012
Location: Orust Sweden
Boat: Najad 34
Posts: 4,150
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, 21:54   #9
Registered User

Join Date: Feb 2012
Location: Austria
Posts: 320
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


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 14:30
Radio Ocean O.Chart 7 NMEA 0183 Sentence moteje Marine Electronics 0 23-09-2013 04:13
NMEA WPL sentence support? s/v Jedi OpenCPN 9 04-03-2013 04:29
OpenCPN and NMEA sentence dmoore OpenCPN 8 21-12-2012 12:47
MOB NMEA sentence Cavalier Marine Electronics 13 27-08-2012 10:12

Advertise Here


All times are GMT -7. The time now is 16:00.


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

ShowCase vBulletin Plugins by Drive Thru Online, Inc.