gazpachoking / trainaspower

Convert TrainAsOne training plans from pace to power, and upload them to FinalSurge for use in Stryd workouts.
21 stars 5 forks source link

Unrealistic Power Targets (186327 - 315820) #21

Closed GrahamWilliams-DMT closed 2 years ago

GrahamWilliams-DMT commented 2 years ago

Hey, I've been getting some bizarre power targets since using the latest release to support the new Tabata style workouts. I've had the same issue on multiple machines (Linux / macOS). I also deleted everything on the Mac, and started fresh but still get the same issue.

At first, I thought it may be something simple, and stupid, perhaps to do with the temperature being in the name, as I'd not seen that before, and noticed this comment: https://github.com/gazpachoking/trainaspower/pull/19#issuecomment-953970565

2022-01-20 16:21:50.726 | INFO     | trainaspower.trainasone:get_next_workouts:41 - Fetching next TrainAsOne workout.
2022-01-20 16:21:53.776 | INFO     | trainaspower.trainasone:get_workout:102 - Converting TrainAsOne workout to power.
2022-01-20 16:21:56.891 | INFO     | trainaspower.finalsurge:add_workout:140 - Posting workout `5212AA 6 Min Assessment 1.2℃` to Final Surge

So, I set the run to be "Unadjusted" on TrainasOne. There was no temperature in the name this time:

2022-01-20 16:25:15.385 | INFO     | trainaspower.trainasone:get_next_workouts:41 - Fetching next TrainAsOne workout.
2022-01-20 16:25:16.730 | INFO     | trainaspower.trainasone:get_workout:102 - Converting TrainAsOne workout to power.
2022-01-20 16:25:19.905 | INFO     | trainaspower.finalsurge:add_workout:140 - Posting workout `5212AA 6 Min Assessment` to Final Surge

But it was still giving me workouts like this (note the Watts):

image

So I took a look in the log file, and found that is was converting second/meter - I'm sure this is not what it used to do. But, where it's getting power range for time, it's giving normal watt ranges (the 6 minutes).

