Graph power consumption over time, so we could look at it on a per lap basis to see how many laps we can do on our current SOC. This can be done very similarly to how we're integrating RPM data to get distance traveled, but instead integrate power as reported by the BMS. Note that the BMS doesn't actually report power, but it does report current/voltage which can be used to calculate power (I*V).
|
// ∫ mx + b = 1/2 m x^2 + bx |
Graph power consumption over time, so we could look at it on a per lap basis to see how many laps we can do on our current SOC. This can be done very similarly to how we're integrating RPM data to get distance traveled, but instead integrate power as reported by the BMS. Note that the BMS doesn't actually report power, but it does report current/voltage which can be used to calculate power (I*V).
Pit-GUI/backend/helper/math.ts
Line 50 in 5a4b380