External Map Applications
From CTMS
Interfaces to External Map Applications
Drive Time and Distance Calculation using External Map Application
When a customer needs to deliver to new locations on a regular basis, there needs to be a method by which MTS can gain reasonably accurate drive times and distances for the journey legs that it creates. There are other methods that already exist within MTS, such as Pythagoras and Time & Distance Matrix: -
- Pythagoras - calculating the distance using Pythagoras (plus a wiggle factor) then using an average speed to calculate the drive time. Note that the distance unit, i.e. miles or kilometers, is determined by the system parameter GEO_DT_DISTANCE_UNITS which is configured by the superuser in conjunction with the MTS Support Team.
- Time & Distance Matrix – a matrix of times and distances, held in a table, which needs to be pre-populated using the output from another system (such as Paragon Routing).
By introducing PC Miler or MapPoint the following MTS functionality is made available:
- PC Miler or MapPoint allow for Times and Distances to be generated on the fly, by passing in the source and destination long/lat coordinates, and then calculating the journey based on a road network using various road speeds depending on the class of road used.
In summary, the functional process is as follows (using MapPoint as an example):
- MTS “Get Time and Distance” function is called when the drive time and distance is required between two trip stop locations (a journey leg), such as when pressing a “Calc Dist & Time” button.
- A request is queued to the MapPoint Interface program (named “CBDS Interface”). The request simply includes the data that the CBDS Interface program needs to calculate drive time and distance using MapPoint, such as location latitude and longitude (lat/Long) of each location.
- The queued request is picked up by the CBDS Interface which then initiates a background MapPoint “session”. The lat/long of the two locations is used to pin-point the journey leg locations on a MapPoint map.
- Once the two locations are pin-pointed on the map, a route is created between the two. The route follows the road network and considers the parameters configured in the CBDS Interface, such as whether to use KM or Miles and Road Speeds.
- Once the route is complete, the Distance and Drive Time are returned from MapPoint to the CBDS Interface program. The CBDS Interface program then updates the MTS Trip Stops with the calculated data and marks the request as processed.
- The end-to-end process typically takes a second or so and usually occurs in real time.