48 pure subroutine cycling_power(mass, slope, vair, vgr, pwr_mech, pwr_air, pwr_climb)
53 real(
double),
intent(in) :: mass, slope, vair, vgr
54 real(
double),
intent(out) :: pwr_mech, pwr_air, pwr_climb
55 real(
double) :: k1,k2,g, g_mass_vgr
56 real(
double) :: rho, surf,c_d, temp,press
59 k1 = 0.00267d0 + 0.001018d0 * vgr**0.46435d0
62 temp = 15.d0 + 273.15d0
63 press = 1015.d0 * 100.d0
69 k2 = 0.5d0 * rho * surf * c_d
73 g_mass_vgr = g * mass * vgr
74 pwr_mech = k1 * g_mass_vgr
75 pwr_climb = slope * g_mass_vgr
76 pwr_air = k2 * vair**2 * vgr
48 pure subroutine cycling_power(mass, slope, vair, vgr, pwr_mech, pwr_air, pwr_climb)
…
101 real,
intent(in) :: mass, slope, vair, vgr
102 real,
intent(out) :: pwr_mech, pwr_air, pwr_climb
103 real(
double) :: mass_dbl, slope_dbl, vair_dbl, vgr_dbl, pwr_mech_dbl, pwr_air_dbl, pwr_climb_dbl
105 mass_dbl = dble(mass)
106 slope_dbl = dble(slope)
107 vair_dbl = dble(vair)
110 call cycling_power(mass_dbl, slope_dbl, vair_dbl, vgr_dbl, pwr_mech_dbl, pwr_air_dbl, pwr_climb_dbl)
112 pwr_mech = real(pwr_mech_dbl)
113 pwr_air = real(pwr_air_dbl)
114 pwr_climb = real(pwr_climb_dbl)
138 character,
intent(in) :: gender
139 real(double),
intent(in) :: age, mass, HR
140 real(double),
intent(out) :: power, dpower
144 power = -20.4022d0 + 0.4472d0 * hr - 0.1263d0 * mass + 0.0740d0 * age
145 dpower = sqrt( 7.2318d0**2 + (0.0165d0 * hr)**2 + (0.1061d0 * mass)**2 + (0.1742d0 * age)**2 )
147 power = -55.0969d0 + 0.6309d0 * hr + 0.1988d0 * mass + 0.2017d0 * age
148 dpower = sqrt( 5.5780d0**2 + (0.0137d0 * hr)**2 + (0.0619d0 * mass)**2 + (0.1180d0 * age)**2 )
154 power = power * 1000.d0/60.d0
155 dpower = dpower * 1000.d0/60.d0
Provides kinds and related constants/routines.
integer, parameter double
Double-precision float. Precision = 15, range = 307.
Procedures related to sports.
pure subroutine cycling_power_sp(mass, slope, vair, vgr, pwr_mech, pwr_air, pwr_climb)
Compute the power used for cycling, single-precision wrapper for cycling_power.
pure subroutine cycling_power(mass, slope, vair, vgr, pwr_mech, pwr_air, pwr_climb)
Compute the power used for cycling. Add the three components to get the total power.
subroutine heartrate2power(gender, age, mass, hr, power, dpower)
Convert heart rate to body power + uncertainty.
System-related procedures.
subroutine quit_program_error(message, status)
Print an error message to StdErr and stop the execution of the current program.
Procedures to deal with weather.
elemental real(double) function air_density(press, temp)
Compute the air density for the given temperature and pressure.