Hi everyone,
This is another technical post.
For about 8 years we've been customers and fans of PredictWind. We started off with PredictWind's own Satellite Communicator for email and downloading GRIB files. In 2015 we replaced it with an Iridium Go! for our cruise from Australia to the UK. On arrival in 2016 we sold the Go! and in 2021 bought another. While using the Go! we used PredictWind's tracking service to make our track and location visible to friends and family. It is a great feature and position reports can be uploaded by various means. A Standard or Professional PredictWind package is necessary to have a tracking page.
Zen Again Track 2015-Today |
The tracking page was great, but we lost our old tracks when the page was re-established after we bought the second Go!. Recently we've stopped the Go! tracking since we're not crossing oceans. I asked PredictWind Support how I could keep the page updated while sailing in coastal waters. They suggested their new DataHub product.
The DataHub looks good but I also wanted a way to add historic tracks we'd already 'missed'. PredictWind Support pointed me to this page in their Help Centre. The page describes how to send emails to them with track updates. The format is very simple with each line containing username, laitude, longitude and UTC time. Multiple lines can be sent in a single email.
We always record and keep our tracks as GPX files. GPX is the standard format for chartplotters, including software chartplotters such as OpenCPN. GPX files can contain tracks, routes and waypoints but we're only interested in tracks here.
Here's the start of an OpenCPN GPX file.
Start of typical OpenCPN track GPX file |
There were two problems to address. Firstly, GPX format is very different to the PW manual email format. Secondly by default GPX tracks contain one fix per second versus the one per hour which is normal for PW GPS tracking. So there were reformatting and filtering to be done.
I wrote a Python script to process individual GPX files. It is probably not very robust. Nevertheless it has done the job nicely, processing 300 files without apparent error. It outputs a fix from the track start, a fix per hour thereafter, and a fix from the track end. It is written primarily for our OpenCPN track files but also worked on our old Garmin GPSmap GPX tracks.
Here is the Python file header (for the geeks)...
gpx2pw.py comment header |
gps2pw.py example run |
Tracking Update email to PredictWind |
Response email from PredictWind |
No comments:
Post a Comment