Rain or shine? We consider it!

The operating range of electric vehicles is not only affected by its own properties like the battery capacity or the weight, but also by external factors such as temperature and weather conditions. Up to now, the Routing API of PTV Developer provides the possibility to set current weather data at each waypoint, which is considered for calculating electricity consumption. If no weather data is provided by the client, we assume 23°C and no wind.

In the new version of the PTV Developer Routing API V1.27.1 we simplified the weather handling. If no weather data is provided by the client, we internally set temperature, wind speed and wind direction from a weather service considering place and time. This clearly increases the accuracy calculating electricity consumption compared to the default values 23°C and no wind.

You can easily see the new behavior with our code sample. There no weather data is given and so we internally use the data from a weather service for the consumption calculation. Just have a close look to the response returning the used weather data at start and end of every leg.

In general, please note that the calculation of electricity consumption is only available in the method ‘calculateRoutePost’.

To keep yourself updated about releases and news you can use the subscribe button at the top of the page. If you got any question do not hesitate to get in contact.