oseiskar / simdkalman

Python Kalman filters vectorized as Single Instruction, Multiple Data
https://simdkalman.readthedocs.io/
MIT License
176 stars 36 forks source link

Can't process my data #9

Closed CateDeku closed 4 years ago

CateDeku commented 4 years ago

Hi, sorry for my dumb question but i'm a newbie. I'm trying to use your algorithm with my Gps data, but i keep getting error message: "unsupported operand type(s) for -: 'GPXTrackSegment' and 'float'" How can i correctly implement it? Polo_match.txt

oseiskar commented 4 years ago

Hi. You should probably start by figuring out how to get your input data, which seems to be XML, into a matrix of observations, something like

[
    [latitude1, longitude1],
    [latitude2, longitude2],
    [latitude3, longitude3],
    ...
]

see, for example https://stackoverflow.com/questions/1912434/how-do-i-parse-xml-in-python

Then you can start designing your Kalman filter. Also transforming the GPS coordinates (in degrees) to a metric coordinate system may be a good idea at some point.

I'm closing this as the topic is general data wrangling and Kalman filter design, not this library.

CateDeku commented 4 years ago

Thank you very much!