This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Heading input over NMEA
#3
(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?


Attached Files
.gz   nmea.tar.gz (Size: 8.09 KB / Downloads: 217)
Reply


Messages In This Thread
Heading input over NMEA - by CaptDjaahn - 2020-05-04, 08:50 AM
RE: Heading input over NMEA - by johnm - 2020-05-04, 03:57 PM
RE: Heading input over NMEA - by CaptDjaahn - 2020-05-05, 04:15 PM
RE: Heading input over NMEA - by johnm - 2020-05-05, 11:50 PM
RE: Heading input over NMEA - by seandepagnier - 2020-05-05, 05:42 PM
RE: Heading input over NMEA - by CaptDjaahn - 2020-05-05, 06:06 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)