Decode AIS String using PHP

Print Friendly, PDF & Email

This is for all who may want to decode an AIS String but never knew how to do.

For all who don’t know what is AIS.. try this link … ion_System

this code is tested for type 1 messages and further development has been stalled. I had just coded it in my free time on ship. It is scripted in PHP. but you may adapt for c++ or VB.

You can download the file here -> aisphpdecode  (rename the file after downloading)

Ishan Karve

About Ishan Karve

Ishan Karve is just an every day normal guy next door who happens to be an Electronics Engineer by profession and dabbles with PHP, Javascript, C++ and python. His interests vary as seasons change.. they change from astronomy to soul searching. This site is just a reflection of what he does to keep his mind engaged when he is not occupied by work and family. He is an extremely objective guy and is always ready for some good arguments.. of course over a glass of 40% proof alcohol.
This entry was posted in PHP, Programming and tagged . Bookmark the permalink.

3 Responses to Decode AIS String using PHP

  1. Jack Reynolds says:

    When trying to implement/run this in a project it won’t run.
    In the function asciidec_2_8bit($ascii) – you have
    if ($ascii else // why is there no closing bracket and a random else here?
    if($ascii>87 && $ascii else // same again here?
    If any help could be given to me to get the code to work it would be greatly appreciated as I am trying to implement this ais decoding code into a project of mine for college.
    Many thanks,
    Jack Reynolds

  2. Zsolt Bihari says:

    It’s a good idea for BASH and my webserver, thanks!
    If I need the CallSign and the ShipName, then how make the output with this PHP script?
    I’m reading AIS manuals, but not find it this mistic…


Leave a Reply

Your email address will not be published. Required fields are marked *