CompanyGateways / mytracks

Automatically exported from code.google.com/p/mytracks
1 stars 0 forks source link

Possible issue in exported TCX file in 1.5RC3 #466

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. After recording a workout i exported all tracks to TCX file
2. Tried to import this TCX file in SportTracks 3.0
3. Got an error at line 88 char 33

What is the expected output? What do you see instead?
Exported TCX don't comply with schema

What version of MyTracks are you using? On what version of Android? On what 
phone?
Mytracks 1.5RC3, Cyanogenmod 7.0.3, Nexus One

If possible please provide a log.  Either upload here or send to mytracks-
support@google.com.
Detailed instructions can be found here:
http://code.google.com/p/mytracks/wiki/HowToReportErrors

Please provide any additional information here:

The line where i got the error is this one:          

<Cadence>657</Cadence>

Obviously cadence 657 is impossible (i was walking @~6Km/h) 
i've checked .xsd file and got this line: 
<xsd:maxInclusive value="254"/>

so it seems cadence is a unsigned byte

Maybe the other exported data can also we checked pre-exporting the file, so 
the resulting TCX file is compliant with TCX XML Schema.

If you need it i can check it and report data

thanks for looking!

Original issue reported on code.google.com by ble...@gmail.com on 20 May 2011 at 9:56

GoogleCodeExporter commented 9 years ago
So far I don't see the code issue. The HxM sends a 16 byte long unsigned short 
(Little Endian) with a valid range from  0 to 4095 measured in 1/16th 
strides/minute. So max cadence is 255,96 strides/minute.

I will try to reproduce it with my HxM. Perhaps there are cases where the HxM 
sends cadence values out of this range.

Original comment by n...@nclm.de on 24 May 2011 at 8:55

GoogleCodeExporter commented 9 years ago
i'll test with another walk today, it's possible to dump raw packets from 
inside mytracks, maybe with a debug option? 
also, i got an android app able to capture raw packets from bluetooth devices, 
so i can test and send the raw dump for futher analysis.

but, i think it's very easy to check for output values when exporting to TCX to 
avoid futher problems

thanks for your time!

Original comment by ble...@gmail.com on 24 May 2011 at 9:25

GoogleCodeExporter commented 9 years ago
I think the quick and simple fix is when the cadence is printed to tcx add a 
call like:
Math.max(cadence, 254)

Original comment by sandordo...@google.com on 24 May 2011 at 4:02

GoogleCodeExporter commented 9 years ago
hi, i've checked the .xsd file and these are other possible restriction to add:

DegreesLongitude 
  <xsd:maxExclusive value="180.0"/>
  <xsd:minInclusive value="-180.0"/>

DegreesLatitude
  <xsd:maxInclusive value="90.0"/>
  <xsd:minInclusive value="-90.0"/>

HeartRateInBeatsPerMinute
  <xsd:element name="Value" type="positiveByte"/>

So HR is a unsigned byte also

Original comment by ble...@gmail.com on 24 May 2011 at 6:31

GoogleCodeExporter commented 9 years ago
I'm not sure if the HxM really sends a cadence value of 657, so before adding a 
max validity check we should assure that it doesn't do such things...

Original comment by n...@nclm.de on 25 May 2011 at 7:08

GoogleCodeExporter commented 9 years ago
Hi, i've got the same issue with My Tracks and SportTracks.
I deleted every 

<Cadence>677</Cadence> 

and this (near the end of the file):

<Build>
<Version>
<VersionMajor>1.1.6</VersionMajor>
<VersionMinor>0</VersionMinor>
</Version>
<Type>Release</Type>
</Build>

After this i was able to import the tcx-file.
The 677-cadence-peaks are also visible in the chart in My Tracks on the phone.
But cleaning the file every time is no solution for me.

Also curious is, that there is only a cadence of exactly 80 or 90 (apart from 
the 677). I think the cadence data isn't correct at all. But where ist the 
fault? My Tracks or the Zephyr HxM?

HTC Desire, CyanogenMod-7.0.3-Desire, My Tracks 1.1.6

Original comment by jnx....@gmail.com on 6 Jun 2011 at 3:40

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
hi, 
i think this is very easy to debug,
just record to a file all the bluetooth read from the Zephyr, and then 
interpret them offline, so we can look what the packets contains exactly

Original comment by ble...@gmail.com on 6 Jun 2011 at 4:20

GoogleCodeExporter commented 9 years ago
Ok, but how do i record the bluetooth data?

Original comment by jnx....@gmail.com on 7 Jun 2011 at 6:36

GoogleCodeExporter commented 9 years ago
The fix should be here:
http://code.google.com/r/sandordornbush-patches/source/detail?r=62f306028a8e6771
f2e140bfe626dc6ca872802c

Original comment by sandordo...@google.com on 10 Jun 2011 at 3:34

GoogleCodeExporter commented 9 years ago
Reviewed, but you should be capping to 254 according to the XSD snippet above.

Original comment by rdama...@google.com on 10 Jun 2011 at 10:25

GoogleCodeExporter commented 9 years ago

Original comment by sandordo...@google.com on 13 Jun 2011 at 5:30