pierremtb / easy-fit

Parse your .FIT files easily, directly from JS
Other
70 stars 51 forks source link

Incorrect location records and activity after parsing #18

Closed kelumch closed 6 years ago

kelumch commented 6 years ago

I'm getting some unusual data for locations and activity type after parsing attached FIT file (Generated by Garmin). Below are the activity and location records I get after parsing to JSON:

sport: { name: 67, sport: 'generic', sub_sport: 'bike_to_run_transition' }, zones_target: { max_heart_rate: 195, hr_calc_type: 'percent_max_hr' }, sessions: [], laps: [], records: [ { timestamp: '2017-12-10T14:02:05.000Z', position_lat: 49.8264604434371, position_long: 262.8936153743416, distance: 21.78, altitude: 1231.6, speed: 3.322, heart_rate: 91, cadence: 95, fractional_cadence: 0, elapsed_time: 0 }, { timestamp: '1990-08-15T13:16:08.000Z', position_lat: 350.1582593098283, position_long: 98.81422287784517, distance: 2392564.2, altitude: 727, speed: 13.456, heart_rate: 109, cadence: 35, fractional_cadence: 196 } ],


I confirmed this activity is a genuine running activity and there are valid locations by uploading it back to Garmin.

2374117972.zip

pierremtb commented 6 years ago

I so need to go back working on this library :/ It's in my todolist so I will return :fearful:

Manuelbaun commented 6 years ago

Hi Prier,

I also confirm, that the position lat and long are parsed wrongly. I uploaded the Garmin fit-file to Strava and it shows me the route, but when I parse it with easy-fit, something is wrong. Could it be that it is an Endian thing?

But I do have a sample fit file (forgot from where), where the location is fine.

I try to check it, but need to invest a bit more time to read into fitfile manual.

Manuelbaun commented 6 years ago

I found the issue with the GPS conversion. I forked you project and commit the fix. Please take a look.

pierremtb commented 6 years ago

Hi @Manuelbaun, thank you for the investigation! Would you mind creating a pull request for it?

Also, since it's becoming clear that I don't really have neither motivation nor time for this small library anymore. Would you want to become the maintainer? I know it's easier and more satisfying to work on this kind of stuff when you need it in another project, which I don't :/

pierremtb commented 6 years ago

Closed with PR #19