Repository navigation
Tutorial AIS
What it is. AIS (Automatic Identification System) is the transponder that ships carry. Every few seconds to every few minutes it sends the vessel's name, identity number (MMSI), position, course, speed and, less often, destination and cargo class. Fishermen, harbour watchers, boat owners and radio hobbyists use it; OnAir decodes it and puts the ships on a map, in a table and as raw NMEA sentences.
A shorter overview with the default settings is in Tutorial-Ships-with-AIS. This page goes into more detail: gain, what the tabs show, how to judge range, and why you may see nothing.
- Radio. Any radio that tunes about 156 to 163 MHz. An RTL-SDR is enough. The mode asks for 2 Msps; the lowest rate that works is 250 ksps, but at 2 Msps both AIS channels fit at once. See Supported-radios.
- Antenna. A VHF marine or scanner antenna, vertically polarised, as high and as clear of buildings as you can place it. Ship antennas are vertical, so a vertical whip or a collinear works best. Range is mostly line of sight: 20 to 40 km from a window or balcony, more from a roof or a hill with a view of the water.
- Frequencies. From the repository's frequency database: AIS 1 (channel 87B) 161.975 MHz and AIS 2 (channel 88B) 162.025 MHz, both GMSK at 9600 bit/s with 25 kHz channels. The database also lists the long-range AIS channels 75 and 76 at 156.775 and 156.825 MHz, which are mainly meant for satellite reception and are usually weak on the ground. Those are not needed for ordinary use.
- Optional. A band-pass filter for 156 to 163 MHz and a low-noise amplifier near the antenna help in cities with strong FM broadcast or pager signals.
- The default start frequency is 162 MHz, the middle between the two AIS channels, at 2 Msps. Leave it. Both channels are then inside the capture and the receiver finds them itself.
- Gain: raise it until the noise floor is clearly visible in the spectrum, but stop before strong signals (FM broadcast, pagers) show up as extra lines or the level indicator shows overload. If ships near you appear but distant ones do not, lower the gain slightly; if nothing appears, raise it.
- Avoid a DC spike in the middle of the capture: with a cheap dongle the centre of the spectrum is a bad place for a weak signal, but the two AIS channels sit about 25 kHz either side of 162 MHz, so a small offset is already applied by the default choice. Do not tune exactly on 161.975 or 162.025.
- In the Mode list, group Maritime, choose Ships, 162 MHz.
- Check the tuner fields: frequency 162 MHz, rate 2 Msps.
- Set your position (setup wizard, or the map) so distances and the range plot work.
- Press Start.
- Open the mode's tab. The sub-views are Map, Table, Messages, NMEA and Range.
- Wait. In a busy harbour the first ships appear within seconds. Elsewhere a single ship may take a few minutes; the side panel (VESSELS) says "start the receiver to see vessels" until the receiver runs.
A good setup shows ships appearing as markers on the map and rows in the table. The two channels are counted separately on the Range and Messages views, so you can see whether both channels work. A healthy receiver shows far more good frames than bad ones on the Range view.
- Map. Ships as markers; click one for its card (name, MMSI, type, speed over ground, last messages, "copy position"). fit zooms to all ships, follow keeps a chosen ship in view.
- Table. Columns Name, MMSI, Type, SOG kn and Heard (how long ago). Click a column header to sort.
- Messages. Counts by message type, with columns Type, AIS 1, AIS 2, Total. Types include position reports class A and B, base station reports, static and voyage data, safety broadcasts, aids to navigation and long-range position.
- NMEA. The decoded messages as standard NMEA sentences (!AIVDM). The same sentences can go out by UDP: switch on the AIS NMEA data feed under View > Data feeds if another program should receive them. copy all puts them on the clipboard.
- Range. Per channel: Channel, MHz, Good, Bad, per min, Level dBFS, Noise dBFS, and a plot of how far away ships were heard in each direction. It is the quickest way to compare antennas or gain settings.
- The side panel (VESSELS) lists the ships heard; the Table can be sorted by any column.
- Opt-in sharing to the public map: see Live-map and Privacy. Nothing is sent unless you switch it on.
- Frequency and rate are in the tuner fields; gain is in the radio settings.
- Nothing decoded. Check the antenna is VHF and vertical, raise the gain, and confirm you are near water. A kitchen-window telescopic antenna may only hear ships within a few kilometres.
- Only noise, many bad frames. Strong out-of-band signals overload the radio. Lower the gain, add a VHF filter, or move the antenna away from computers and USB hubs.
- Ships appear and vanish. Normal: slow vessels at anchor send every 3 minutes, so the Heard column can show minutes.
- Only one channel is busy. Ships alternate between channels 87B and 88B. A permanently dead channel on the Range view points to an antenna or filter problem.
- Wrong or odd positions. Check the message type in the card. Some static messages carry no position.
- Distances are all zero. Set your position first.
- Antenna height beats gain. A cheap antenna on a roof outperforms an expensive one at a window.
- Leave the mode running for a day, then look at the Range plot to find the dead directions.
- Use the Table sorted by Heard to see which ships are coming in right now.
AIS is a broadcast meant to be received by everyone, but rules differ: receiving is legal in most countries, passing on the data or using it commercially may not be. Position data on the public map is shared only if you opt in. See Legal and Privacy.
Two channels at 161.975 and 162.025 MHz, GMSK at 9600 bit/s, bit stuffing and HDLC framing with a CRC-16 check, in 1-slot to 5-slot bursts of a self-organising time-division scheme (SOTDMA, CSTDMA for class B). Message layout follows ITU-R M.1371. The 6-bit payload is wrapped in NMEA 0183 AIVDM sentences.
Mode-AIS, Tutorial-Ships-with-AIS, Tutorial-VDES, Tutorial-DSC, Tutorial-NAVTEX, Live-map, Troubleshooting, FAQ
Getting started
Using OnAir
Tools and guides (0.2.7)
- Band survey
- Message database
- Watchlists
- TV recorder
- Time machine
- Pass scheduler
- Plugin SDK
- Headless server
- All guides
Radios
Modes by group
- TV
- Broadcast radio
- Aviation
- Maritime
- Satellite & navigation
- Two-way radio
- Cellular & rail
- Pagers
- IoT & sensors
- Weather & science
- Amateur: digital
- Amateur: voice & packet
- HF utility
- General & tools
Tutorials
- DVB-T2 TV with a HackRF
- FM radio with RDS
- Aircraft with ADS-B and the map
- Ships with AIS
- DAB+ digital radio
- Weather satellite images
- HF digital: FT8 and WSPR
- Digital voice: DMR, D-STAR, P25
- Pagers: POCSAG and FLEX
- Time stations and the clock
- Record IQ, then the Signal workbench
- The signal sample library
- Control a rig with Hamlib
- Two receivers and the multi-decoder
Reference
Help
Legal and privacy
More