Console¶
The output of NMEA messages to screen can be regulated with the -o
switch. To suppress any messages to screen use -o 0
or -q
. This can be useful if you run AIS-catcher as a background process. To show only simple and pure NMEA lines, use the switch -o 1
or -n
. Example output:
!AIVDM,1,1,,B,33L=LN051HQj3HhRJd7q1W=`0000,0*03
-o 2
, AIS-catcher displays NMEA messages with some additional information:
!AIVDM,1,1,,B,33L=LN051HQj3HhRJd7q1W=`0000,0*03 ( MSG: 3, REPEAT: 0, MMSI: 230907000, signalpower: -44.0, ppm: 0, timestamp: 20220729191340)
-o 3
:
{"class":"AIS","device":"AIS-catcher","channel":"B","rxtime":"20220729191502","signalpower":-44.0,"ppm":0,"mmsi":230907000,"type":3,"nmea":["!AIVDM,1,1,,B,33L=LN051HQj3HhRJd7q1W=`0000,0*03"]}
-o 5
:
{"class":"AIS","device":"AIS-catcher","rxtime":"20220729191610","scaled":true,"channel":"B","nmea":["!AIVDM,1,1,,B,33L=LN051HQj3HhRJd7q1W=`0000,0*03"],"signalpower":-44.0,"ppm":0.000000,"type":3,"repeat":0,"mmsi":230907000,"status":0,"status_text":"Under way using engine","turn":18,"speed":8.800000,"accuracy":true,"lon":24.915239,"lat":60.148106,"course":231.000000,"heading":230,"second":52,"maneuver":0,"raim":false,"radio":0}
Meta data is not calculated by default to keep the program as light as possible when running as a server on low spec devices but can be activated with the -M
switch. The calculation of signal power (in dB) and applied frequency correction (in ppm) are activated with -M D
. NMEA messages are timestamped with -M T
and additional country information from the station derived from the MMSI is included in JSON output with -M M
.
There are many libraries for decoding AIS messages in NMEA format to JSON format. I encourage you to use your favorite library. Some excellent choices include libais, gpsdecode and pyais.