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 12-04-2015, 03:05   #1
Registered User

Join Date: Apr 2015
Location: Norfolk, UK
Posts: 68
AIS decoders compared

With the ultimate aim of running AIS on an SDR dongle/Raspberry Pi, I thought it would be useful to compare some different software AIS decoders. Searching the web, nobody seems to have done this before. To eliminate receiver variables, I used a pre-recorded audio file (-LA_LB_Snippet.wav downloaded from the Yahoo AISMon site). I was surprised by the variation of results, as follows:
AISDecoder on Raspberry Pi: 73 valid messages
AISDispatcher on Windows 7: 74 valid messages
AISMon on Windows 7: 99 valid messages
Shipplotter on Windows 7: 82 valid messages
And this isn't necessarily a matter of one software being better than another - for instance AISDecoder found 3 messages that AISDispatcher missed, and vice versa.
On the face of it, AISMon is the best, but is closed-source, so I don't know why.
Incidentally I repeated these tests with my own sound files, with similar results.
I would be interested to know what other users think.
duichan is offline   Reply With Quote
Old 13-04-2015, 08:52   #2
Registered User

Join Date: Aug 2014
Location: Argentina
Boat: H20
Posts: 62
Re: AIS decoders compared

Duichan,

I'm interested on this, casually I'm experimenting with different software in Linux and Windows. Until now the bests results were with gnuais on Linux. I'll will search the reference file for testing with gnuais to see what happens, and share the results.

Regards, David
piluso is offline   Reply With Quote
Old 13-04-2015, 10:16   #3
Moderator Emeritus
 
Paul Elliott's Avatar

Cruisers Forum Supporter

Join Date: Sep 2006
Posts: 4,663
Images: 4
Re: AIS decoders compared

Are the decoding differences due to the sound-to-bits process, or the bits-to-messages process? Perhaps some of the decoders don't recognize all message types. There are a lot of less-interesting message types out there.
__________________
Paul Elliott, S/V VALIS - Pacific Seacraft 44 #16 - Friday Harbor, WA
www.sailvalis.com
Paul Elliott is offline   Reply With Quote
Old 13-04-2015, 12:00   #4
Registered User

Join Date: Apr 2015
Location: Norfolk, UK
Posts: 68
Re: AIS decoders compared

David
Please do. Gnuais and gr-ais are on my list to check, but I am temporarily without my RPi. (I was one of the unlucky ones with a faulty microSD card holder.)
Regards
Andrew
duichan is offline   Reply With Quote
Old 13-04-2015, 12:04   #5
Registered User

Join Date: Apr 2015
Location: Norfolk, UK
Posts: 68
Re: AIS decoders compared

Paul
As far as I can tell the differences are in the initial sound-to-bits decode. The majority of the messages in the test sample are of type 1, 2 or 3 and there is no obvious pattern to the messages that are missed.
Regards
Andrew
duichan is offline   Reply With Quote
Old 13-04-2015, 19:08   #6
Registered User

Join Date: Aug 2014
Location: Argentina
Boat: H20
Posts: 62
Re: AIS decoders compared

First, I had to convert the file to 16 bits (8 bits original) since aisdecoder and gnuais needs 16 bits files. Trivial, no further process for this test.

gnuais:
2015/04/14 01:33:43.248998 gnuais[3584:3069363968] INFO: A: Received correctly: 73 packets, wrong CRC: 17 packets, wrong size: 3 packets

aisdecoder:
#aisdecoder -h 127.0.0.1 -p10110 -a file -c mono -f _LA_LB_Snippet16.wav -d 2<&1 | wc -l

77 -> packets correctly decoded

Very similar your tests, a little better aisdecoder.

But something interesting happend, because when I converted the file to 16 bits, and playing with the audio editor, looking the spectrum shape of a GMSK signal 9600 bps, after some tweaking, I found a nice improvement applying a 6 db enhacement at 9100 Khz, Q=1. The results:

gnuais:
2015/04/14 01:45:00.507685 gnuais[3773:3069507328] INFO: A: Received correctly: 91 packets, wrong CRC: 8 packets, wrong size: 2 packets

aisdecoder:
# aisdecoder -h 127.0.0.1 -p10110 -a file -c mono -f _LA_LB_Snippet16_Proc.wav -d 2<&1 | wc -l
96 -> packets correctly decoded

I ran a rough test using gnuradio-companion -> aisdecoder with this approach, and saw a better behavior, the software started to see an AIS base station that almost never can reach from home.

Probably the decoders doesn't provide a proper filtering of the signal for AIS, may be some SDR guru could look into this.

Regards, David
piluso is offline   Reply With Quote
Old 15-04-2015, 04:22   #7
Registered User

Join Date: Apr 2015
Location: Norfolk, UK
Posts: 68
Re: AIS decoders compared

Hi David
This is very interesting indeed.
I assume you meant that the audio filter was at 9100 Hz not kHz? I have tried your technique and do see an improvement, but not by quite as much as you. (This may well be down to the actual filter algorithm employed.) Comparing AIS decodes from the filtered and unfiltered files line-by-line, although there are more packets overall in the former, there are some packets only detected in the latter!
I am going to post on the forum at aishub.net to see whether the developers of AISDecoder have any comment.
Best regards
Andrew
duichan is offline   Reply With Quote
Old 15-04-2015, 06:24   #8
Registered User

Join Date: Aug 2014
Location: Argentina
Boat: H20
Posts: 62
Re: AIS decoders compared

Andrew:

Quote:
I assume you meant that the audio filter was at 9100 Hz not kHz?
Yes, Hz :-)

Here is more info about what I did, in case you want to share with the aishub forum:

