I am currently working with AIS dataset containing fields MMSI, Timestamp, LAT, LON, SOG, COG, etc. Here, COG is course over ground, and supported COG value ranges from 0 to 360 degrees. But the dataset contains negative values in some rows. I like to know is there any formula or rule to convert it into 0-360. Since I am working with python, if someone knows how to do it in Python would be appreciated but any formula could work. For convenience, I have attached a screenshot of a sample dataset.
How to fix AIS COG Values
402 Views Asked by faring At
2
To convert an angle to between 0 and 360, find the modulus of dividing by 360:
examples: