InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.69k stars 921 forks source link

Activity/Workout Tracking (different modes, on device #1255

Open LinuxinaBit opened 2 years ago

LinuxinaBit commented 2 years ago

Verification

Pitch us your idea!

Integrate different workout tracking modes and Gadgetbridge-like walk/jog/run tracking

Description

Gadgetbridge has passive walk/jog/run tracking by simply taking how many steps happen over a time period and determining if you're running or jogging or just walking. This would be great to have integrated onto the watch, as it currently relies too heavily on the real-time step data sent over BLE which is flaky at best (and if you don't have your phone on you it gets even worse.).

This could be combined with different manual workout categories like a lot of other watches on the market, and synced to Gadgetbridge (I think they already have a way to do it here: https://codeberg.org/Freeyourgadget/Gadgetbridge/wiki/Sports-Activities-Workouts but I'm not quite sure).

Some workout-specific tracking options to include in a dedicated app could be biking, weight lifting, and manual switching to the jog and run modes in case the passive tracking fails. I read in a different Issue that the pedometer uses its built in algorithm for step tracking, so accelerometer use might be necessary.

minacode commented 2 years ago

The motion sensor can differ between some modes. Still/walk/run or so.

dozadoesit commented 2 years ago

I have been waiting for a feature like this as well. Gadgetbridge can definitely do this with other devices.

ArsenArsen commented 2 years ago

I imagine a solution for this could also improve the "lost steps" issue (simply walk around midnight without turning on your watch screen/fetching step data - it resets on the phone both visually and in what's presented to the device, losing any steps that happened between your last wake and midnight) by more eagerly sending data (maybe also decoupling the value that is displayed from the fetched value, so that, when data is sent, it includes any resets and the amount of steps on that reset, as well as a TS)

LinuxinaBit commented 1 year ago

Maybe once external storage is working we could store a database of timestamped groups of steps, maybe every few minutes, and later send it over to a companion device. This then could be used to get workout times and be parsed more thoroughly then just a simple "User ran from 11:50 to 12:21" type message. Of course after maybe about a day and a half it would be deleted to not overwhelm storage...

minacode commented 1 year ago

749 does elaborate the same ideas. I think the main issue is that someone needs to actually do this 😄