Discussion:
Open-source AIS receiver
Nick Foster
2009-10-08 20:54:34 UTC
Permalink
Eric et. al,

I've recently written an open-source AIS receiver using the GNU Radio
SDR platform. I wouldn't call it "finished", but I will call it
"stable", and if you use GNU Radio, you might be interested in it. It's
written to output NMEA-0183 sentences to interface with the GPSD AIS
decoder. The project is hosted at CGRAN, the Comprehensive GNU Radio
Archive Network, and can ordinarily be found at:

https://www.cgran.org/wiki/AIS

However, there is a DNS issue with the cgran.org domain right now, and
accessing CGRAN in the next few weeks can be done via its new IP:

https://128.2.212.19/wiki/AIS

Just a little disclaimer, yes, I know the longer sentences violate the
sentence length limit of NMEA-0183. GPSD seems to be more than happy to
parse the sentences anyway. I'll eventually add in the (simple) logic to
split up sentences, just to be safe.

Feel free to give me suggestions, comments, etc. on this program. If
there are GNU Radio aficionados out there who don't have access to the
USRP hardware, I can record some sample AIS data for people to play
with. Just let me know.

Have fun,
Nick
Eric S. Raymond
2009-10-08 22:18:16 UTC
Permalink
Post by Nick Foster
Eric et. al,
I've recently written an open-source AIS receiver using the GNU Radio
SDR platform. I wouldn't call it "finished", but I will call it
"stable", and if you use GNU Radio, you might be interested in it. It's
written to output NMEA-0183 sentences to interface with the GPSD AIS
decoder. The project is hosted at CGRAN, the Comprehensive GNU Radio
https://www.cgran.org/wiki/AIS
However, there is a DNS issue with the cgran.org domain right now, and
https://128.2.212.19/wiki/AIS
Interesting. When you have stable hosting let me know and I'll
put a link in our "Related Resources" section.
Post by Nick Foster
Just a little disclaimer, yes, I know the longer sentences violate the
sentence length limit of NMEA-0183. GPSD seems to be more than happy to
parse the sentences anyway. I'll eventually add in the (simple) logic to
split up sentences, just to be safe.
As far as GPSD is concerned, don't worry about it. Lots of GPS
receivers violate that limit in odd ways, as we've found out the hard
way over the last five years. The packet buffer in GPSD is far longer
than any AIS encoding will ever be.
Post by Nick Foster
Feel free to give me suggestions, comments, etc. on this program. If
there are GNU Radio aficionados out there who don't have access to the
USRP hardware, I can record some sample AIS data for people to play
with. Just let me know.
One of the things I want most badly for this project is a complete AIVDM
test load - significant portions of my decoders have not yet been tested
on live data, and not because I haven't been looking. If you could supply
any of the missing types I'd be very grateful.

I have regression-test loads for AIS types 1-11, 15, 18-21, and 24. I
don't have them for types 12-14, 16-17, and 22-23.

A proper test load includes both the sentence and the decoded output
oin some human-readable form - but for messages 12 and 14 in
particular I'll take any data I can get, as the payload is textual and
it ought therefore to be easy to tell if the decoding is correct.

For types 6 and 8 I have regression-test sentences but no independent
check that I've got the binary payload right. If you have any known-good
receivers you're checking your homebrew one against, perhaps you can help.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
Nick Foster
2009-10-09 00:05:54 UTC
Permalink
Eric,
Post by Eric S. Raymond
Post by Nick Foster
Just a little disclaimer, yes, I know the longer sentences violate the
sentence length limit of NMEA-0183. GPSD seems to be more than happy to
parse the sentences anyway. I'll eventually add in the (simple) logic to
split up sentences, just to be safe.
As far as GPSD is concerned, don't worry about it. Lots of GPS
receivers violate that limit in odd ways, as we've found out the hard
way over the last five years. The packet buffer in GPSD is far longer
than any AIS encoding will ever be.
Thanks for the heads-up.
Post by Eric S. Raymond
Post by Nick Foster
Feel free to give me suggestions, comments, etc. on this program. If
there are GNU Radio aficionados out there who don't have access to the
USRP hardware, I can record some sample AIS data for people to play
with. Just let me know.
One of the things I want most badly for this project is a complete AIVDM
test load - significant portions of my decoders have not yet been tested
on live data, and not because I haven't been looking. If you could supply
any of the missing types I'd be very grateful.
I have regression-test loads for AIS types 1-11, 15, 18-21, and 24. I
don't have them for types 12-14, 16-17, and 22-23.
A proper test load includes both the sentence and the decoded output
oin some human-readable form - but for messages 12 and 14 in
particular I'll take any data I can get, as the payload is textual and
it ought therefore to be easy to tell if the decoding is correct.
For types 6 and 8 I have regression-test sentences but no independent
check that I've got the binary payload right. If you have any known-good
receivers you're checking your homebrew one against, perhaps you can help.
Well, since I'm not doing the decoding, but rather the demodulation and
the sentence assembly, it's pretty easy to validate the data-- if it
demodulates correctly and passes checksum, I'm probably doing it right,
as all AIS transmissions are constructed in an identical fashion at the
physical layer. I don't have a known-good receiver to test the gpsd AIS
sentence decoding against, unfortunately. I'll set up a background task
to filter out new sentences for you, and give you what I find, but thus
far I haven't seen any of the more exotic AIS sentences.

Nick
Eric S. Raymond
2009-10-09 01:13:34 UTC
Permalink
Post by Nick Foster
I'll set up a background task
to filter out new sentences for you, and give you what I find, but thus
far I haven't seen any of the more exotic AIS sentences.
Thanks. Yes, sentence other the 1, 2, 3, 5 and 24 seem to be quite rare,
but I'm a completist. I'm not satisfied with merely adequate AIS service,
I want people to look at it, say "Wow. Best of breed!", and trust it as
a reference implementation. That's why I want to verify even the
obscure sentences.
--
<a href="http://www.catb.org/~esr/">Eric S. Raymond</a>
Loading...