2020-05-05, 04:15 PM
(2020-05-04, 03:57 PM)johnm Wrote:(2020-05-04, 08:50 AM)CaptDjaahn Wrote: Hi,
I have a B&G H2000 on my boat, that currently is outputting pre-filtered heading information at 10hz over NMEA. I want to use this heading in the control loops of the PID instead of the yaw and heading from the IMU. (I haven't fitted the IMU).
I have modified the NMEA.py and sensor.py to receives the heading from NMEA, and I have added the calculation of yaw. I need a tip for where in the code it would be wise to:
- set the heading and yaw from NMEA that is normally calculated in boatimu.py to replacing this calculation?
- and where I would easiest deactivate the IMU module from the code?
My signals from the NMEA compass show nicely in the scope as "compas.heading" and "compas.yaw".
What did you change in nmea.py?
have another nmea router and want to connect to it.
John
I'm sure I could figure it out but I'm lazy :-)
Hello Lazy John ;-)
I have attached the NMEA and sensor.py files. But in short i have added the name of "comaps" in the NMEA_Parses, added the parses function that triggers on "HDM" in the NMEA sentence, added "compas" to the watchlist, last_values list.
In Sensor.py - added the Class compas, added compas to the sensor array in the sensor class.
And that was the easy part.
The deactiviation of the IMU requires a minor re-write of the autopilot.py script?
@ John What do you mean by another NMEA router? NMEA source or multiplexer?