25 mass_kg(1300), cAir(0.3), a_m2(2.7), rho_kgpm3(1.2), cr1(0.0136), cr2(5.18e-7),
26 slope(0.), tiresFrictionCoefficient(0.7), engineEfficiency(0.8),
27 massFactor(1.089), cylinders(4), dt(0.01), minRpm(1000), maxRpm(7000),
28 brakesTau_s(0.2), tauEx_s(0.1), tauBurn_s(-1), fixedTauBurn(false) {
57 for (
int i = 0; i <
nGears; i++) {
89 for (
int i = 0; i <
nGears; i++) {
128 out <<
"ID: " <<
id.c_str() << std::endl;
131 out <<
"\tGears number: " << (int)
nGears << std::endl;
132 for (
int i = 0; i <
nGears; i++) {
133 out << std::setprecision(4) <<
"\tRatio of gear " << (i + 1) <<
": " <<
gearRatios[i] << std::endl;
135 out << std::setprecision(4) <<
"\tFinal drive ratio: " <<
differentialRatio << std::endl;
138 out << std::setprecision(3) <<
"\tDiameter: " <<
wheelDiameter_m <<
" m\n";
140 out << std::setprecision(10) <<
"\tcr1: " <<
cr1 << std::endl;
141 out << std::setprecision(10) <<
"\tcr2: " <<
cr2 << std::endl;
144 out << std::setprecision(2) <<
"\tMass: " <<
mass_kg <<
" kg\n";
145 out << std::setprecision(4) <<
"\tMass factor: " <<
massFactor << std::endl;
147 out <<
"Air drag:\n";
148 out << std::setprecision(4) <<
"\tDrag coefficient: " <<
cAir << std::endl;
149 out << std::setprecision(3) <<
"\tMax section: " <<
a_m2 <<
" m^2\n";
153 out <<
"\tCylinders: " <<
cylinders << std::endl;
154 out <<
"\tMinimum rpm: " <<
minRpm << std::endl;
155 out <<
"\tMaximum rpm: " <<
maxRpm << std::endl;
158 out <<
"\t\tMapping coefficient x" << i <<
": " <<
engineMapping.
x[i] << std::endl;
164 out <<
"\tTime constant (s): " <<
brakesTau_s << std::endl;
166 out <<
"Vehicle unrelated parameters:\n";
167 out << std::setprecision(4) <<
"\tAir density: " <<
rho_kgpm3 <<
" kg/m^3\n";
168 out <<
"\tRoad slope: " <<
slope <<
" degrees\n";
169 out << std::setprecision(3) <<
"\tSimulation sampling time: " <<
dt <<
" s\n";
void computeCoefficients()
double __speedToRpmCoefficient
void dumpParameters(std::ostream &out)
double __maxNoSlipAcceleration
struct GearShiftingRules shiftingRule
double __rpmToSpeedCoefficient
double tiresFrictionCoefficient
double __brakesOneMinusAlpha
EngineParameters & operator=(const EngineParameters &other)
virtual ~EngineParameters()
double __maxAccelerationCoefficient
struct PolynomialEngineModelRpmToHp engineMapping
double x[MAX_POLY_DEGREE]
double __airFrictionCoefficient
double __speedToThrustCoefficient