This repository has been archived by the owner on Jul 3, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Capturing raw AIS data using rtl_fm and decoding using aisdecoder
James Mead edited this page Apr 3, 2015
·
12 revisions
I captured 4 x raw AIS data files by running the following commands on my Mac laptop while crossing the Solent on a RedJet ferry which departed West Cowes at 0915 on Monday, 30th March:
rtl_fm -f 162018500 -p 35 -s 48k > test-162018500-p35-s48k.raw
rtl_fm -f 162025000 -p 35 -s 48k > test-162025000-p35-s48k.raw
rtl_fm -f 161975000 -p 35 -s 48k > test-161975000-p35-s48k.raw
rtl_fm -f 161967400 -p 15 -s 48k > test-161967400-p15-s48k.raw
This resulted in the following raw data files:
- test-162018500-p35-s48k.raw
- test-162025000-p35-s48k.raw
- test-161975000-p35-s48k.raw
- test-161967400-p15-s48k.raw
- I chose the frequency (
-f option
) values based on the signals I could see in GQRX running on my Mac laptop. The signals all seemed pretty weak. - I chose the value of the PPM error (
-p
option) based on the value (35
) used in the example in this README. And that README suggests I also experimented by changing it to15
in the last capture.
I tried to decode the AIS NMEA sentences from the raw files captured above using aisdecoder
on the Ubuntu Virtual Box VM running on my Mac laptop. I ran the following commands:
aisdecoder -h 127.0.0.1 -p 1234 -a file -c mono -d -f test-162018500-p35-s48k.raw
aisdecoder -h 127.0.0.1 -p 1234 -a file -c mono -d -f test-162025000-p35-s48k.raw
aisdecoder -h 127.0.0.1 -p 1234 -a file -c mono -d -f test-161975000-p35-s48k.raw
aisdecoder -h 127.0.0.1 -p 1234 -a file -c mono -d -f test-161967400-p15-s48k.raw
Unfortunately only a single NMEA sentence was decoded (from the last file: test-161967400-p15-s48k.raw
):
!AIVDM,1,1,,A,13M@DV0002wqVHFM7gGEUmu00@D>,0*0F
I used AGG Software's Online AIS Decoder to decode this NMEA sentence:
Name | Value | Description |
---|---|---|
Packet Type | AIVDM | |
CHANNEL | A | |
Message Type | 1 | Scheduled Position Report |
Repeat Indicator | 0 | Default |
User ID | 232002712 | |
Navigation Status | 0 | Under way using engine |
Rate of Turn (ROT) | 0 | Turning right at up to 708 degrees per minute or higher |
Speed Over Ground (SOG) | 0.2 | |
Position Accuracy | 1 | A DGPS-quality fix with an accuracy of < 10 ms |
Longitude | -1.39816666666667 | West |
Latitude | 50.8925283333333 | North |
Course Over Ground (COG) | 143.1 | |
True Heading (HDG) | 190 | |
Time Stamp | 32 | |
Reserved for regional | 0 | Not available (default) |
RAIM flag | 0 | RAIM not in use (default) |
Communication State | 66830 | Sync state: UTC Direct; Slot Timeout: 4 frames respectively are left until slot change; Slot number: 1294 |
Communication Sync State | 0 | Sync state: UTC Direct |
Communication Slot Timeout | 4 | Slot Timeout: 4 frames respectively are left until slot change |
Communication Sub Message | 1294 | |
Communication Utc Hour | No value | |
Communication Utc Minute | No value | |
Communication Time Stamp | No value | |
Communication Slot Number | 1294 | |
Communication Received Stations | No value | |
Communication Slot Offset | No value |
- The position is alongside one of the docks in Southampton which seems to make sense.
- The "User ID" appears to be the MMSI for the Southampton-based tug Svitzer Alma.