Speed Cap

Speed Cap specifies the maximum speed at which the user wishes to travel at.

When supplied, Route ETA is updated according to speed cap.

Speed Cap doesn't affect route calculation for car and truck but for scooter.

To optimize long distance routing car and truck use MLD or MAASTAR algorithm, which use precomputed routes, reason why time dependent restrictions cannot be dealt with, FLASH algorithm becomes too slow for long distances. Hence, route calculation is not affected for car and truck, only ETA is affected.

Scooter uses FLASH, and travel distance is not supposed to be long, FLASH performs AStar graph search, so does not rely on precomputed data. Hence both route calculation and ETA are affected for scooter.

Example using speedCap

curl -X GET \
  'https://router.hereapi.com/v8/routes?origin=52.51016,13.285389&destination=52.514652,13.347359&return=polyline,summary,actions,instructions&spans=dynamicSpeedInfo&transportMode=car&vehicle[speedCap]=11.11
{
    "routes": [
        {
            "id": "8a1d31d6-63f4-4b3e-ab7f-e7b742f4c56c",
            "sections": [
                {
                    "id": "7aa1396e-1789-4f48-9b41-52ef752edbb5",
                    "type": "vehicle",
                    "departure": {
                        "time": "2020-10-27T11:39:49+01:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 52.5200902,
                                "lng": 13.3366866
                            },
                            "originalLocation": {
                                "lat": 52.5201149,
                                "lng": 13.3367119
                            }
                        }
                    },
                    "arrival": {
                        "time": "2020-10-27T11:42:07+01:00",
                        "place": {
                            "type": "place",
                            "location": {
                                "lat": 52.5143934,
                                "lng": 13.3474093
                            },
                            "originalLocation": {
                                "lat": 52.514652,
                                "lng": 13.347359
                            }
                        }
                    },
                    "summary": {
                        "duration": 138,
                        "length": 1160,
                        "baseDuration": 138
                    },
                    "transport": {
                        "mode": "car"
                    }
                }
            ]
        }
    ]
}

results matching ""

    No results matching ""