Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fetch GPS data from OceanLive server and insert it to the local gpsdata table #2

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

alischandy
Copy link
Collaborator

@alischandy alischandy commented Nov 27, 2024

This PR adds a new script, gps_fetch.py, to retrieve, process and insert GPS data from the OceanLive server into the local gpsdata table.

Key changes:

  • Added dependencies to pyproject.toml: paramiko for ssh connection,schedule for script scheduling, and python-dotenv for loading environment variables.

  • Added gps_fetch.py script that:

    • connects to the Oceanlive server via SSH.
    • fetches unprocessed GPS .csv files on the server.
    • downloads them to the edge device.
    • parses the files to extract gps_datetime, latitude, and longitude.
    • inserts the parsed data to the gpsdata table in the local PostgreSQL database.
    • deletes local copies of processed files.
    • uses a log file to track processed gps files and avoid duplication.
    • scheduled to run every 15 minutes and process all unprocessed gps files.

Copy link
Collaborator

@guzmanlopez guzmanlopez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job!!! 🚀

@guzmanlopez guzmanlopez added the enhancement New feature or request label Nov 28, 2024
@alischandy alischandy merged commit 97a062d into dev Nov 28, 2024
0 of 2 checks passed
@alischandy alischandy deleted the feature/new_gps_fetch branch November 28, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants