Eclipse SUMO - Simulation of Urban MObility
MSDevice_Battery.cpp
Go to the documentation of this file.
1 /****************************************************************************/
2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
3 // Copyright (C) 2013-2020 German Aerospace Center (DLR) and others.
4 // This program and the accompanying materials are made available under the
5 // terms of the Eclipse Public License 2.0 which is available at
6 // https://www.eclipse.org/legal/epl-2.0/
7 // This Source Code may also be made available under the following Secondary
8 // Licenses when the conditions for such availability set forth in the Eclipse
9 // Public License 2.0 are satisfied: GNU General Public License, version 2
10 // or later which is available at
11 // https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html
12 // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later
13 /****************************************************************************/
19 // The Battery parameters for the vehicle
20 /****************************************************************************/
21 #include <config.h>
22 
26 #include <utils/common/SUMOTime.h>
27 #include <utils/geom/GeomHelper.h>
29 #include <microsim/MSNet.h>
30 #include <microsim/MSLane.h>
31 #include <microsim/MSEdge.h>
32 #include <microsim/MSVehicle.h>
33 #include "MSDevice_Tripinfo.h"
34 #include "MSDevice_Battery.h"
35 
36 #define DEFAULT_MAX_CAPACITY 35000
37 #define DEFAULT_CHARGE_RATIO 0.5
38 
39 
40 // ===========================================================================
41 // method definitions
42 // ===========================================================================
43 // ---------------------------------------------------------------------------
44 // static initialisation methods
45 // ---------------------------------------------------------------------------
46 void
48  insertDefaultAssignmentOptions("battery", "Battery", oc);
49 }
50 
51 
52 void
53 MSDevice_Battery::buildVehicleDevices(SUMOVehicle& v, std::vector<MSVehicleDevice*>& into) {
54  // Check if vehicle should get a battery
55  if (equippedByDefaultAssignmentOptions(OptionsCont::getOptions(), "battery", v, false)) {
57  const SUMOVTypeParameter& typeParams = v.getVehicleType().getParameter();
58  std::map<int, double> param;
59  // obtain maximumBatteryCapacity
60  const double maximumBatteryCapacity = typeParams.getDouble(toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY), DEFAULT_MAX_CAPACITY);
61 
62  // obtain actualBatteryCapacity
63  double actualBatteryCapacity = 0;
65  actualBatteryCapacity = typeParams.getDouble(toString(SUMO_ATTR_ACTUALBATTERYCAPACITY),
66  maximumBatteryCapacity * DEFAULT_CHARGE_RATIO);
67  } else {
69  }
70 
71  const double powerMax = typeParams.getDouble(toString(SUMO_ATTR_MAXIMUMPOWER), 100.);
72  const double stoppingTreshold = typeParams.getDouble(toString(SUMO_ATTR_STOPPINGTRESHOLD), 0.1);
73 
84  param[SUMO_ATTR_ANGLE] = 0;
85 
86  // battery constructor
87  MSDevice_Battery* device = new MSDevice_Battery(v, "battery_" + v.getID(),
88  actualBatteryCapacity, maximumBatteryCapacity, powerMax, stoppingTreshold, param);
89 
90  // Add device to vehicle
91  into.push_back(device);
92  }
93 }
94 
95 
96 bool MSDevice_Battery::notifyMove(SUMOTrafficObject& tObject, double /* oldPos */, double /* newPos */, double /* newSpeed */) {
97  if (!tObject.isVehicle()) {
98  return false;
99  }
100  SUMOVehicle& veh = static_cast<SUMOVehicle&>(tObject);
101  // Start vehicleStoppedTimer if the vehicle is stopped. In other case reset timer
102  if (veh.getSpeed() < myStoppingTreshold) {
103  // Increase vehicle stopped timer
105  } else {
106  // Reset vehicle Stopped
108  }
109 
110  // Update Energy from the battery
111  if (getMaximumBatteryCapacity() != 0) {
112  myParam[SUMO_ATTR_ANGLE] = myLastAngle == std::numeric_limits<double>::infinity() ? 0. : GeomHelper::angleDiff(myLastAngle, veh.getAngle());
114  if (veh.isParking()) {
115  // recuperation from last braking step is ok but further consumption should cease
116  myConsum = MIN2(myConsum, 0.0);
117  }
118 
119  // Energy lost/gained from vehicle movement (via vehicle energy model) [Wh]
121 
122  // saturate between 0 and myMaximumBatteryCapacity [Wh]
123  if (getActualBatteryCapacity() < 0) {
125  if (getMaximumBatteryCapacity() > 0) {
126  WRITE_WARNING("Battery of vehicle '" + veh.getID() + "' is depleted.")
127  }
130  }
131  myLastAngle = veh.getAngle();
132  }
133 
134  // Check if vehicle has under their position one charge Station
135  const std::string chargingStationID = MSNet::getInstance()->getStoppingPlaceID(veh.getLane(), veh.getPositionOnLane(), SUMO_TAG_CHARGING_STATION);
136 
137  // If vehicle is over a charging station
138  if (chargingStationID != "") {
139  // if the vehicle is almost stopped, or charge in transit is enabled, then charge vehicle
140  MSChargingStation* const cs = static_cast<MSChargingStation*>(MSNet::getInstance()->getStoppingPlace(chargingStationID, SUMO_TAG_CHARGING_STATION));
141  if ((veh.getSpeed() < myStoppingTreshold) || cs->getChargeInTransit()) {
142  // Set Flags Stopped/intransit to
143  if (veh.getSpeed() < myStoppingTreshold) {
144  // vehicle ist almost stopped, then is charging stopped
145  myChargingStopped = true;
146 
147  // therefore isn't charging in transit
148  myChargingInTransit = false;
149  } else {
150  // vehicle is moving, and the Charging station allow charge in transit
151  myChargingStopped = false;
152 
153  // Therefore charge in transit
154  myChargingInTransit = true;
155  }
156 
157  // get pointer to charging station
159 
160  // Only update charging start time if vehicle allow charge in transit, or in other case
161  // if the vehicle not allow charge in transit but it's stopped.
163  // Update Charging start time
165  }
166 
167  // time it takes the vehicle at the station < charging station time delay?
169  // Enable charging vehicle
171 
172  // Calulate energy charged
174 
175  // Convert from [Ws] to [Wh] (3600s / 1h):
176  myEnergyCharged /= 3600;
177 
178  // Update Battery charge
181  } else {
183  }
184  }
185  // add charge value for output to myActChargingStation
187  }
188  // else disable charging vehicle
189  else {
190  cs->setChargingVehicle(false);
191  }
192  // disable charging vehicle from previous (not current) ChargingStation (reason: if there is no gap between two different chargingStations = the vehicle switches from used charging station to other one in a single timestap)
195  }
197  }
198  // In other case, vehicle will be not charged
199  else {
200  // Disable flags
201  myChargingInTransit = false;
202  myChargingStopped = false;
203 
204  // Disable charging vehicle
205  if (myActChargingStation != nullptr) {
207  }
208 
209  // Set charging station pointer to NULL
210  myActChargingStation = nullptr;
211 
212  // Set energy charged to 0
213  myEnergyCharged = 0.00;
214 
215  // Reset timer
217  }
218 
219  // Always return true.
220  return true;
221 }
222 
223 
224 // ---------------------------------------------------------------------------
225 // MSDevice_Battery-methods
226 // ---------------------------------------------------------------------------
227 MSDevice_Battery::MSDevice_Battery(SUMOVehicle& holder, const std::string& id, const double actualBatteryCapacity, const double maximumBatteryCapacity,
228  const double powerMax, const double stoppingTreshold, const std::map<int, double>& param) :
229  MSVehicleDevice(holder, id),
230  myActualBatteryCapacity(0), // [actualBatteryCapacity <= maximumBatteryCapacity]
231  myMaximumBatteryCapacity(0), // [maximumBatteryCapacity >= 0]
232  myPowerMax(0), // [maximumPower >= 0]
233  myStoppingTreshold(0), // [stoppingTreshold >= 0]
234  myParam(param),
235  myLastAngle(std::numeric_limits<double>::infinity()),
236  myChargingStopped(false), // Initially vehicle don't charge stopped
237  myChargingInTransit(false), // Initially vehicle don't charge in transit
238  myChargingStartTime(0), // Initially charging start time (must be if the vehicle was launched at the charging station)
239  myConsum(0), // Initially the vehicle is stopped and therefore the consum is zero.
240  myActChargingStation(nullptr), // Initially the vehicle isn't over a Charging Station
241  myPreviousNeighbouringChargingStation(nullptr), // Initially the vehicle wasn't over a Charging Station
242  myEnergyCharged(0), // Initially the energy charged is zero
243  myVehicleStopped(0) { // Initially the vehicle is stopped and the corresponding variable is 0
244 
245  if (maximumBatteryCapacity < 0) {
246  WRITE_WARNING("Battery builder: Vehicle '" + getID() + "' doesn't have a valid value for parameter " + toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY) + " (" + toString(maximumBatteryCapacity) + ").")
247  } else {
248  myMaximumBatteryCapacity = maximumBatteryCapacity;
249  }
250 
251  if (actualBatteryCapacity > maximumBatteryCapacity) {
252  WRITE_WARNING("Battery builder: Vehicle '" + getID() + "' has a " + toString(SUMO_ATTR_ACTUALBATTERYCAPACITY) + " (" + toString(actualBatteryCapacity) + ") greater than it's " + toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY) + " (" + toString(maximumBatteryCapacity) + "). A max battery capacity value will be asigned");
254  } else {
255  myActualBatteryCapacity = actualBatteryCapacity;
256  }
257 
258  if (powerMax < 0) {
259  WRITE_WARNING("Battery builder: Vehicle '" + getID() + "' doesn't have a valid value for parameter " + toString(SUMO_ATTR_MAXIMUMPOWER) + " (" + toString(powerMax) + ").")
260  } else {
261  myPowerMax = powerMax;
262  }
263 
264  if (stoppingTreshold < 0) {
265  WRITE_WARNING("Battery builder: Vehicle '" + getID() + "' doesn't have a valid value for parameter " + toString(SUMO_ATTR_STOPPINGTRESHOLD) + " (" + toString(stoppingTreshold) + ").")
266  } else {
267  myStoppingTreshold = stoppingTreshold;
268  }
269 
280 }
281 
282 
284 }
285 
286 
287 void
288 MSDevice_Battery::checkParam(const SumoXMLAttr paramKey, const double lower, const double upper) {
289  if (myParam.find(paramKey) == myParam.end() || myParam.find(paramKey)->second < lower || myParam.find(paramKey)->second > upper) {
290  WRITE_WARNING("Battery builder: Vehicle '" + getID() + "' doesn't have a valid value for parameter " + toString(paramKey) + " (" + toString(myParam[paramKey]) + ").");
292  }
293 }
294 
295 
296 void
297 MSDevice_Battery::setActualBatteryCapacity(const double actualBatteryCapacity) {
298  if (actualBatteryCapacity < 0) {
300  } else if (actualBatteryCapacity > myMaximumBatteryCapacity) {
302  } else {
303  myActualBatteryCapacity = actualBatteryCapacity;
304  }
305 }
306 
307 
308 void
309 MSDevice_Battery::setMaximumBatteryCapacity(const double maximumBatteryCapacity) {
310  if (myMaximumBatteryCapacity < 0) {
311  WRITE_WARNING("Trying to set into the battery device of vehicle '" + getID() + "' an invalid " + toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY) + " (" + toString(maximumBatteryCapacity) + ").")
312  } else {
313  myMaximumBatteryCapacity = maximumBatteryCapacity;
314  }
315 }
316 
317 
318 void
319 MSDevice_Battery::setPowerMax(const double powerMax) {
320  if (myPowerMax < 0) {
321  WRITE_WARNING("Trying to set into the battery device of vehicle '" + getID() + "' an invalid " + toString(SUMO_ATTR_MAXIMUMPOWER) + " (" + toString(powerMax) + ").")
322  } else {
323  myPowerMax = powerMax;
324  }
325 }
326 
327 
328 void
329 MSDevice_Battery::setStoppingTreshold(const double stoppingTreshold) {
330  if (stoppingTreshold < 0) {
331  WRITE_WARNING("Trying to set into the battery device of vehicle '" + getID() + "' an invalid " + toString(SUMO_ATTR_STOPPINGTRESHOLD) + " (" + toString(stoppingTreshold) + ").")
332  } else {
333  myStoppingTreshold = stoppingTreshold;
334  }
335 }
336 
337 
338 void
341 }
342 
343 
344 void
347 }
348 
349 
350 void
352  myVehicleStopped = 0;
353 }
354 
355 
356 void
359 }
360 
361 
362 double
365 }
366 
367 
368 double
371 }
372 
373 
374 double
376  return myPowerMax;
377 }
378 
379 
380 double
382  return myConsum;
383 }
384 
385 
386 bool
388  return myChargingStopped;
389 }
390 
391 
392 bool
394  return myChargingInTransit;
395 }
396 
397 
398 double
400  return myChargingStartTime;
401 }
402 
403 
404 std::string
406  if (myActChargingStation != nullptr) {
407  return myActChargingStation->getID();
408  } else {
409  return "NULL";
410  }
411 }
412 
413 double
415  return myEnergyCharged;
416 }
417 
418 
419 int
421  return myVehicleStopped;
422 }
423 
424 
425 double
427  return myStoppingTreshold;
428 }
429 
430 
431 std::string
432 MSDevice_Battery::getParameter(const std::string& key) const {
435  } else if (key == toString(SUMO_ATTR_ENERGYCONSUMED)) {
436  return toString(getConsum());
437  } else if (key == toString(SUMO_ATTR_ENERGYCHARGED)) {
438  return toString(getEnergyCharged());
439  } else if (key == toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY)) {
441  } else if (key == toString(SUMO_ATTR_CHARGINGSTATIONID)) {
442  return getChargingStationID();
443  } else if (key == toString(SUMO_ATTR_VEHICLEMASS)) {
444  return toString(myParam.find(SUMO_ATTR_VEHICLEMASS)->second);
445  }
446  throw InvalidArgument("Parameter '" + key + "' is not supported for device of type '" + deviceName() + "'");
447 }
448 
449 
450 void
451 MSDevice_Battery::setParameter(const std::string& key, const std::string& value) {
452  double doubleValue;
453  try {
454  doubleValue = StringUtils::toDouble(value);
455  } catch (NumberFormatException&) {
456  throw InvalidArgument("Setting parameter '" + key + "' requires a number for device of type '" + deviceName() + "'");
457  }
459  setActualBatteryCapacity(doubleValue);
460  } else if (key == toString(SUMO_ATTR_MAXIMUMBATTERYCAPACITY)) {
461  setMaximumBatteryCapacity(doubleValue);
462  } else if (key == toString(SUMO_ATTR_VEHICLEMASS)) {
463  myParam[SUMO_ATTR_VEHICLEMASS] = doubleValue;
464  } else {
465  throw InvalidArgument("Setting parameter '" + key + "' is not supported for device of type '" + deviceName() + "'");
466  }
467 }
468 
469 
470 void
472  // @note: only charing is performed but no energy is consumed
474  myConsum = 0;
475 }
476 /****************************************************************************/
#define DEFAULT_CHARGE_RATIO
#define DEFAULT_MAX_CAPACITY
#define WRITE_WARNING(msg)
Definition: MsgHandler.h:276
#define TS
Definition: SUMOTime.h:40
@ SUMO_TAG_CHARGING_STATION
A Charging Station.
SumoXMLAttr
Numbers representing SUMO-XML - attributes.
@ SUMO_ATTR_MAXIMUMPOWER
Maximum Power.
@ SUMO_ATTR_ENERGYCONSUMED
Energy consumed.
@ SUMO_ATTR_STOPPINGTRESHOLD
Stopping treshold.
@ SUMO_ATTR_MAXIMUMBATTERYCAPACITY
Maxium battery capacity.
@ SUMO_ATTR_ROLLDRAGCOEFFICIENT
Roll Drag coefficient.
@ SUMO_ATTR_CONSTANTPOWERINTAKE
Constant Power Intake.
@ SUMO_ATTR_RECUPERATIONEFFICIENCY_BY_DECELERATION
Recuperation efficiency (by deceleration)
@ SUMO_ATTR_RECUPERATIONEFFICIENCY
Recuperation efficiency (constant)
@ SUMO_ATTR_AIRDRAGCOEFFICIENT
Air drag coefficient.
@ SUMO_ATTR_CHARGINGSTATIONID
Charging Station ID.
@ SUMO_ATTR_ANGLE
@ SUMO_ATTR_ACTUALBATTERYCAPACITY
@ SUMO_ATTR_VEHICLEMASS
Vehicle mass.
@ SUMO_ATTR_RADIALDRAGCOEFFICIENT
Radial drag coefficient.
@ SUMO_ATTR_ENERGYCHARGED
tgotal of Energy charged
@ SUMO_ATTR_PROPULSIONEFFICIENCY
Propulsion efficiency.
@ SUMO_ATTR_INTERNALMOMENTOFINERTIA
Internal moment of inertia.
@ SUMO_ATTR_FRONTSURFACEAREA
Front surface area.
T MIN2(T a, T b)
Definition: StdDefs.h:73
std::string toString(const T &t, std::streamsize accuracy=gPrecision)
Definition: ToString.h:44
static double angleDiff(const double angle1, const double angle2)
Returns the difference of the second angle to the first angle in radiants.
Definition: GeomHelper.cpp:179
Helper methods for energy-based electricity consumption computation based on the battery device.
Definition: HelpersEnergy.h:40
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.
double getDefaultParam(int paramKey) const
Definition: HelpersEnergy.h:74
double getChargingPower() const
Get charging station's charging power.
bool getChargeInTransit() const
Get chargeInTransit.
void setChargingVehicle(bool value)
enable or disable charging vehicle
double getChargeDelay() const
Get Charge Delay.
void addChargeValueForOutput(double WCharged, MSDevice_Battery *battery)
add charge value for output
double getEfficency() const
Get efficiency of the charging station.
Battery device for electric vehicles.
static void insertOptions(OptionsCont &oc)
Inserts MSDevice_Example-options.
void notifyParking()
called to update state for parking vehicles
int myVehicleStopped
Parameter, How many timestep the vehicle is stopped.
bool myChargingInTransit
Parameter, Flag: Vehicles it's charging in transit (by default is false)
static void buildVehicleDevices(SUMOVehicle &v, std::vector< MSVehicleDevice * > &into)
Build devices for the given vehicle, if needed.
double getActualBatteryCapacity() const
Get the actual vehicle's Battery Capacity in kWh.
int getVehicleStopped() const
Get number of timestep that vehicle is stopped.
double myMaximumBatteryCapacity
Parameter, The total vehicles's Battery Capacity in kWh, [myMaximumBatteryCapacity >= 0].
void increaseVehicleStoppedTimer()
Increase myVehicleStopped.
double myChargingStartTime
Parameter, Moment, wich the vehicle has beging to charging.
void setStoppingTreshold(const double stoppingTreshold)
Set vehicle's stopping treshold.
double myActualBatteryCapacity
Parameter, The actual vehicles's Battery Capacity in kWh, [myActualBatteryCapacity <= myMaximumBatter...
double myPowerMax
Parameter, The Maximum Power when accelerating, [myPowerMax >= 0].
bool notifyMove(SUMOTrafficObject &veh, double oldPos, double newPos, double newSpeed)
Checks for waiting steps when the vehicle moves.
double getChargingStartTime() const
Get charging start time.
std::map< int, double > myParam
Parameter collection.
void increaseChargingStartTime()
Increase Charging Start time.
MSChargingStation * myPreviousNeighbouringChargingStation
Parameter, Pointer to charging station neighbouring with myActChargingStation in which vehicle was pl...
double getMaximumBatteryCapacity() const
Get the total vehicle's Battery Capacity in kWh.
bool myChargingStopped
Parameter, Flag: Vehicles it's charging stopped (by default is false)
double getConsum() const
Get consum.
void setActualBatteryCapacity(const double actualBatteryCapacity)
Set actual vehicle's Battery Capacity in kWh.
void checkParam(const SumoXMLAttr paramKey, const double lower=0., const double upper=std::numeric_limits< double >::infinity())
void setPowerMax(const double new_Pmax)
Set maximum power when accelerating.
double getMaximumPower() const
Get the maximum power when accelerating.
double myEnergyCharged
Parameter, Energy charged in each timestep.
double myLastAngle
Parameter, Vehicle's last angle.
bool isChargingInTransit() const
Get true if Vehicle it's charging, false if not.
std::string getParameter(const std::string &key) const
try to retrieve the given parameter from this device. Throw exception for unsupported key
void resetChargingStartTime()
Reset charging start time.
const std::string deviceName() const
return the name for this type of device
MSDevice_Battery(SUMOVehicle &holder, const std::string &id, const double actualBatteryCapacity, const double maximumBatteryCapacity, const double powerMax, const double stoppingTreshold, const std::map< int, double > &param)
Constructor.
void resetVehicleStoppedTimer()
Reset myVehicleStopped.
void setParameter(const std::string &key, const std::string &value)
try to set the given parameter for this device. Throw exception for unsupported key
MSChargingStation * myActChargingStation
Parameter, Pointer to current charging station in which vehicle is placed (by default is NULL)
~MSDevice_Battery()
Destructor.
double myStoppingTreshold
Parameter, stopping vehicle treshold [myStoppingTreshold >= 0].
double myConsum
Parameter, Vehicle consum during a time step (by default is 0.)
double getEnergyCharged() const
Get charged energy.
std::string getChargingStationID() const
Get current Charging Station ID.
void setMaximumBatteryCapacity(const double maximumBatteryCapacity)
Set total vehicle's Battery Capacity in kWh.
double getStoppingTreshold() const
Get stopping treshold.
bool isChargingStopped() const
Get true if Vehicle is charging, false if not.
static void insertDefaultAssignmentOptions(const std::string &deviceName, const std::string &optionsTopic, OptionsCont &oc, const bool isPerson=false)
Adds common command options that allow to assign devices to vehicles.
Definition: MSDevice.cpp:134
static bool equippedByDefaultAssignmentOptions(const OptionsCont &oc, const std::string &deviceName, DEVICEHOLDER &v, bool outputOptionSet, const bool isPerson=false)
Determines whether a vehicle should get a certain device.
Definition: MSDevice.h:204
static MSNet * getInstance()
Returns the pointer to the unique instance of MSNet (singleton).
Definition: MSNet.cpp:171
std::string getStoppingPlaceID(const MSLane *lane, const double pos, const SumoXMLTag category) const
Returns the stop of the given category close to the given position.
Definition: MSNet.cpp:1107
MSStoppingPlace * getStoppingPlace(const std::string &id, const SumoXMLTag category) const
Returns the named stopping place of the given category.
Definition: MSNet.cpp:1098
Abstract in-vehicle device.
SUMOVehicle & myHolder
The vehicle that stores the device.
const SUMOVTypeParameter & getParameter() const
const std::string & getID() const
Returns the id.
Definition: Named.h:73
A storage for options typed value containers)
Definition: OptionsCont.h:89
static OptionsCont & getOptions()
Retrieves the options.
Definition: OptionsCont.cpp:58
double getDouble(const std::string &key, const double defaultValue) const
Returns the value for a given key converted to a double.
const std::string getParameter(const std::string &key, const std::string defaultValue="") const
Returns the value for a given key.
static const HelpersEnergy & getEnergyHelper()
get energy helper
Representation of a vehicle, person, or container.
virtual bool isVehicle() const
Whether it is a vehicle.
virtual double getAcceleration() const =0
Returns the object's acceleration.
virtual double getSlope() const =0
Returns the slope of the road at object's position in degrees.
virtual double getSpeed() const =0
Returns the object's current speed.
virtual const MSVehicleType & getVehicleType() const =0
Returns the object's "vehicle" type.
virtual const SUMOVehicleParameter & getParameter() const =0
Returns the vehicle's parameter (including departure definition)
virtual const MSLane * getLane() const =0
Returns the lane the object is currently at.
virtual double getPositionOnLane() const =0
Get the object's position along the lane.
Structure representing possible vehicle parameter.
Representation of a vehicle.
Definition: SUMOVehicle.h:58
virtual bool isParking() const =0
Returns the information whether the vehicle is parked.
virtual double getAngle() const =0
Get the vehicle's angle.
static double toDouble(const std::string &sData)
converts a string into the double value described by it by calling the char-type converter