Need Help Storing Complete AIS Data in a Database #299
Replies: 1 comment 8 replies
-
Hello! If you are using the built-in PSQL functionality (i.e. with the -D) you can use 'VP on` which essentially populates the table ais_vessel_pos with lat/lon with some additional fields including timestamp, mmsi and speed. If you want to use a custom script in Python, then you need to read in NMEA lines (the messages) (e.g. by implementing a UDP listener), decoding them in python (e.g. with pyais to get the lat and lon) and then writing this to the table. All together, not rocket science but requires a bit of work. |
Beta Was this translation helpful? Give feedback.
8 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I am currently working on a project involving the collection of AIS (Automatic Identification System) data using a receiver and storing it in a PostgreSQL database. The data I receive includes various information about ships, such as MMSI, location, speed, and more.
The problem I’m facing is that currently, only the last information received from each ship (based on MMSI) is stored in the database. I want every signal received, even if it’s from the same ship within a short time span, to be stored as a new entry in the database. The goal is to ensure that I have a complete record of all the data received, including multiple signals from the same ship within close time intervals.
Could anyone advise on what changes I need to make, either in my Python code or in the PostgreSQL database configuration, to allow this?
Thank you for your help!
my postgresql
i want like this
Beta Was this translation helpful? Give feedback.
All reactions