Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get Cadence field failed when Stryd Power IQ app installed #48

Open
xjack913 opened this issue Apr 16, 2018 · 8 comments
Open

Get Cadence field failed when Stryd Power IQ app installed #48

xjack913 opened this issue Apr 16, 2018 · 8 comments
Assignees
Labels

Comments

@xjack913
Copy link

Hi,

All values of cadence filed are 0, when Stryd Power IQ app installed. Could you handle this problem? Thanks.

Stryd Power IQ app link:
https://apps.garmin.com/en-US/apps/660a581e-5301-460c-8f2f-034c8b6dc90f

The activity with Stryd Power IQ app:
activityWithStydPowerIQApp.fit.txt

@adriangibbons
Copy link
Owner

Hi @xjack913

My money is on it being related to Issue #42

Except related to cadence rather than heart rate i.e.

It will likely be related to cadence data being in their own 'Cadence' messages, rather than where they've traditionally been: i.e. 'Record'->'Cadence'

Though I'll need to check this out more thoroughly!

@adriangibbons
Copy link
Owner

adriangibbons commented Apr 19, 2018

OK, so doesn't look like it is similar to #42

Looking at the record messages:

var_dump($pFFA->data_mesgs['record']['altitude']);
// array(1962) { [1522152947]=> int(6) ...

var_dump($pFFA->data_mesgs['record']['speed']);
// array(1962) { [1522152947]=> float(2.986) ...

I notice that they are indexed with the timestamps. However the cadence array is the right size (i.e. 1,962 data points), but they are all zeroes and not indexed using timestamps:

var_dump($pFFA->data_mesgs['record']['cadence']);
// array(1962) { [0]=> int(0) [1]=> int(0) [2]=> int(0) ...

I'll need to look into this further to figure out what's going on...

Adrian.

@adriangibbons
Copy link
Owner

It was due to developer data overwriting native fields. For some reason the dev data contained just a bunch of zeroes. Give v3.2.0 a whirl, all changes are committed in the master branch so you can just download the latest phpFITFileAnalysis.php if you're not using Composer.

Should work 🤞

@adriangibbons adriangibbons self-assigned this Apr 19, 2018
@xjack913
Copy link
Author

@adriangibbons Thank you very much. All cadence values appear at v3.2.0!

@ghost
Copy link

ghost commented Jul 13, 2018

Hi
I have same issue. power start from index 0

@adriangibbons
Copy link
Owner

Hi - assuming you are using the latest version (3.2.0), could you share a .FIT file? You may need to change the extension of the file to .txt so that Github will let you attach it! Thank you

@ghost
Copy link

ghost commented Jul 16, 2018

cadence: [1531521159] => 0
[1531521160] => 0
[1531521161] => 0
[1531521162] => 0
[1531521163] => 92
[1531521164] => 0
[1531521165] => 0
[1531521166] => 24

power: [0] => 0
[1] => 0
[2] => 0
[3] => 0
[4] => 0
[5] => 0
[6] => 0
[7] => 23
[8] => 62
[9] => 110

4006_22621334870.txt

thanks.

@adriangibbons
Copy link
Owner

Hi @cklong2kbomdic - sorry I haven't had time to look at this. I guess you're saying that the power array needs to be indexed using the same as other fields e.g. cadence is using timestamp in your example above?

Have you been able to fix this yourself?

Cheers, Adrian.

@adriangibbons adriangibbons reopened this Sep 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants