currentSpeed vs Speed

When playing back a file in the simulator I find that  Toybox.Activity.Info.currentSpeed != Toybox.Position.Info.speed.

How are these two values different?

Thanks!

  • Two possible reasons. Position Speed is horizontal speed. So if you are on a GRADE this is only getting the horizontal vector. Also this one doesn't seem to use a Speed Sensor, which for cycling if you have one, is the speed source for Activity.

  • Position Speed is horizontal speed. So if you are on a GRADE this is only getting the horizontal vector.

    Toybox.Activity.Info.currentSpeed will also be horizontal speed unless the user has 3D speed enabled (which is not available on all devices and is usually not recommended unless your activity has unusual amounts of elevation change).

    Addtionally, 3D speed and 3D distance are per-activity settings, which means they don't exist for CIQ apps. To be fair, it's possible that CIQ apps may use the 3D speed/distance setting from the last activity that was launched (this kind of thing is not unheard of.)

    Also this one doesn't seem to use a Speed Sensor, which for cycling if you have one, is the speed source for Activity.

    The Position.Info.speed documentation says

    The horizontal speed in meters per second (mps).

    Speed is derived from the most accurate source in the following order:

    1. GPS

    2. Foot pod

    3. Accelerometer

    It's possible that the documentation is simply incomplete and they meant to include cycling speed sensors when they wrote "foot pod". After all a (running) foot pod is a kind of external sensor that (optionally) provides speed information. Similarly, Garmin's HRM-PRO strap can be used a speed source, and just because it's not explicitly mentioned in the docs, I wouldn't assume that it won't be reflected in Position.Info.Speed.

    I think another possibility is that ActivityInfo.currentSpeed is filtered, wheras Position.Info.speed is raw data (or at least, "less filtered" than the activity data.) Garmin has mentioned that sensor data (such as speed) will be filtered with different algorithms based on the user's chosen activity type.

  • Then again, none of that answers the implicit question of how the different speeds are determined during FIT file playback:

    1) are there two separate speed fields in the FIT file (one for activity speed, the other for "raw" sensor speed)

    2) or is there some post-processing done when the FIT file is played back

    If the answer is 2), what would this look like during a real activity? Would the device do the same post-processing in real time?

    We know that FIT files have an "enhanced" speed field in addition to the regular speed field, but the enhanced field appears to be the same as the regular field except with additional precision.