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

question: chronological access to laps, events and records? #50

Open
drewvelo opened this issue Sep 21, 2018 · 2 comments
Open

question: chronological access to laps, events and records? #50

drewvelo opened this issue Sep 21, 2018 · 2 comments
Assignees
Labels

Comments

@drewvelo
Copy link

Hi

First, thanks for a truly useful project that is making me attempt an exercise database so much more doable.

Apologies, this is a question rather than an issue. Whilst most applications show lap splits, nothing really allows drilling down into what I term 'legs' i.e. portions of activity between pauses of the timer during a lap. I have a test file where the end of lap 2, the start of lap 3, and one location record all have the same UNIX timestamp and I'm not sure how to calculate which lap this record belongs to. Is it possible for me to iterate through all events (timer pauses), lap markers and location records together in chronological order so as to know which lap to assign a particular record to? Or perhaps access fractions of a second (assuming they exist) for each record?

@adriangibbons
Copy link
Owner

Hi @drewvelo

The isPaused() method may be of some use to you. Line 2264:

    /**
     * Returns array of booleans using timestamp as key.
     * true == timer paused (e.g. autopause)
     */
    public function isPaused()
    {
        /**
         * Event enumerated values of interest
         * 0 = timer
         */
        $tek = array_keys($this->data_mesgs['event']['event'], 0);  // timer event keys
        /* ... */

Have you downloaded and used the FitSDK from the ANT+ website? Open up the java sub-directory and drop your FIT file onto the FitToCSV.bat batch file. It'll output a CSV file for you to examine.

Because of the message architecture, Lap messages are discrete to the Record messages.

Looking in the Profile.xlsx that is part of the FitSDK, I note that Lap messages have a start_time and a total_timer_time. The laps shouldn't overlap.

Hope this helps?

@drewvelo
Copy link
Author

Thanks for this. I've had a look through the SDK before and found the spreadsheets useful, but don't think I've quite got the file format straight in my head. I'll have a play with the isPaused function and experiment with the CSV converter, both of which should help further my understanding.

PS: my friend's (presumably UK spec) Garmin Edge 1030 uses the product ID 2713.

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