Add avg power and NP to activity summary; NP uses Coggan 30s rolling-average method
This commit is contained in:
@@ -123,6 +123,10 @@
|
||||
stat('Avg HR', activity.avg_hr_bpm ? `${activity.avg_hr_bpm} bpm` : '—', 'heart_rate'),
|
||||
stat('Max HR', activity.max_hr_bpm ? `${activity.max_hr_bpm} bpm` : '—', 'heart_rate'),
|
||||
stat('Cadence', activity.avg_cadence_rpm ? `${activity.avg_cadence_rpm} rpm` : '—', 'cadence'),
|
||||
...(activity.avg_power_w != null ? [
|
||||
stat('Avg power', `${activity.avg_power_w} W`, 'power'),
|
||||
stat('NP', detail?.np_power_w != null ? `${detail.np_power_w} W` : '—', 'power'),
|
||||
] : []),
|
||||
].filter(s => !s.key || !hiddenStats.has(s.key));
|
||||
</script>
|
||||
|
||||
|
||||
@@ -109,6 +109,7 @@ export interface Timeseries {
|
||||
export interface ActivityDetail extends Omit<ActivitySummary, 'detail_url' | 'track_url' | 'preview_coords'> {
|
||||
description: string | null;
|
||||
elevation_loss_m: number | null;
|
||||
np_power_w: number | null;
|
||||
max_power_w: number | null;
|
||||
gear: string | null;
|
||||
device: string | null;
|
||||
|
||||
Reference in New Issue
Block a user