This is a print screen of the filter I applied using an old Cool Edit, parametric eq. I reduced the overall gain by 6db too, to compensate the 6db enhancement.



Here is a link to the processed file: http://dgiardini.com.ar/files/aistest.html

I would like to see the optimal filter for this kind of signal, if I find something interesting I'll post it here.

Please, let us know the comments from aishub.

Regards, David
piluso is offline   Reply With Quote
Old 18-04-2015, 07:43   #9
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,429
Re: AIS decoders compared

Isn't it true that aisdecoder can only handle channel A or B but not both at the same time like gnuradio?

Maybe your 6db gain helps only with this particular file? What about one recorded from rtl_fm? Maybe the antenna affects it as well? Could you possibly write some kind of script to try thousands of possible filters to determine the optimal one? It might be more complex as when a target is farther away, it might need a different filter than a closer one, or even depending on how fast it is moving.
seandepagnier is offline   Reply With Quote
Old 19-04-2015, 13:06   #10
Registered User

Join Date: Aug 2014
Location: Argentina
Boat: H20
Posts: 62
Re: AIS decoders compared

Quote:
Isn't it true that aisdecoder can only handle channel A or B but not both at the same time like gnuradio?
aisdecoder can handle the two AIS channels, the problem is rtl_fm, that only can tune one channel at time and send a mono audio stream. With gnuradio you can tune both channels and feed the left and right audio inputs of aisdecoder.
Quote:
Maybe your 6db gain helps only with this particular file? What about one recorded from rtl_fm?
This is something that worth to test, I'll try it.

Quote:
Maybe the antenna affects it as well?
The antenna can't change the demodulated audio spectrum.

Quote:
Could you possibly write some kind of script to try thousands of possible filters to determine the optimal one?
May be starting with a recording from rtl_fm, we could go further filtering audio data, let's start from there and see what happens.

Quote:
It might be more complex as when a target is farther away, it might need a different filter than a closer one, or even depending on how fast it is moving.
The shape of the filter depends on signal and communication channel including the rtl-sdr dongle and software demodulator. But there is not doppler effect here.

Regards, David
piluso is offline   Reply With Quote
Old 20-04-2015, 05:23   #11
Registered User

Join Date: Aug 2009
Location: oriental
Boat: crowther trimaran 33
Posts: 4,429
Re: AIS decoders compared

Quote:
Originally Posted by piluso View Post
aisdecoder can handle the two AIS channels, the problem is rtl_fm, that only can tune one channel at time and send a mono audio stream. With gnuradio you can tune both channels and feed the left and right audio inputs of aisdecoder.
So aisdecoder needs the channels to be on left and right, or two instances of aisdecoder?

It shouldn't be too difficult to modify rtl_fm to support this.
Quote:
May be starting with a recording from rtl_fm, we could go further filtering audio data, let's start from there and see what happens.
Also rtl_fm has the fir size -F option.
Quote:
The shape of the filter depends on signal and communication channel including the rtl-sdr dongle and software demodulator. But there is not doppler effect here.

Regards, David
yes, but what about the case with a lot of noise which corrupts some data in the message (like ship name, or course etc...) Because of many past messages, and because the raw signal is similar (a different ship might have a stronger or weaker signal), we can deduce that it is just a newer message from that particular vessel and correct the noisy data. I would think that a lot of cases messages are missed because only 1-2% of the data is corrupted which a program could "fix"
seandepagnier is offline   Reply With Quote
Old 20-04-2015, 07:01   #12
Registered User

Join Date: Aug 2014
Location: Argentina
Boat: H20
Posts: 62
Re: AIS decoders compared

Quote:
So aisdecoder needs the channels to be on left and right, or two instances of aisdecoder?
Just one instance, left is channel A and right is channel B.
Quote:
It shouldn't be too difficult to modify rtl_fm to support this.
It's not an easy task, but something doable for an experienced SDR programmer
piluso is offline   Reply With Quote
Old 20-04-2015, 08:28   #13
Registered User

Join Date: Apr 2015
Location: Norfolk, UK
Posts: 68
Re: AIS decoders compared

It seems to me that there are two completely separate issues here. The first is why some AIS software decoders are "better" than others, when the same (mono) audio signal is fed to them. I've had no response from the aishub forum on that yet. I don't believe this is related to the receiver software, since I found similar decoding differences using data generated by SDRSharp on a Windows laptop. I need to record a much longer audio file to experiment with, which I hope to do later this week when I shall be in much busier waters. Depending on how that goes I don't mind tackling a software filter.

The second issue is that it would be really good to get rtl_fm to receive both AIS channels simultaneously. Kyle Keene was working on this RTL-SDR IndieGoGo sprint but there has apparently been no further progress since December 2014. The source code is here: https://github.com/keenerd/rtl-sdr. I've had a quick look at the code and there doesn't look like much left to do, but I'm not an SDR expert.

Regards
Andrew
duichan 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
A Gunboat is slow compared to this cruiser deckofficer Multihull Sailboats 44 24-12-2023 17:08
How Much Time at Dock Compared to Anchorage ? cbtucker Liveaboard's Forum 36 10-07-2011 20:33
Living Aboard at Anchor in Australia Compared to US endoftheroad Liveaboard's Forum 25 06-05-2011 05:42
Has Anyone Compared the Maine Cat 30 to the PDQ 32 ? snort Multihull Sailboats 12 22-01-2011 14:02
DNC Vector compared to ENC vector chart? adjuvantjfoster Marine Electronics 8 17-09-2006 17:19

Advertise Here
  Vendor Spotlight
No Threads to Display.


All times are GMT -7. The time now is 12:40.


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.