init commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
|
||||
// Longitudinal vehicle dynamics: converts wheel torque into road speed.
|
||||
class Vehicle {
|
||||
public:
|
||||
void step(double dt, double wheel_torque_nm);
|
||||
|
||||
double speed_mps() const;
|
||||
double wheel_rpm() const;
|
||||
|
||||
private:
|
||||
double m_speed_mps = 0.0;
|
||||
|
||||
static constexpr double kMassKg = 1400.0;
|
||||
static constexpr double kWheelRadiusM = 0.32;
|
||||
static constexpr double kDragCoeff = 0.35; // simplified quadratic drag term
|
||||
};
|
||||
Reference in New Issue
Block a user