Go Down

Topic: NMEA 2000 Shield (Read 271548 times) previous topic - next topic

timolappalainen

You mentioned that you want to simulate GNNS data with Kvasar Leaf. Kvasar Leaf does not understand Actisense format. So you should write or find program for that.

With Simulator you can simulate lot more data than just GNSS. And as I mentioned you do not necessarily need NGT-1, since you can build simple simulator hw with Teensy 3.2 and use my NMEA2000 library example ActisenseListenerSender.

skyjumper

...  since you can build simple simulator hw with Teensy 3.2 and use my NMEA2000 library example ActisenseListenerSender.
Ah, I didn't realize that. Thanks!  I'll give that a try.

sglard

Hi,
First time here, so first, thank you very much for this amazing project, I was hopping to try it out for some time now. (I was just looking for the right project)

I just connected a new Simrad GPS to my Garmin plotter and it seems the Garmin plotter ignore the messages from the GPS (I made sure both the GPS and the plotter are working correctly and with the right setting) my current theory is that the PGN values from the GPS are slightly difference then the ones expected by Garmin.    

I am thinking of building a nmea 2000 device that will receive the network traffic from the GPS and will resubmit it back to the network with the correct values, Does building something like this make any sense / possible ?

Many thanks,
Sglard

timolappalainen

It is possible, but does not make sense.

GPS message is so standard that should not be any differencies between devices. Normally you have this kind of problems with e.g. tank or temperature sensors. Some manufacturers has used proprietary messages instead of standard messages, so other manufacturer does not understant those messages. But I doubt that with GPS.

- First check from https://www.nmea.org/content/STANDARDS/nmea_2000_certified_products that both your products are certified. If they are, you could contact to dealer.

- Do you get any NMEA2000 data to Garmin?

- Do you have termination resistors on the NMEA2000 bus?

