Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 06-07-2016, 00:42   #1
Registered User

Join Date: Jul 2016
Posts: 3
AIS decoding

Good morning!

I am trying to create my own AIS decoder. Yet, I don't know where to start from after reading AIVDM. I only have AIVDM/AIVDO protocol decoding as reference and which seems to be quite indigest. For instance with the following frame:

!AIVDM,1,1,,A,18tHtHhP01Op01NKMKDrtOvp28@i,0*03

How can I know which message type it is?
AntoineC is offline   Reply With Quote
Old 06-07-2016, 13:13   #2
Registered User

Join Date: Apr 2014
Location: Puerto Rico
Boat: Cape Dory 28
Posts: 144
Re: AIS decoding

Hi Antoine,
I have never looked at this before but I glanced at the document in the protocol decoding link you included. Your example has 18tHtHhP01Op01NKMKDrtOvp28@I in the “Payload” data block. If I read this correctly, the “armoring” (where do they get these names??) uses a truncated form of ASCII using six bits per character and so the the first six bits are the message type - in your example simply a “1”. Table 4 in your decoding link gives this as a “Position Report Class A”. Table 6 gives the breakdown of this type with the next two bits being the repeat indicator (I make this as “0”) and the next 30 bits the MMSI number, a 9 digit decimal number encoded as an unsigned integer. I make this as 600194147 in your example. And so on.....
Ed
edmundsteele is offline   Reply With Quote
Old 07-07-2016, 23:36   #3
Registered User

Join Date: Jul 2016
Posts: 3
Re: AIS decoding

Thank you for your answer. I think I did a mistake when trying to decoding it because I got, with the help of the document to translate the ASCII into actual 6-bits frames.

000001 001000 111100...

Wich gives me 1, so the message type you gived,
0
But then S. Which is false as far as it isn't even a number.


The following one isn't even 0

The numbers you find actually being those of my mmsi's, can you tell me how did you did it? ?
AntoineC is offline   Reply With Quote
Old 07-07-2016, 23:56   #4
Registered User

Join Date: Jul 2016
Posts: 3
Re: AIS decoding

How, I understand, I didn't have to take them number by number but as a whole number!
AntoineC is offline   Reply With Quote
Old 08-07-2016, 05:56   #5
Registered User

Join Date: Apr 2014
Location: Puerto Rico
Boat: Cape Dory 28
Posts: 144
Re: AIS decoding

You have it Antoine!
BTW, if you have a scientific calculator (does anyone use these anymore?) with a “hex” “oct” “dec” button, you can convert your binary sequences into something easier to manipulate – I used hexadecimal; enter this value into your calculator and hit the “dec” button.

For example the first 8 “truncated ASCII” characters in your example were 18tHtHhP These map in binary to 000001 001000 111100 011000 111100 011000 110000 100000. The 30 bits for the MMSI number are the 9th thru the 38th bits (fields 8 to 37) which is this part 1000 111100 011000 111100 011000 11. I made this an “unsigned 32 bit integer” by padding it back out to a 32 bits with two leading zeroes giving 001000 111100 011000 111100 011. Now convert each group of 4 bits to a hexadecimal character and it becomes 23C63C63. Stuff this into your calculator, hit the “dec” button and it converts to your MMSI number of 600194147.
Ed
edmundsteele is offline   Reply With Quote
Reply

Tags
ais


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Decoding the multitude of sat phone threads. DefinitelyMe Marine Electronics 30 05-09-2015 16:06
For Sale: AIS-MULTI AIS Receiver with built in Antenna Splitter kokomodenny Classifieds Archive 1 17-09-2013 08:53
For Sale: Standard Horizon Matrix AIS+ GX 2150 VHF Radio/AIS Receiver with CMP30 Ram3 Second St westsailwill Classifieds Archive 6 23-04-2013 18:21
AIS Simulation - Run VDR to play AIS Nmea file rgleason OpenCPN 16 12-01-2013 10:28
Can You Get Radar & AIS Overlay on Laptop ? AIS Transceiver Recommendations ? lunasea.ds Marine Electronics 22 27-12-2010 13:06

Advertise Here


All times are GMT -7. The time now is 23:10.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.