2022-01-20 16:21:50.726 | INFO     | trainaspower.trainasone:get_next_workouts:41 - Fetching next TrainAsOne workout.
2022-01-20 16:21:53.776 | INFO     | trainaspower.trainasone:get_workout:102 - Converting TrainAsOne workout to power.
2022-01-20 16:21:53.777 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.0078125 second / meter to power via Stryd calculator
2022-01-20 16:21:54.132 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.007042253521126761 second / meter to power via Stryd calculator
2022-01-20 16:21:54.644 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.007194244604316547 second / meter to power via Stryd calculator
2022-01-20 16:21:54.984 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.0064516129032258064 second / meter to power via Stryd calculator
2022-01-20 16:21:55.246 | DEBUG    | trainaspower.stryd:suggested_power_range_for_time:71 - Getting suggested power range for 360.0 second.
2022-01-20 16:21:56.595 | DEBUG    | trainaspower.finalsurge:get_existing_tap_workout:115 - Checking TrainAsPower workout exists on Final Surge
2022-01-20 16:21:56.723 | DEBUG    | trainaspower.finalsurge:get_existing_tap_workout:115 - Checking TrainAsPower workout exists on Final Surge
2022-01-20 16:21:56.891 | INFO     | trainaspower.finalsurge:add_workout:140 - Posting workout `5212AA 6 Min Assessment 1.2℃` to Final Surge
2022-01-20 16:25:15.385 | INFO     | trainaspower.trainasone:get_next_workouts:41 - Fetching next TrainAsOne workout.
2022-01-20 16:25:16.730 | INFO     | trainaspower.trainasone:get_workout:102 - Converting TrainAsOne workout to power.
2022-01-20 16:25:16.731 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.0078125 second / meter to power via Stryd calculator
2022-01-20 16:25:17.092 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.007042253521126761 second / meter to power via Stryd calculator
2022-01-20 16:25:17.505 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.007194244604316547 second / meter to power via Stryd calculator
2022-01-20 16:25:18.013 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.0064516129032258064 second / meter to power via Stryd calculator
2022-01-20 16:25:18.428 | DEBUG    | trainaspower.stryd:suggested_power_range_for_time:71 - Getting suggested power range for 360.0 second.
2022-01-20 16:25:19.615 | DEBUG    | trainaspower.finalsurge:get_existing_tap_workout:115 - Checking TrainAsPower workout exists on Final Surge
2022-01-20 16:25:19.749 | DEBUG    | trainaspower.finalsurge:get_existing_tap_workout:115 - Checking TrainAsPower workout exists on Final Surge
2022-01-20 16:25:19.905 | INFO     | trainaspower.finalsurge:add_workout:140 - Posting workout `5212AA 6 Min Assessment` to Final Surge
2022-01-20 16:31:53.090 | INFO     | trainaspower.trainasone:get_next_workouts:41 - Fetching next TrainAsOne workout.
2022-01-20 16:31:54.970 | INFO     | trainaspower.trainasone:get_workout:102 - Converting TrainAsOne workout to power.
2022-01-20 16:31:54.971 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.0078125 second / meter to power via Stryd calculator
2022-01-20 16:31:55.337 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.007042253521126761 second / meter to power via Stryd calculator
2022-01-20 16:31:55.648 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.007194244604316547 second / meter to power via Stryd calculator
2022-01-20 16:31:56.056 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.0064516129032258064 second / meter to power via Stryd calculator
2022-01-20 16:31:56.466 | DEBUG    | trainaspower.stryd:suggested_power_range_for_time:71 - Getting suggested power range for 360.0 second.
2022-01-20 16:31:57.616 | DEBUG    | trainaspower.finalsurge:get_existing_tap_workout:115 - Checking TrainAsPower workout exists on Final Surge
2022-01-20 16:31:57.767 | DEBUG    | trainaspower.finalsurge:get_existing_tap_workout:115 - Checking TrainAsPower workout exists on Final Surge
2022-01-20 16:31:57.909 | INFO     | trainaspower.finalsurge:add_workout:140 - Posting workout `5212AA 6 Min Assessment` to Final Surge
2022-01-20 16:36:51.488 | INFO     | trainaspower.trainasone:get_next_workouts:41 - Fetching next TrainAsOne workout.
2022-01-20 16:36:52.995 | INFO     | trainaspower.trainasone:get_workout:102 - Converting TrainAsOne workout to power.
2022-01-20 16:36:52.996 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.0078125 second / meter to power via Stryd calculator
2022-01-20 16:36:53.332 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.007042253521126761 second / meter to power via Stryd calculator
2022-01-20 16:36:53.742 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.007194244604316547 second / meter to power via Stryd calculator
2022-01-20 16:36:54.035 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 0.0064516129032258064 second / meter to power via Stryd calculator
2022-01-20 16:36:54.459 | DEBUG    | trainaspower.stryd:suggested_power_range_for_time:71 - Getting suggested power range for 360.0 second.
2022-01-20 16:36:55.584 | DEBUG    | trainaspower.finalsurge:get_existing_tap_workout:115 - Checking TrainAsPower workout exists on Final Surge
2022-01-20 16:36:55.716 | DEBUG    | trainaspower.finalsurge:get_existing_tap_workout:115 - Checking TrainAsPower workout exists on Final Surge
2022-01-20 16:36:55.834 | INFO     | trainaspower.finalsurge:add_workout:140 - Posting workout `5212AA 6 Min Assessment` to Final Surge

I have changed none of my preferences within Stryd. I've tried changing my distance preference to kilometres, and back to miles. I've tried a poetry update which made no difference.


I rolled back to 0.6.5, and it seems to be OK (although I need to change it back to miles! :)).

image

2022-01-20 17:00:21.422 | INFO     | trainaspower.trainasone:get_next_workouts:40 - Fetching next TrainAsOne workout.
2022-01-20 17:00:24.606 | INFO     | trainaspower.trainasone:get_workout:93 - Converting TrainAsOne workout to power.
2022-01-20 17:00:24.609 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 11.466666666666667 minute / kilometer to power via Stryd calculator
2022-01-20 17:00:25.139 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 5.566666666666666 minute / kilometer to power via Stryd calculator
2022-01-20 17:00:25.503 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 5.316666666666666 minute / kilometer to power via Stryd calculator
2022-01-20 17:00:25.890 | DEBUG    | trainaspower.stryd:get_power_from_pace:48 - Converting 5.083333333333333 minute / kilometer to power via Stryd calculator
2022-01-20 17:00:26.479 | DEBUG    | trainaspower.stryd:suggested_power_range_for_time:71 - Getting suggested power range for 360 second.
2022-01-20 17:00:27.658 | DEBUG    | trainaspower.finalsurge:get_existing_tap_workout:115 - Checking TrainAsPower workout exists on Final Surge
2022-01-20 17:00:27.780 | DEBUG    | trainaspower.finalsurge:get_existing_tap_workout:115 - Checking TrainAsPower workout exists on Final Surge
2022-01-20 17:00:27.900 | INFO     | trainaspower.finalsurge:add_workout:140 - Posting workout `5212AA 6 min Assessment run` to Final Surge

