72 double energyDiff = mass * 9.81 * slope *
SPEED2DIST(v);
75 energyDiff += 0.5 * mass * (v * v - lastV * lastV);
97 if (angleDiff != 0.) {
99 double radius =
SPEED2DIST(v) / fabs(angleDiff);
102 if (radius < 0.0001) {
104 }
else if (radius > 10000) {
117 if (energyDiff > 0) {
126 return energyDiff / 3600.;
static const int ENERGY_BASE
Internal moment of inertia.
EmissionType
Enumerating all emission types, including fuel.
HelpersEnergy()
Constructor (initializes myEmissionClassStrings)
static const int ZERO_EMISSIONS
the first class in each model representing a zero emission vehicle
std::map< int, double > myDefaultParameter
The default parameter.
void insert(const std::string str, const T key, bool checkDuplicates=true)
StringBijection< SUMOEmissionClass > myEmissionClassStrings
Mapping between emission class names and integer representations.
double compute(const SUMOEmissionClass c, const PollutantsInterface::EmissionType e, const double v, const double a, const double slope, const std::map< int, double > *param) const
Computes the emitted pollutant amount using the given speed and acceleration.
Helper methods for PHEMlight-based emission computation.