To calculate the pacing needed to run the second half of a half marathon faster than the first, we need to consider the total time to complete the race and the percentage decrease in time per lap.
Given:
Total time to complete the race: 4620 seconds Decrease percentage per lap: 3% Distance of a half marathon: 21.0975 kilometers Assuming that the race is divided into two equal halves, the distance for each half would be 21.0975/2 = 10.54875 kilometers.
Let’s denote the time taken to run the first half as T1 and the time taken to run the second half as T2. Since the total time is 4620 seconds, we have:
T1 + T2 = 4620
Since the second half is run faster, T2 is less than T1. If we denote the decrease in time per lap as a percentage (in this case, 3%), we can express T2 as:
T2 = T1 - (0.03 * T1) = 0.97 * T1
Substituting T2 in the first equation, we get:
T1 + 0.97 * T1 = 4620
Solving this equation will give us the time taken to run the first half (T1), and substituting T1 in the equation for T2 will give us the time taken to run the second half.
Let’s calculate these values.
2345.17766497 sería el valor T1 y haciendo la sustitución T2 2274.82233503
// Import stylesheets
import './style.css';
function convertSecondsToTimePaceFormat(seconds: number) {
const paceMins = Math.floor(seconds);
const paceSeconds = Math.round((seconds - paceMins) * 60);
return {
min: paceMins,
seconds: paceSeconds,
};
}
function convertSecondsToTimeFormat(seconds: number) {
// Definir el número de segundos a convertir
const segundos = seconds;
// Calcular las horas, minutos y segundos
const horas = Math.floor(segundos / 3600);
const minutos = Math.floor((segundos - horas * 3600) / 60);
const segundosRestantes = segundos % 60;
// Crear la cadena de caracteres con formato "hh:mm:ss"
const tiempo =
${horas.toString().padStart(2, '0')}:${minutos .toString() .padStart(2, '0')}:${segundosRestantes.toString().padStart(2, '0')}
;// Mostrar el resultado
return tiempo; // 09:36:07
}
function convertoSecondsFromTime({ hours = 0, min = 0, seconds = 0 }) {
return hours * 3600 + min * 60 + seconds;
}
// Write TypeScript code!
const appDiv: HTMLElement = document.getElementById('app');
appDiv.innerHTML =
<h1>TypeScript Starter</h1>
;// Definir el tiempo total como un string en formato hh:mm:ss
const tiempo = '01:15:50';
// Dividir el tiempo total en horas, minutos y segundos
const tiempoPorPartes = tiempo.split(':');
const horas = parseInt(tiempoPorPartes[0]);
const minutos = parseInt(tiempoPorPartes[1]);
const segundos = parseInt(tiempoPorPartes[2]);
// Calcular el tiempo total en horas
const tiempoTotalEnHoras = horas + minutos / 60 + segundos / 3600;
// Calcular el ritmo medio en minutos por kilómetro
const paceMinutesSeconds = (tiempoTotalEnHoras / 21.0975) * 60;
console.log(paceMinutesSeconds);
// Convertir el resultado a minutos y segundos
const timePaceMinKm = convertSecondsToTimePaceFormat(paceMinutesSeconds);
// Mostrar el resultado en formato mm:ss
console.log(
El ritmo medio es ${timePaceMinKm.min}:${timePaceMinKm.seconds .toString() .padStart(2, '0')} min/km
);
// Parciales que debería de llevar
for (let selectKm = 1; selectKm <= 21; selectKm++) {
// console.log((selectKm + 1) * convertoSecondsFromTime(timePaceMinKm), ' total seconds');
console.log(
'KM: ',
selectKm.toString().padStart(2, '0'),
'====>',
convertSecondsToTimeFormat(
selectKm * convertoSecondsFromTime(timePaceMinKm)
)
);
}
// Calcular el tiempo total en secgundos
const tiempoTotalEnSegundos = horas * 3600 + minutos * 60 + segundos;
/console.log(
tiempoTotalEnSegundos - 21 * convertoSecondsFromTime(timePaceMinKm)
);/
console.log('FINAL (MM) ==>', tiempo);
console.log(tiempoTotalEnSegundos);