0

How to encode Vessel data (position, course, speed & ect.) with AIS (Automatic Information System) AIVDM/AIVDO sentence.

useris
  • 59
  • 1
  • 4

3 Answers3

2

You can find a php version for encoding at my repo here - phpais

It should be pretty straight forward to understand the code if you understand how AIS strings are composed

Aaron Gong
  • 977
  • 7
  • 18
0

This is a very vague question it depends on which AIS message you want to send? (See the second link for the different msg.)

As you might see, it is a rather complexed task, but basically you have to do what is done here it-digin.com in reversed order. But there are several different message types, you can read more about the standard here United States Coast Guard

StianL
  • 45
  • 1
  • 5
  • 1
    In order to reverse the algorithm in [AIS message manual decoding](http://www.it-digin.com/blog/?p=20) (the 1st link above) you need to know which charecters are permissible. It seems they are '0'..'W' and '`', 'a'..'w'. ('xyzXYZ' are not included!). [AIS NMEA encoding/decoding](https://softwaredevelopmentperestroika.wordpress.com/2013/11/27/more-fun-with-python-navigational-tricks-ais-nmea-encodingdecoding/) may be useful too. – NameOfTheRose May 02 '17 at 12:36
0

did you try ais2csv ? It works well with NMEA sentences https://github.com/dma-ais/AisLib/tree/master/ais-lib-cli/launch4j/ais2csv

Floni
  • 475
  • 2
  • 13