Skip to content

Commit

Permalink
untested: move to nmea2000 library 4.22.0, nmea0183 1.10.1
Browse files Browse the repository at this point in the history
  • Loading branch information
andreas committed Sep 29, 2024
1 parent eacefd4 commit 4ede06e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
28 changes: 18 additions & 10 deletions lib/nmea2kto0183/N2kDataToNMEA0183.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,12 +657,14 @@ class N2kToNMEA0183Functions : public N2kDataToNMEA0183
double _Heading=N2kDoubleNA;
double _ROT=N2kDoubleNA;
tN2kAISNavStatus _NavStatus;
tN2kAISTransceiverInformation _AISTransceiverInformation;
uint8_t _SID;

uint8_t _MessageType = 1;
tNMEA0183AISMsg NMEA0183AISMsg;

if (ParseN2kPGN129038(N2kMsg, SID, _Repeat, _UserID, _Latitude, _Longitude, _Accuracy, _RAIM, _Seconds,
_COG, _SOG, _Heading, _ROT, _NavStatus))
_COG, _SOG, _Heading, _ROT, _NavStatus,_AISTransceiverInformation,_SID))
{

// Debug
Expand Down Expand Up @@ -746,12 +748,13 @@ class N2kToNMEA0183Functions : public N2kDataToNMEA0183
tN2kGNSStype _GNSStype;
tN2kAISTransceiverInformation _AISinfo;
tN2kAISDTE _DTE;
uint8_t _SID;

tNMEA0183AISMsg NMEA0183AISMsg;

if (ParseN2kPGN129794(N2kMsg, _MessageID, _Repeat, _UserID, _IMONumber, _Callsign, _Name, _VesselType,
_Length, _Beam, _PosRefStbd, _PosRefBow, _ETAdate, _ETAtime, _Draught, _Destination,
_AISversion, _GNSStype, _DTE, _AISinfo))
if (ParseN2kPGN129794(N2kMsg, _MessageID, _Repeat, _UserID, _IMONumber, _Callsign, 8, _Name,21, _VesselType,
_Length, _Beam, _PosRefStbd, _PosRefBow, _ETAdate, _ETAtime, _Draught, _Destination,21,
_AISversion, _GNSStype, _DTE, _AISinfo,_SID))
{

#ifdef SERIAL_PRINT_AIS_FIELDS
Expand Down Expand Up @@ -855,9 +858,10 @@ class N2kToNMEA0183Functions : public N2kDataToNMEA0183
bool _Display, _DSC, _Band, _Msg22, _State;
tN2kAISMode _Mode;
tN2kAISTransceiverInformation _AISTranceiverInformation;
uint8_t _SID;

if (ParseN2kPGN129039(N2kMsg, _MessageID, _Repeat, _UserID, _Latitude, _Longitude, _Accuracy, _RAIM,
_Seconds, _COG, _SOG, _AISTranceiverInformation, _Heading, _Unit, _Display, _DSC, _Band, _Msg22, _Mode, _State))
_Seconds, _COG, _SOG, _AISTranceiverInformation, _Heading, _Unit, _Display, _DSC, _Band, _Msg22, _Mode, _State,_SID))
{

tNMEA0183AISMsg NMEA0183AISMsg;
Expand Down Expand Up @@ -896,8 +900,10 @@ class N2kToNMEA0183Functions : public N2kDataToNMEA0183
tN2kAISRepeat _Repeat;
uint32_t _UserID; // MMSI
char _Name[21];
tN2kAISTransceiverInformation _AISInfo;
uint8_t _SID;

if (ParseN2kPGN129809(N2kMsg, _MessageID, _Repeat, _UserID, _Name))
if (ParseN2kPGN129809(N2kMsg, _MessageID, _Repeat, _UserID, _Name,21,_AISInfo,_SID))
{

tNMEA0183AISMsg NMEA0183AISMsg;
Expand All @@ -923,9 +929,11 @@ class N2kToNMEA0183Functions : public N2kDataToNMEA0183
double _Beam=N2kDoubleNA;
double _PosRefStbd=N2kDoubleNA;
double _PosRefBow=N2kDoubleNA;
tN2kAISTransceiverInformation _AISInfo;
uint8_t _SID;

if (ParseN2kPGN129810(N2kMsg, _MessageID, _Repeat, _UserID, _VesselType, _Vendor, _Callsign,
_Length, _Beam, _PosRefStbd, _PosRefBow, _MothershipID))
if (ParseN2kPGN129810(N2kMsg, _MessageID, _Repeat, _UserID, _VesselType, _Vendor,4, _Callsign,8,
_Length, _Beam, _PosRefStbd, _PosRefBow, _MothershipID,_AISInfo,_SID))
{

//
Expand Down Expand Up @@ -1121,8 +1129,8 @@ class N2kToNMEA0183Functions : public N2kDataToNMEA0183
int16_t ETADate=0;
double BearingOriginToDestinationWaypoint=N2kDoubleNA;
double BearingPositionToDestinationWaypoint=N2kDoubleNA;
uint8_t OriginWaypointNumber;
uint8_t DestinationWaypointNumber;
uint32_t OriginWaypointNumber;
uint32_t DestinationWaypointNumber;
double DestinationLatitude=N2kDoubleNA;
double DestinationLongitude=N2kDoubleNA;
double WaypointClosingVelocity=N2kDoubleNA;
Expand Down
4 changes: 2 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ extra_configs=

[basedeps]
lib_deps =
ttlappalainen/NMEA2000-library @ 4.18.9
ttlappalainen/NMEA0183 @ 1.9.1
ttlappalainen/NMEA2000-library @ 4.22.0
ttlappalainen/NMEA0183 @ 1.10.1
ArduinoJson @ 6.18.5
AsyncTCP-esphome @ 2.0.1
ottowinter/[email protected]
Expand Down

0 comments on commit 4ede06e

Please sign in to comment.