Comments (4)
speed
is an optional field in GPX 1.0
, but it isn't in 1.1
(you can run make analyze-xsd
to retrieve xsd files and pretty-print the xsd structure).
to_xml()
will try to write the GPX with the original version. But you can force 1.0 with .to_xml(version='1.0')
. Do you still have this bug with 1.0
?
from gpxpy.
Okay, sorry, this is really strange that speed
is no longer defined in version 1.1. What if you have a speed sensor coupled to your GPS sensor and want to save this more accurate data somehow? Is it possible to have speed somehow as a valid extension? There is an tag defined, right?
from gpxpy.
I know, and a lot of the complexity in gpxpy 1.0+ comes because of the gpx 1.0/1.1 inconsistencies.
Anyway, you can always use GPXTrackPoint.extensions
. The current extensions API is not ideal, because extensions
in gpxpy is a dictionary, but in GPX it can contain any XML (and maps aren't a perfect one-to-one representations to any XML chunk). But for simple values, like your speed, it will work.
from gpxpy.
okay, so I guess this issue can be closed now since gpx 1.1 lacks the attribute speed and the workaround is to save it as an extension. Still, I am quite unsatisfied and hopefully gpx 1.2 will reintroduce speed as optional attribute directly in the standard. I heard some people argue that speed is not really necessary since it is just the derivation of place by time but this is not so accurate actually for gps. Nowadays it is no problem to connect your bikecycle's tachometer and save the actual way more accurate speed to each gps measurement. With the help of the famous Kalman filter it is then even possible to get even more precise information about the current state using two different sensors that give readings for the current speed.
from gpxpy.
Related Issues (20)
- NameError: free variable 'from_start_to_end' referenced before assignment in enclosing scope HOT 1
- Setup.py method is being deprecated in python package
- Confusion!
- Wrong distance? 10.4 km instead of 7.6 km HOT 1
- Save nsmap of GPX in GPXTrack, GPXTrackSegment and GPXTrackPoint
- GPX track all messed up HOT 1
- Tag a release to ship improvements since 1.5.0 HOT 1
- TypeError in gpxfield since 1.6.0 release HOT 1
- Changes Backported To 1.5.0 HOT 2
- Typo in __repr__ of SimpleTZ HOT 1
- [newbie] Wrong return type on GPXTrackSegment.get_duration() HOT 1
- create CI testing scripts HOT 1
- feature request: include distance_from_start in NearestLocationsData class HOT 1
- Is Header malformed
- Check for GPX root node on parse HOT 1
- Custom attributes in `to_xml` not escaped properly HOT 1
- Wrong type annotation for radians in method elevation angle?
- to_xml removes metadata extensions without the name tag present HOT 1
- Implement support for adding extension section to a waypoint/track/...
- Links in XML not properly encoded
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gpxpy.