Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with SetN2kPGN130824(). #3

Open
kdschmidt1 opened this issue Sep 29, 2022 · 3 comments
Open

Problem with SetN2kPGN130824(). #3

kdschmidt1 opened this issue Sep 29, 2022 · 3 comments

Comments

@kdschmidt1
Copy link

Hello htool,
I tried your code with a triton2 display.
beside some issues like

  1. turnOnAutoCalibration(): Acc. Documentation it shoul work like->To store a profile write the following to the command register 0xF0, 0xF5, 0xF6 with a 20ms delay after each of the three bytes.
  2. it would make sense to use Gyroscope calibrated values with SW-version>5 (Register 0x25,0x27,0x29)
  3. some unused code like getgyroX..,Y..Z)

that i could all solve by myself i still have a problem with SetN2kPGN130824().
It seems the values should be Pitch rate and Roll rate.
so i.e. line 611 should be N2kMsg.Add2ByteDouble(gyroY * DEG_TO_RAD, 0.0001);
but the value in the data log is not changing, whatever value is used. It remains 0.1 °/sec
can you help?
thanks for your effort.

@htool
Copy link
Owner

htool commented Sep 30, 2022

  1. I couldn't get the chip to work reliably before the season started. If you can, please MR.
  2. Please do.
  3. Yes, the code changed a lot trying different ways to get reliable compass data. If you can help clean up, please do.

This is a NMEA2000.c that needed fixing:

  • N2kMsg.Add4ByteUDouble(RateOfTurn,3.125E-08); //1e-6/32.0
  • N2kMsg.Add4ByteDouble(RateOfTurn,3.125E-08); //1e-6/32.0

You can start with feeding it a fixed number and see if you see it on the triton. Then move on from there.

~hans

@kdschmidt1
Copy link
Author

hello hans,
thank you for the answer, but:
you are referring to a NMEA2000.c that is not part of your code.
i tried exchanging line 562 and 565 N2kMsg.Add2ByteDouble(roll * DEG_TO_RAD, 0.0001) with N2kMsg.Add4ByteUDouble(fixed number,3.125E-08), but this is leading to new data items, so it seems the 3rd and 4th byte are interpretated as new key, so only 2 byte payload are valid.
Can you please chaeck again or do you have some candump data from the precision9??
regards
klaus

@htool
Copy link
Owner

htool commented Oct 1, 2022

Correct it's not part my code. Source is/was: https://githubplus.com/ttlappalainen/NMEA2000/issues/223

Looking at it again, it seems 130824 isn't needed. It's a performance packet produced on the H5000/WTP3.
BTW, I'm looking into this packet for the B&G Performance plugin (producing pgn 130824) and I'm struggling to understand the difference between the x00, x10, x11 and x21 suffixes (other than that they play a role in the payload length). If you have an idea, I'd like to hear it.

Precision 9 dump:
2021-09-30-11:44:28.186,3,127251,22,255,8,00,3e,03,09,00,27,02,ff
2021-09-30-11:44:28.187,2,127250,22,255,8,00,77,d6,ff,7f,ff,7f,fd
2021-09-30-11:44:28.237,3,127251,22,255,8,00,ce,5b,08,00,ff,7f,fd
2021-09-30-11:44:28.237,2,127250,22,255,8,00,81,d6,ff,7f,ff,7f,fd
2021-09-30-11:44:28.238,3,127257,22,255,8,00,ff,7f,db,ff,79,ff,ff
2021-09-30-11:44:28.238,3,127252,22,255,8,00,00,00,ff,ff,ff,7f,fd
2021-09-30-11:44:28.239,2,65350,22,255,8,e9,01,fa,ff,38,27,02,ff
2021-09-30-11:44:28.287,3,127251,22,255,8,00,21,c6,08,00,27,02,ff
2021-09-30-11:44:28.287,2,127250,22,255,8,00,8b,d6,ff,7f,ff,7f,fd
2021-09-30-11:44:28.337,3,127251,22,255,8,00,31,de,08,00,ff,7f,fd
2021-09-30-11:44:28.347,2,127250,22,255,8,00,95,d6,ff,7f,ff,7f,fd
2021-09-30-11:44:28.347,3,127257,22,255,8,00,ff,7f,d8,ff,67,ff,ff
2021-09-30-11:44:28.347,3,127252,22,255,8,00,00,00,ff,ff,ff,7f,fd
2021-09-30-11:44:28.347,2,65350,22,255,8,d8,01,f4,ff,42,27,02,ff
2021-09-30-11:44:28.387,3,127251,22,255,8,00,fe,80,08,00,27,02,ff
2021-09-30-11:44:28.388,2,127250,22,255,8,00,9f,d6,ff,7f,ff,7f,fd
2021-09-30-11:44:28.438,3,127251,22,255,8,00,03,9f,08,00,ff,7f,fd
2021-09-30-11:44:28.438,2,127250,22,255,8,00,a9,d6,ff,7f,ff,7f,fd
2021-09-30-11:44:28.439,3,127257,22,255,8,00,ff,7f,d4,ff,5c,ff,ff
2021-09-30-11:44:28.439,3,127252,22,255,8,00,00,00,ff,ff,ff,7f,fd
2021-09-30-11:44:28.440,2,65350,22,255,8,da,01,ef,ff,48,27,02,ff

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants