diff --git a/src/client/components/Status.tsx b/src/client/components/Status.tsx index c93395b..48fd182 100644 --- a/src/client/components/Status.tsx +++ b/src/client/components/Status.tsx @@ -1,6 +1,13 @@ import React from 'react' import { getMaxSpeed } from "../helper/maxSpeed"; -//import * as css from "../css/status.module.css"; +import "../css/status.css"; +import StorageIcon from '@mui/icons-material/Storage'; +import NetworkCheckIcon from '@mui/icons-material/NetworkCheck'; +import SpeedIcon from '@mui/icons-material/Speed'; +import BoltIcon from '@mui/icons-material/Bolt'; +import ShowChartIcon from '@mui/icons-material/ShowChart'; +import EastIcon from '@mui/icons-material/East'; + function getStatusData(entries) { const cleanEntries = entries.filter((entry: Models.IEntry) => !entry.ignore); @@ -44,15 +51,15 @@ function getStatusData(entries) { } } - return [up, down]; + return [(up / 1000).toFixed(2), (down / 1000).toFixed(2)]; } function getDistance() { - return cleanEntries.reduce((accumulatorValue:number, entry) => { + return cleanEntries.reduce((accumulatorValue: number, entry) => { console.log(accumulatorValue); - if (!entry.distance ) { return accumulatorValue } + if (!entry.distance) { return accumulatorValue } return accumulatorValue + parseFloat(entry.distance.horizontal); - }, 0) / 1000; + }, 0) / 1000; } const ignoredEntries = entries.length - cleanEntries.length; @@ -82,14 +89,55 @@ function Map({ entries }: { entries: Models.IEntry[] }) { //const lastEntry = entries.at(-1); return ( - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
data + {entries.length - statusData.ignoredEntries}({statusData.ignoredEntries}) +
Ø upload + {statusData.uploadMean}s +
Ø speed + GPS: {statusData.speedGPSMean}km/h Calc: {statusData.speedCalcMean == "NaN" ? " - " : statusData.speedCalcMean}km/h +
maxSpeed + {statusData.maxSpeed}km/h +
vertical + {statusData.verticalCalc[0]}km up, {statusData.verticalCalc[1]}km: down +
Distance + {statusData.distance}km +
) } diff --git a/src/client/css/status.module.css b/src/client/css/status.module.css deleted file mode 100644 index e69de29..0000000