Anyway, just wanted to report this. Let me know if there's anything you want me to do/try to help.

jahofmann commented 2 years ago

Your times look awfully fast indeed, that would be about a 0.13 min/km pace for your warmup :D

To debug this: Could you please download the Garmin workout JSON from the TAO website and post it here?

GrahamWilliams-DMT commented 2 years ago

That would be one hell of a warmup!

I'll get the file over to you tomorrow when I'm back at my desk.

Thanks!

Ysschh commented 2 years ago

I came here to open a thread like this. My power is way to high and my warm-up power-target is even higher than the rest of my run. Downloaded my Garmin file from TAO, it's uploaded here: https://ufile.io/6zn3r0ey. My power-targets are less crazy than OP's, but still way off (CP is 242w).

2022-01-20 22_15_21-Final Surge

jahofmann commented 2 years ago

Thanks for the file!

For future reference:

{
    "workoutName": "W301AY Tabata 6.0℃",
    "sport": "RUNNING",
    "workoutProvider": "TrainAsONE",
    "workoutSourceId": "TrainAsONE",
    "steps": [
        {
            "type": "WorkoutStep",
            "stepOrder": 1,
            "intensity": "WARMUP",
            "durationType": "DISTANCE",
            "durationValue": 296.97176256641103,
            "targetType": "SPEED",
            "targetValue": 2.474764688053425,
            "targetValueLow": 1.2373823440267124,
            "targetValueHigh": 2.5490076286950276
        },
        {
            "type": "WorkoutStep",
            "stepOrder": 2,
            "intensity": "ACTIVE",
            "durationType": "DISTANCE",
            "durationValue": 1319.87450029516,
            "targetType": "SPEED",
            "targetValue": 2.7497385422815834,
            "targetValueLow": 2.6672463860131357,
            "targetValueHigh": 2.7909846204158066
        },
        {
            "type": "WorkoutRepeatStep",
            "stepOrder": 3,
            "repeatType": "REPEAT_UNTIL_STEPS_CMPLT",
            "repeatValue": 8.0,
            "steps": [
                {
                    "type": "WorkoutStep",
                    "stepOrder": 4,
                    "intensity": "ACTIVE",
                    "durationType": "TIME",
                    "durationValue": 10.0,
                    "targetType": "SPEED",
                    "targetValue": 2.612251615167504,
                    "targetValueLow": 0.0,
                    "targetValueHigh": 2.7428641959258795
                },
                {
                    "type": "WorkoutStep",
                    "stepOrder": 5,
                    "intensity": "ACTIVE",
                    "durationType": "TIME",
                    "durationValue": 20.0,
                    "targetType": "OPEN"
                }
            ]
        },
        {
            "type": "WorkoutStep",
            "stepOrder": 6,
            "intensity": "ACTIVE",
            "durationType": "DISTANCE",
            "durationValue": 1319.87450029516,
            "targetType": "SPEED",
            "targetValue": 2.7497385422815834,
            "targetValueLow": 2.6672463860131357,
            "targetValueHigh": 2.7909846204158066
        }
    ]
}
Ysschh commented 2 years ago

You're welcome. I hope the problem will be easy to solve! :)

jahofmann commented 2 years ago

I might see the problem. The durationType are DISTANCE in your JSON. For mine they are always time based. That's why the tool uses your absolute best possible pace over that range instead of the suggested targets. I assumed the only distance based workouts are the tests.

Never noticed you could change that in the settings

Garmin workout preferences
Workout step target: Speed
Workout step name: Step name
Workout step end: Duration
Include run back step: No
Ysschh commented 2 years ago

To test your theory I just changed the TAO settings to: Workout step end: duration. That does solve to problem on my end.

jahofmann commented 2 years ago

Awesome! This one should be fixed in #22. That hopefully also fixes the original issue.

Ysschh commented 2 years ago

Great, thanks. I'll use this workaround for now. Hope it does work for @GrahamWilliams-DMT as well.

GrahamWilliams-DMT commented 2 years ago

I might see the problem. The durationType are DISTANCE in your JSON. For mine they are always time based. That's why the tool uses your absolute best possible pace over that range instead of the suggested targets. I assumed the only distance based workouts are the tests.

Never noticed you could change that in the settings

Garmin workout preferences
Workout step target: Speed
Workout step name: Step name
Workout step end: Duration
Include run back step: No