The easies way to spy network traffic is to buy e.g. Actisense NGT-1. If you like to build your own, Buy Teensy 3.2 and necessary parts or Teensy 3.2 breakout board with can (e.g. https://copperhilltech.com/teensy-3-2-with-can-bus-breakout-board/) and use my library example ActisenseListener.

sglard

Thanks for the quick reply!

I can see that the data is getting to the Garmin plotter because i was able to to capture some of the network traffic with the plotter diagnostic menu. The plotter (and another Garmin multiplication display) that are connected to the network shows the satellite view with about 10 sats, but for some reason it ignore the gnss position message, acting like it doesn't get a position from the GPS, that what makes me believe that perhaps there is some compatibility issue.
here is the message that i captured -

129029   GNSS Position Data   Simrad   0x005A472045382B006C3E41DC69A90600B432A266DB09EF7089EDFFFFFFFFFF12FC003C0064005CF9FFFF00
once ill get a message from a Garmin GPS, ill might be able to compare the two.

Both of the devices are certified and i opened a ticket with Garmin with the debug info, but since its an old plotter it might take a while until they will release an update (if ever)

Thanks again,
Sglard


apfiorotto

#860
Jan 17, 2020, 11:13 pm Last Edit: Jan 17, 2020, 11:30 pm by apfiorotto
Hello, i'm glad i've found this thread, it has been very helpful the last few weeks. I've been tinkering with an arduino Due and MCU9250 tilt compensated compass, and after managing to get a good reading of the compass I added a CAN transceiver to feed heading data to the navigation system of a sailboat.

Using the amazing library provided by timolappalainen i made it work! Besides heading, the compass also sends the attitude (roll, pitch), but i'm stuck on an specific propietary PGN from B&G, that allows to set the offset (magnetic deviation of the compass, not the magnetic variation/declination) from the navigation system.
The problem is that when i set the offset from the B&G Triton screen, it gives me an (unspecified) error.

I've identified the message sent with the desired offset, it's the 130845 and it's listed in the canboat repo (https://raw.githubusercontent.com/canboat/canboat/master/analyzer/pgn.h) as "Simnet: Compass Heading Offset". Using the log output from the nmea2000 library i captured the message, but it seems that the triton is expecting an acknowledge or confirmation message from the arduino compass.

Does anyone know how to send that ack? i've been reading everything i coud find about nmea2000 but it's not clear to me how to do it.
 
Thanks in advance!

timolappalainen

Have you read the message 130845 from bus sent by Triton, when you try to set offset?

Do you know anybody having e.g. presision compass so that you could spy communication between them?

The problem with NMEA2000 is that it is hard to get desricption for messages - specially for proprietary. From pgn.h desrciption for 130845 it is not clear for me is that status message or commanding message.

But why do you need to use that message, if compass is your own? You could set offset through serial port. Also for defining compass magnetic deviation you need to have full 360 deg table e.g. with 10 deg separation. Deviation table will then also include errors caused by boat.


apfiorotto

thanks for the answer!


Have you read the message 130845 from bus sent by Triton, when you try to set offset?

yes, i captured these (there is another one, 130822, at the end) when i set the offset at the triton.


492219   Pri:3   PGN:130845   Source:6   Dest:255   Len:8   Data:20,E,41,9F,16,FF,FF,FF
492219   Pri:3   PGN:130845   Source:6   Dest:255   Len:8   Data:21,0,0,0,1,5D,F2,FF
492221   Pri:3   PGN:130845   Source:6   Dest:255   Len:8   Data:22,FF,FF,FF,FF,FF,FF,FF
492741   Pri:3   PGN:130845   Source:6   Dest:255   Len:8   Data:40,E,41,9F,16,FF,FF,FF
492741   Pri:3   PGN:130845   Source:6   Dest:255   Len:8   Data:41,0,0,0,1,5D,F2,FF
492744   Pri:3   PGN:130845   Source:6   Dest:255   Len:8   Data:42,FF,FF,FF,FF,FF,FF,FF
493267   Pri:3   PGN:130845   Source:6   Dest:255   Len:8   Data:60,E,41,9F,16,FF,FF,FF
493267   Pri:3   PGN:130845   Source:6   Dest:255   Len:8   Data:61,0,0,0,1,5D,F2,FF
493270   Pri:3   PGN:130845   Source:6   Dest:255   Len:8   Data:62,FF,FF,FF,FF,FF,FF,FF
499117   Pri:3   PGN:130822   Source:6   Dest:255   Len:8   Data:C1,1,13,FC,2,2C,0,0
499119   Pri:3   PGN:130822   Source:6   Dest:255   Len:8   Data:C2,48,6F,FF,FF,FF,FF,FF
499495   Pri:3   PGN:130822   Source:6   Dest:255   Len:8   Data:E0,F,13,99,FF,1,0,1
499495   Pri:3   PGN:130822   Source:6   Dest:255   Len:8   Data:E1,3,0,FC,2,7D,0,0
499497   Pri:3   PGN:130822   Source:6   Dest:255   Len:8   Data:E2,BD,8C,FF,FF,FF,FF,FF


Do you know anybody having e.g. presision compass so that you could spy communication between them?

no...unfortunately i don't. I've read manuals from several manufacturers but there is no mention of that pgn.



But why do you need to use that message, if compass is your own? You could set offset through serial port.

For ease of use, just that. The backup plan is to point the sailboat north using a standart compass and use a button in the arduino to take the actual reading and use it as an offset, saving that value in flash. Right know i'm hardcoding it.



Also for defining compass magnetic deviation you need to have full 360 deg table e.g. with 10 deg separation. Deviation table will then also include errors caused by boat.

i've saw that tables, but aren't they used in standart compasses? In this case, using an electronic compass integrated with the nmea2000 bus, the two methods i've learned to calibrate the compass are the offset to compensate for the misalignation between the x axis of the compass and the sailboat's keel, and doing 720 degree (or 390, depending on manufacturer) turns to negate the hard and soft iron distortions of the boat.


I'll move forward with the backup plan, implementing a way to set the offset directly in the arduino.


timolappalainen

So it seem to have 500 ms timeout and then try again. You could try to respond with simple ACK message (PGN 59392).
Code: [Select]
SetN2kPGNISOAcknowledgement(N2kMsg,0,0xff,130845UL);
NMEA2000.SendMsg(N2kMsg);


If it does not help, then you need to find a compass for testing.

Or does it matter, if Triton does not get ack? You get offset from PGN 130845 and start to use that.

Electric compasses (except GPS and true Gyro) has also variable error. They are measuring magnetic fields as traditional compass. Magnetic fields will be also disturbed by ship and depends of the compass position on the ship. So if you want to have it accurate, you should run a table with 5-10 deg period. Old compasses were calibrated by running circles with constant speed. I do not know how they do it now by moving 8 track like with cell phone. Byt I think it may be difficult to fix compass to boat and move whole system with 8 track.

apfiorotto

I'll try the ack as soon as i can test it on the boat and let you know.


I also forgot to tell you that i can't parse the pgn 130845. I couldn't find the procedure for that message. I was planning to code it but i have to learn how, from others in you library.


For calibration, i've done it moving the compass around its three axes on the position where i will fix it to the boat (as recomended in forums and libraries)  and then use the offset to compensate for any (linear) deviation on the measurement.

hansdefect

Hi,

Does anyone here have a Simrad AP44 Autopilot Controller with a B&G MFD or Triton2 who's able to capture some N2K traffic? Preferably during boot and then pressing the standby/auto/wind/+-10/+-1 buttons.

I've got an Beneteau Oceanis 40 with Raymarine Tridata (ST60) sensors and a CW80 MFD. Recently I've added a B&G Triton2 and it's showing most of the data. It won't however show the AutoPilot info, and I want it to. I also want to be able to control the AP from the b&G Vulcan 12" that I'm planning to install.

My plan is now to capture the Raymarine communication PGNs and convert them to Simrad AP44 Autopilot Controller messages and by doing so fooling the B&G MFD and Triton2 into thinking 'it's one of them'.

I'm planning to first make it work SignalK, to see if it's simple enough that I can program it onto Arduino.

JCW

Gentlemen please forgive me if this has been answered in this thread. I did look through but could not find a solution. I would like to run a basic RPM and Temperature NMEA2000 transmitter from my outboard on Atmega328 (uno or pro mini).

I cannot seem to get any of the example code to compile in a small enough memory space even after doing: NMEA2000.SetN2kCANMsgBufSize(2); &  NMEA2000.SetN2kCANSendFrameBufSize(15).

Does anyone have an example that compiles for uno that I can work off?

Thank you Timo for this library! :)

