I am investigating how to record AIS data in a format for later use - eg retrieval and replay.
Obviously needs time stamps added. The only references I have found to suitable file formats are CSV files: https://opencpn-manuals.github.io/main/vdr/log_format.html - this is reasonably (if incorrectly) documented and can be replayed using openCPN
https://gpsd.io/gpscsv.html - there are some examples, but no specific documentation of the file format and only viewing data through gnuplot is suggested.
Currently I am using a variant of the openCPN VDR format, but any clearer definition would be helpful. (What we need are more standards.....):
# VDR Log File refer:
# https://opencpn-manuals.github.io/main/vdr/log_format.html
# Created: 2025-06-09T02:57:03.588Z
# LogAIS.exe © CompAIS NZ Ltd
# NMEA0183 on UDP port 6039 "Dunedin 2 direct"
# received_at,protocol,msg_type,source,raw_data
# actual format in use differs from documented format:
timestamp,type,id,message
2025-06-09T02:57:08.053Z,AIS,"UDP port:6039","!AIVDM,1,1,,A,17`BKu@P00d<Qu9UgkD>4?vB285u,0*3F"
2025-06-09T02:57:08.591Z,AIS,"UDP port:6039","!AIVDM,1,1,,B,38I4pn0OiV<>>8=UkuSoA5j@00j@,0*37"
2025-06-09T02:57:15.414Z,AIS,"UDP port:6039","!AIVDM,1,1,,A,17`BAThP05<=4pSUjDF;EOvT0<0:,0*14"
2025-06-09T02:57:18.165Z,AIS,"UDP port:6039","!AIVDM,1,1,,B,18HutD0005d=4n1UjEc9v1N`2<06,0*57"
2025-06-09T02:57:18.504Z,AIS,"UDP port:6039","!AIVDM,1,1,,B,17`BKu@P00d<Qu3UgkCv4?v`20RI,0*08"
2025-06-09T02:57:21.421Z,AIS,"UDP port:6039","!AIVDM,2,1,9,A,57`djn821sG9`l`R220IJ0Hu9ADqDV222222220N18j825TE0A15CQA2C`88,0*73"
2025-06-09T02:57:21.435Z,AIS,"UDP port:6039","!AIVDM,2,2,9,A,88888888880,2*2D"
2025-06-09T02:57:24.268Z,AIS,"UDP port:6039","!AIVDM,1,1,,B,17`BAThP05d=4osUjDI:c?vn2L0:,0*60"
2025-06-09T02:57:27.312Z,AIS,"UDP port:6039","!AIVDM,1,1,,A,17`BKu@P00d<Qu1UgkD>4?vr24CT,0*5C"
2025-06-09T02:57:34.934Z,AIS,"UDP port:6039","!AIVDM,1,1,,A,17`BAThP03d=4o9UjDKJ=gw:2@Ee,0*28"
2025-06-09T02:57:37.254Z,AIS,"UDP port:6039","!AIVDM,1,1,,B,17`BKu@P00d<QtwUgkDN4?w>24CT,0*25"
2025-06-09T02:57:41.716Z,AIS,"UDP port:6039","!AIVDM,1,1,,B,18I4pn001V<>>3?UkqsGCmmB0L07,0*19"
2025-06-09T02:57:47.094Z,AIS,"UDP port:6039","!AIVDM,1,1,,A,17`BKu@P00d<Qu1UgkE>4?wP2D0<,0*15"
2025-06-09T02:57:52.629Z,AIS,"UDP port:6039","!AIVDM,1,1,,A,E>m1GRL30Ta;Pdh12PQWW000000F6hm`jrAF`00003s010,4*14"
2025-06-09T02:57:54.988Z,AIS,"UDP port:6039","!AIVDM,1,1,,A,17`BAThP03d=4mqUjDM9ewwj20SR,0*5E"
2025-06-09T02:57:56.095Z,AIS,"UDP port:6039","!AIVDM,1,1,,B,E>m1GRL30Ta;Pdh12PQWW000000F6hm`jrAF`00003tP10,4*70"
2025-06-09T02:57:58.560Z,AIS,"UDP port:6039","!AIVDM,1,1,,B,17`BKu@P00d<Qu5UgkEv4?v02D0<,0*3B"
2025-06-09T02:58:00.470Z,AIS,"UDP port:6039","!AIVDM,1,1,,A,E>m1GRQW@6WV2P0000000000000F6ghpjqrP800003Q010,4*6E"
2025-06-09T02:58:08.052Z,AIS,"UDP port:6039","!AIVDM,1,1,,A,17`BKu@P00d<Qu9UgkF>4?vB24C`,0*52"
2025-06-09T02:58:08.495Z,AIS,"UDP port:6039","!AIVDM,1,1,,A,E>m1GRo17@77rh9b12@40W20000F6g<tjqQq800003U010,4*51"
2025-06-09T02:58:16.069Z,AIS,"UDP port:6039","!AIVDM,1,1,,A,E>m1GS717@77sh9b12@40W20000F6fg@jqOt800003`P10,4*29"