Giter VIP home page Giter VIP logo

garyscorner / marinegpxgrapher Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 637 KB

Graph marine tracking data from a GPX (GPS tracking file) on graphs showing time and speed as color. Designed for use with Garmin Quatix watches but it should work with any GPX file. Warning since this is for marine use (racing sailboats) it does not take altitude into account.

License: GNU General Public License v3.0

Python 100.00%
regatta gpx-files sailing garmin-watch garmin-data graphing gpx gps gps-data marine

marinegpxgrapher's Introduction

Marine GPX Grapher

Name:     Gary Andrew Bezet
Site/Org: GarysCorner.NET
Email:    [email protected]

Now for Python 3.x

Description

(This was written before taking data science classes so, keep that in perspective)

This program was originally intended to process tracking data from my Garmin Quatix 4 marine watch. You may see some references to "garmindata.py" in the git history this is because the originally intention was specifically for garmin export data, however when I learned more I realized the program should work with any standard GPX tracking data.

This program is designed to graph GPX tracking data for marine application. I wrote it to get a more useful understanding of tracking data from regattas. The basic problem is that tracking data doesn't tell a very good story without speed and/or time data. While programs like OpenCPN are very useful I didn't find the display of tracking data was adequate. To solve this I wrote this program which I intend to be used with a chart plotter like OpenCPN to provide additional data and allow you to form a good narrative about your last race. If you look back at git revision history you may notice that I originally was writing this code to tear down the GPX data into a better format, but the project kept evolving and became what it is now. Hope you find it useful.

Screenshot

Below: Time and speed graphs from marinegpxgrapher (this program) in the foreground with OpenCPN in the background (I did not write OpenCPN and have no affiliation with it, but you should still download it, its pretty cool) marinegpxgrapher in foreground with OpenCPN in back

Files

  • 2018-07-29 03_36_41 Around the Lake Race Cookie Monster.gpx GPX tracking data from a from a 10 hour race aboard S/V Cookie Monster, with 3686 points
  • 2020LakePontchartrainRacingMarks.gpx GPX waypoint data from Lake Pontchartain, with 55 marks most of which are used for racing on the lake.
  • marinegpxgrapher.py The program written in python
  • SummerSeries2_2018-06-30 101554.gpx GPX tracking data from a 1.5ish hour race aboard S/V Whiskers, with 716 data points
  • SummerSeries3_2018-07-14 12_16_21.gpx GPX tracking data from a 2.5ish hour race aboard S/V Whiskers, with 1023 data points

All GPX files are intended for testing purposes. All three files were record on Lake Pontchartrain using a Garmin Quatix 3.

Installation

I use Linux as play with data a lot so it just works on my computer. Give me a while I'm going to look up basic install instruction for python, matplotlib, numpy and gtk for windows user. Linux users make sure you have installed pip. Then use pip to install numpy and matplotlib (gtk should be part of your system already).

Status

I am uploading this early because someone asked for it. I still have to write some direction for installation and remove some data structures that were not used to cut down on RAM usage for large data sets. While I expect this program to be very useful, and I may not put a ton of extra work into it unless there is some interest. This program is not as polished as I would like. However I have learned that when it comes to writing free code if you tell yourself "I'll upload it when its perfect" then you won't ever upload it... So here it is.

Usage

Just run the program (marinegpxgrapher.py) using python (this usually just means double click it), but this depends on your system. The system will then process the files and show 3 graphs. The 3 graphs may appear on top of each other so feel free to move them around. The graphs appear in different windows since I expect the user to be comparing the data with a traditional chart plotter like OpenCPN.

Bugs

Please submit any bugs via Github. If you have a file that doesn't work properly because of its size or something else please let me know and arrange to send me the file. I have tested this code with a GPX file from a 10hour/48mile race consisting of over 3600 GPS points. I suspect different devices record data at different rates so your dataset size may very. Although matplotlib and numpy are designed to handle large amounts of data, there is a limit, and I'm not sure what that is (let me know if you find it)

Sorries

Sorry about my spelling, also sorry I hacked this out soo quick as of the writing of this there are still parts of the data structure like "latrad/lonrad" which no longer serve a function other than eating up ram, but Im working on it. Also I plan on putting some direction for my Windows users who probably don't have python, and the libraries installed.

Warrenty

There is no warranty. Like life, I make no guarantee. This program should never be used for anything other than reviewing regattas, DO NOT, I repeat DO NOT use this program to assess man overboard situation in any way.

marinegpxgrapher's People

Contributors

garyscorner avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

marinegpxgrapher's Issues

Command line options

Add command line options most importantly the ability to open files, use this feature to allow people without gtk to open files on command line

More data about GPX file

Start outputting the amount of time the avg speed max speed, etc for the track before plotting

Calculation of logitude offset uses cos(latnm[0])

Calculation of logitude offset uses cos(latnm[0]) in line 79. This works and works fast for most races that dont span very large distances, but really the latnm that coresponds to each point should be used. For some reason in practice this distorts the graph, perhaps something in the math im missing

Graph labels comfusing

the graph labels are confusing with respect to north-south and east-west consider reversing

Remove storage of latrad/lonrad

Latrad lonrad will be used in the program however they dont need to be stored since I used latnm/lonnm now. I need to modify the program to stop storing the useless data since it could be a non trivial number of points.

waypoint loading status text confusion

The below is confusion and doesn't let you know that some points were dropped and why those points were dropped.

Loading mark data from "2020LakePontchartrainRacingMarks.gpx"
Loaded 36/55 waypoints from 2020LakePontchartrainRacingMarks.gpx
Loaded 17/36 total waypoints!

Time graphs in hours look bad on short races

Whenever a race is short the time graphs look a little weird because they are in hours, the solution should be either to put the data back in minutes for shot races or perhaps to make a formatter to format times to hour/minute

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.