NMEA 2000 Shield

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.