1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
//! Cycling analytics: FTP, critical power, Coggan zones, power–duration
//! prediction, ACSM / Hawley–Noakes VO2 estimates, Martin road power–speed,
//! and an age-factor helper.
//!
//! | Function | What it uses |
//! |---|---|
//! | [`ftp_from_20min`] / [`ftp_from_protocol`] | Operational FTP from field protocols |
//! | [`critical_power()`] | Two-parameter CP + W′ (OLS on `1/t`) |
//! | [`predict_power`] / [`predict_power_from_cp`] | CP, %FTP curve, or power Riegel |
//! | [`training_zones`] | Coggan Z1–Z7 + sweet spot (%FTP) |
//! | [`estimated_vo2max`] | ACSM MAP → relative VO2 field estimate |
//! | [`power_for_speed`] / [`speed_for_power`] | Martin et al. 1998 power balance |
//! | [`age_equivalent_ftp`] | Trained-endurance decline curve (not official tables) |
//!
//! Internal units are watts, seconds, metres, and kilograms. FTP is an
//! operational training anchor, not laboratory lactate threshold. Estimated
//! VO2 is a field estimate, not gas analysis. Age helpers use ages **15..=90**
//! and are **not** USATF/VTTA age grading. Two-parameter CP is valid ~2–30 min;
//! hour power from a short+medium pair is biased high.
//!
//! # Example
//!
//! ```
//! use sportanalytics::cycling::{ftp_from_20min, training_zones, Effort};
//!
//! let twenty = Effort::from_watts_secs(280.0, 20.0 * 60.0).unwrap();
//! let ftp = ftp_from_20min(twenty).unwrap();
//! assert!((ftp.watts() - 266.0).abs() < 1e-9);
//! let zones = training_zones(ftp);
//! assert!(zones.endurance.hard_end.watts() > zones.endurance.easy_end.watts());
//! ```
//!
//! # Types
//!
//! - [`Error`] — every failure cycling constructors and helpers can return
//! (`NonPositiveTime`, `InvalidHms`, `AgeOutOfRange { min, max }`, and model
//! variants).
//!
//! Runnable examples: `cargo run --example from_20min` and
//! `cargo run --example from_tt` (sources under `examples/cycling/`).
pub use ;
pub use ;
pub use ;
pub use Error;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;