init commit

This commit is contained in:
Avery Haas
2026-08-28 22:38:58 -04:00
commit 120e4f505f
324 changed files with 133476 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#pragma once
// Crankshaft rotational dynamics. Placeholder physics for now —
// real combustion/friction torque modeling comes later.
class Engine {
public:
// load_torque_nm is the resistance fed back from the transmission
// (via the vehicle), opposing crank rotation.
void step(double dt, double load_torque_nm);
double rpm() const;
double torque_nm() const; // net torque produced this step
void reset();
private:
double m_rpm = 0.0;
double m_torque_nm = 0.0;
static constexpr double kIdleRpm = 900.0;
static constexpr double kCrankInertiaKgm2 = 0.15; // placeholder
};