timolappalainen

Read through https://github.com/ttlappalainen/NMEA2000/issues/20

It may help or not anymore, since on later updates I do not try to support so low memory devices as Uno. I rpefer to change to some more powerful device like Teensy 3.2 or ESP32.

kenobiben

Gentlemen please forgive me if this has been answered in this thread. I did look through but could not find a solution. I would like to run a basic RPM and Temperature NMEA2000 transmitter from my outboard on Atmega328 (uno or pro mini).

I cannot seem to get any of the example code to compile in a small enough memory space even after doing: NMEA2000.SetN2kCANMsgBufSize(2); &  NMEA2000.SetN2kCANSendFrameBufSize(15).

Does anyone have an example that compiles for uno that I can work off?

Thank you Timo for this library! :)
Hi, I will try to help you, but
1st I have to know how do you acquire the rpm signal from your engine and how this signal like
2nd what kind temperature do you want to send(outside,engine) and how this signal like
In last why don't switch to arduino mega who can handle more signal and have more memory?

skyjumper

Hi All, has anyone tried and, hopefully, been successful setting a waypoint on a Garmin or other plotter using a non-proprietary PGN? There are a number of PGNs related to waypoints and routes, but it seems most of them involve fetching route and waypoint data from a plotters database. Is there one to insert a waypoint into a database?

I have also seen PGNs that refer to distance to a "mark" or distance between two "marks" but apparently no way to create a "mark."

 

Go Up