Calculate consumption with capped speed

To calculate consumption with capped speed, specify vehicle[speedCap] in the route request. This parameter will impact the route ETA and consumption calculation.

The vehicle[speedCap] parameter specifies the maximum speed that the vehicle should not or cannot exceed while traveling. The total energy used in the route will typically decrease if the capped speed is less than the base/traffic speed.

Speed capping is not supported when ev[makeReachable] is set to true.

For a calculation of consumption without capped speed, see Calculate consumption without capped speed.

curl -X GET \
'https://router.hereapi.com/v8/routes?origin=52.66181,13.38251&destination=51.772324,12.402652&return=polyline,summary,actions,instructions&spans=dynamicSpeedInfo,length,consumption,speedLimit,length&transportMode=car&vehicle[speedCap]=25&departureTime=any&ev[freeFlowSpeedTable]=0,0.239,27,0.239,45,0.259,60,0.196,75,0.207,90,0.238,100,0.26,110,0.296,120,0.337,130,0.351,250,0.351&ev[trafficSpeedTable]=0,0.349,27,0.319,45,0.329,60,0.266,75,0.287,90,0.318,100,0.33,110,0.335,120,0.35,130,0.36,250,0.36&ev[ascent]=9&ev[descent]=4.3&apikey={YOUR_API_KEY}'

Limiting the speed to 25 m/s (90 km/h) reduces the total energy used in the route to 36 kWh as compared to the request from the Calculate consumption without capped speed tutorial.

{
  "routes" : [
    {
      "id" : "58f003f1-a472-4f5e-a818-f6ef3b82c8fa",
      "sections" : [
        {
          "transport" : {
            "mode" : "car"
          },
          "id" : "b61bb338-0cb4-41a1-abbb-2c94569d92e3",
          "arrival" : {
            "place" : {
              "type" : "place",
              "location" : {
                "lat" : 51.773121199999999,
                "lng" : 12.3997402,
                "elv" : 116
              },
              "originalLocation" : {
                "lat" : 51.772323999999998,
                "lng" : 12.402652
              }
            }
          },
          "type" : "vehicle",
          "departure" : {
            "place" : {
              "type" : "place",
              "location" : {
                "lat" : 52.660966600000002,
                "lng" : 13.3847313,
                "elv" : 87
              },
              "originalLocation" : {
                "lat" : 52.661809900000002,
                "lng" : 13.38251
              }
            }
          },
          "summary" : {
            "consumption" : 36.2984,
            "length" : 145350,
            "baseDuration" : 6824,
            "duration" : 6824
          }
        }
      ]
    }
  ]
}

results matching ""

    No results matching ""