I understand that AIS units should source heading a mag compass and course from gps COG but they should more or less be close to each other.
I also understand that not all AIS transponders (and particularly class B units) will send course data.
When I get any course info at all (other than 0) from gpsdecode it's quite a bit different than the reported heading.
Msg type 3 Heading 306 Course 270
Msg type 3 Heading 231 Course 1
Msg type 1 Heading 16 Course 150
Msg type 1 Heading 321 Course 257
In the latest sample of 150 or so messages, almost all type 1's received have heading data but course is reported as 0.
In type 3 messages, heading is always present but course is either mysteriously different or (mostly) 0.
I've checked my code - in all cases I'm taking the values returned as ['heading'] or ['course'] and just passing it through to the database without any manipulation.
Have I missed some important transform that I am supposed to be doing to either heading or course?
I'm still using the version of gpsd that is available from the Ubuntu repository (2.something I think).
Haven't yet met the challenge of building gpsd from source.
Cheers;
Roy