Community of VE/MapPoint Users and Developers
This is a discussion on Trying to get distance considering driver's current heading within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Greetings, I have included a simplified version of the code I use to calculate the distance from the driver's last ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Trying to get distance considering driver's current heading I have included a simplified version of the code I use to calculate the distance from the driver's last known location to his next stop. MapPoint.Location locA = mpMap.GetLocation( pointA.Latitude, pointA.Longitude, 100 ); mpRoute.Waypoints.Add( locA, "locA" ); MapPoint.Location locB = mpMap.GetLocation( pointB.Latitude, pointB.Longitude, 100 ); mpRoute.Waypoints.Add( locB, "locB" ); mpRoute.Calculate(); But I need a way to introduce the driver's last known HEADING, otherwise using simply his last known LOCATION will produce an unrealistic route. If he's driving east, then there's no point in using MapPoint's best estimate, which may require that he head west. I have no ability to re-direct the driver; I'm simply using MapPoint to help create an educated guess when the driver will arrive. Does anyone know how to use his heading to get MapPoint to make a more realistic route between the two points? Thanks. |
| |||
|
Hi, Looks tricky to do. One way could be to set a waypoint on the same road in the direction where the vehicle runs on a point where it could be at the current speed and then calculate. However next problem is to get that point snap to a road, easy done, but you dont know ifit is the road, and heading.. maybe the car is just in a curve? I should say it is word to try but I dont think you can have good results. However maybe the one idea brings out other ideas
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| current, distance, driver, heading |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Saving current view of map | radiusdude | MapPoint 2006/2009 Discussion | 2 | 04-05-2005 08:36 AM |
| Getting current GPS coordinates in VB6 | Anonymous | MapPoint 2006/2009 Discussion | 2 | 06-10-2004 06:09 PM |
| Distance from current location to next turn point | dzhong | MapPoint 2006/2009 Discussion | 0 | 12-24-2002 02:03 PM |
| Is it possible to expand upon the current 255 push.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 04-16-2002 10:32 PM |
| I am the current user of MapPoint2000. I would lik.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 01-18-2001 08:28 AM |