I am looking at an AIS printout that shows a Course Over Ground of 2665 and a Heading of 511. How do I convert those to degrees? (There’s an obvious guess but I want to be sure).
Thanks in advance.
Cheers,
Earl
I am looking at an AIS printout that shows a Course Over Ground of 2665 and a Heading of 511. How do I convert those to degrees? (There’s an obvious guess but I want to be sure).
Thanks in advance.
Cheers,
Earl
Looks like 2665 is 266.5 degrees and 511 indicates “not available” .
COG | 12 | Course over ground in 1/10 = (0-3599). 3600 (E10h) = not available = default. 3 601-4 095 should not be used |
---|---|---|
True heading | 9 | Degrees (0-359) (511 indicates not available = default) |
From here:
Great. Thanks.
Cheers,
Earl
is it radians which is how all computers deal with degrees?
I understand that’s correct that computer languages do use radians but an AIS would not be using raw GPS data but instead NEMA sentences, examples of which can be easily found on the internet.
Anyway, looks too big to be radians, 2pi = 360 degrees.
I was actually looking into this a couple weeks ago when I put together a DIY GPS receiver. It uses software from “TinyGPS”. Here’s a sample:
// retrieves +/- lat/long in 100000ths of a degree
gps.get_position(&lat, &lon, &fix_age);
// time in hhmmsscc, date in ddmmyy
gps.get_datetime(&date, &
time
, &fix_age);
// returns speed in 100ths of a knot
speed = gps.speed();
// course in 100ths of a degree
course = gps.course();
Nice one Captain…
Agreed the output from a gps chip is nmea but how about the gyro input and or any calculation the ais is making assuming we are talking a class A, when it has to process the data to calculate a collision using vectors or ?
A DP system has to take nmea input because of the rules but internal calculations are in radians as when you edit alarms etc its in radians
OK, but this is not a problem.
I wrote a large geographic and astronomic program, all in- or output is indeed in degrees, while all calculations are in radians.
Therefore, the input is immediately transformed into radians by multiplying with a constant.
Only when the final result is present in radians, it is multiplied with another constant for output.
Public Const cDegToRad As Double = 1.74532925199433E-02
Public Const cRadToDeg As Double = 57.2957795130824
Against the huge formulae used, these two simple multiplications are… just nothing.
I can’t think of any technical reason why a NMEA network couldn’t or wouldn’t use radians, of course I don’ t know much about it beyond loading/saving GPS waypoints with Waypoint for Windows (and my DIY GPS project). Degrees are a little more user-friendly for mariners.
I suppose 511 could mean 5.11 radians which would be 292.8 degrees but the manual says it means “not available”.
I would guess data on the nmea network will only be degrees as its a standard for all devices to use the data.
Internally anything that does calculation most likely would be radians but can you get that data out?
Off topic, because the link to the manual answered my question, but decimal 511 is nine ones in binary, so a likely exception/flag code for somebody programming “down in the weeds.”
Cheers,
Earl