Vehicle locator
In ioki Platform it’s sometimes necessary to locate a vehicle during a vehicle planning. For example when a recalculation is triggered and a corresponding Journey is calculated, the virtual start place has to be defined.
Depending on the state of the Vehicle Planning, the existence of current vehicle positions and the time of the query, ioki Platform has different strategies to determine (or assume) the current location of the vehicle.
These are the following:
The Vehicle Planning is not active and the current time is before the start of the Vehicle Planning. ioki Platform takes the assigned Place of the Shift Beginning task of the vehicle planning as current location.
The Vehicle Planning is not active and the current time is after the end of the Vehicle Planning. There are three possibilities which are processed in this order:
- If a Place is specified for the Shift End Task of the Vehicle Planning this is used as the location.
- If no Place has been specified the geo point of the calculated point from the last (not canceled) Task is assigned as location.
- If no location was assigned to any previous Task, the planned Place for the shift beginning is used.
- There is a Vehicle Position which is younger than one hour and there is a current Journey of the Vehicle Planning. The location is assigned depending on further circumstances in the following order:
- If the last Vehicle Position has an accuracy smaller than 100 and the recorded time is younger than 30 seconds, this Vehicle Position is used.
- If the Journey has no data on the geographic track the position is used no matter of time or accuracy.
- If there exists data on the geographic route it’s most probably possible to do better than that. In this case, ioki Platform maps the last known position to the geo line track of the Journey. Here, the locator takes the time difference into account as well as the location: If the distance between a point which is mapped on the route (only considering the geographic difference not the time) and the last known Vehicle Position is larger than 500 meters, the Vehicle is most probably not en route anymore. Therefore, we return the last known Vehicle Position as best guess. If it’s smaller, ioki Platform includes also information on the time difference. Since we have the information where the Vehicle should be and at which time in the corresponding Leg of the Journey, it’s possible to calculate the time when the vehicle should have been at the mapped geo point. With this information and the age of the Vehicle Position the mapping is readjusted to the best fitting position on the route.
- There is only the Journey present and no current Vehicle Position.
- If the Journey has no information on the route, ioki Platform uses the specified Place of the Shift Beginning Task as fallback.
- If the Journey has information on the geographic track, the geopoint is interpolated via the time, i.e., the location where the Vehicle should be right now according to the current Journey.
Only a Vehicle Position is present. If only a Vehicle Position is present, yes, ioki Platform uses this position as best guess.
Fallback. If ioki Platform does not have any of the above information the fallback is the planned Place for the Shift Beginning of the considered Vehicle Planning.