Interestingly, mine was using a durationType of TIME, but a targetType of HEART_RATE:

{
    "workoutName": "W5212AA 6 Min Assessment",
    "sport": "RUNNING",
    "workoutProvider": "TrainAsONE",
    "workoutSourceId": "TrainAsONE",
    "steps": [
        {
            "type": "WorkoutStep",
            "stepOrder": 1,
            "intensity": "WARMUP",
            "durationType": "TIME",
            "durationValue": 300.0,
            "targetType": "HEART_RATE",
            "targetValueLow": 128.0,
            "targetValueHigh": 142.0
        },
        {
            "type": "WorkoutStep",
            "stepOrder": 2,
            "intensity": "ACTIVE",
            "durationType": "TIME",
            "durationValue": 420.0,
            "targetType": "HEART_RATE",
            "targetValueLow": 139.0,
            "targetValueHigh": 155.0
        },
        {
            "type": "WorkoutStep",
            "stepOrder": 3,
            "intensity": "ACTIVE",
            "durationType": "TIME",
            "durationValue": 120.0,
            "targetType": "HEART_RATE",
            "targetValueLow": 128.0,
            "targetValueHigh": 142.0
        },
        {
            "type": "WorkoutStep",
            "stepOrder": 4,
            "intensity": "ACTIVE",
            "durationType": "TIME",
            "durationValue": 360.0,
            "targetType": "OPEN"
        },
        {
            "type": "WorkoutStep",
            "stepOrder": 5,
            "intensity": "RECOVERY",
            "durationType": "TIME",
            "durationValue": 60.0,
            "targetType": "OPEN"
        },
        {
            "type": "WorkoutStep",
            "stepOrder": 6,
            "intensity": "ACTIVE",
            "durationType": "TIME",
            "durationValue": 420.0,
            "targetType": "HEART_RATE",
            "targetValueLow": 139.0,
            "targetValueHigh": 155.0
        }
    ]
}

When did these Garmin settings appear in TAO?! I've changed these to match yours @jahofmann - It looks like this may have solved the issue for me on 0.7.1 too. Here's my next run for Sunday:

image

{
    "workoutName": "W5214AA Progression 0.4℃",
    "sport": "RUNNING",
    "workoutProvider": "TrainAsONE",
    "workoutSourceId": "TrainAsONE",
    "steps": [
        {
            "type": "WorkoutStep",
            "stepOrder": 1,
            "intensity": "WARMUP",
            "durationType": "TIME",
            "durationValue": 300.0,
            "targetType": "SPEED",
            "targetValue": 2.8659926057464453,
            "targetValueLow": 1.4329963028732227,
            "targetValueHigh": 2.9519723839188385
        },
        {
            "type": "WorkoutStep",
            "stepOrder": 2,
            "intensity": "ACTIVE",
            "durationType": "TIME",
            "durationValue": 1320.0,
            "targetType": "SPEED",
            "targetValue": 3.0252144171768034,
            "targetValueLow": 2.934457984661499,
            "targetValueHigh": 3.070592633434455
        },
        {
            "type": "WorkoutStep",
            "stepOrder": 3,
            "intensity": "ACTIVE",
            "durationType": "TIME",
            "durationValue": 1320.0,
            "targetType": "SPEED",
            "targetValue": 3.184436228607161,
            "targetValueLow": 3.0889031417489465,
            "targetValueHigh": 3.2322027720362683
        },
        {
            "type": "WorkoutStep",
            "stepOrder": 4,
            "intensity": "ACTIVE",
            "durationType": "TIME",
            "durationValue": 1320.0,
            "targetType": "SPEED",
            "targetValue": 3.6472216741894776,
            "targetValueLow": 3.5378050239637933,
            "targetValueHigh": 3.756638324415162
        },
        {
            "type": "WorkoutStep",
            "stepOrder": 5,
            "intensity": "COOLDOWN",
            "durationType": "TIME",
            "durationValue": 300.0,
            "targetType": "SPEED",
            "targetValue": 2.8659926057464453,
            "targetValueLow": 1.4329963028732227,
            "targetValueHigh": 2.9519723839188385
        }
    ]
}

Looks like it was something simple and silly! Thanks @Ysschh and @jahofmann :). And of course, a massive thanks to @gazpachoking for even starting this thing.

jahofmann commented 2 years ago

Thanks! I've added an error message explaining this problem in #23.

GrahamWilliams-DMT commented 2 years ago

I've now had at least one of every run type using 0.7.2 and would most certainly class this as resolved.

Will close this issue.

Thank you all, wish I could do more to help this awesome project.