Subir archivos a "/"
This commit is contained in:
@@ -1583,7 +1583,14 @@ let cName = client && client.name ? client.name : "Cliente";
|
|||||||
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
|
||||||
const km = R * c;
|
const km = R * c;
|
||||||
|
|
||||||
const remainingMins = Math.max(1, Math.round((km / 35) * 60) + 5);
|
// Velocidad media urbana (no autopista) y sin sumar un margen fijo,
|
||||||
|
// para que el tiempo baje de verdad a medida que el técnico se acerca.
|
||||||
|
let remainingMins;
|
||||||
|
if (km < 0.3) {
|
||||||
|
remainingMins = 1; // está prácticamente en la puerta
|
||||||
|
} else {
|
||||||
|
remainingMins = Math.max(1, Math.round((km / 28) * 60));
|
||||||
|
}
|
||||||
if (totalMins === null) totalMins = remainingMins;
|
if (totalMins === null) totalMins = remainingMins;
|
||||||
|
|
||||||
let progressPercent = totalMins ? ((totalMins - remainingMins) / totalMins) * 100 : 5;
|
let progressPercent = totalMins ? ((totalMins - remainingMins) / totalMins) * 100 : 5;
|
||||||
|
|||||||
Reference in New Issue
Block a user