Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 22

Thread: need info mappoint/gps/vb6 developement

  1. #11
    Raw Wave god_of_cpu's Avatar
    Join Date
    Jan 2004
    Location
    SilverSpring Maryland
    Posts
    2,960
    Quote Originally Posted by CorollaVerso'04
    2. Autorotation is something I don't bother much, I search trough the second direction element for words like: left,right(etc),bear,first(etc),roundabout and show a picture I have drawn for that.
    You don't actually have to search through the direction text for this, you can use the Action property of the direction. It returns an enumerated type that describes the direction. This type is only partially documented though!!! I was able to find out the rest of the types though by devling into the .NET SDK for mappoint. The enumerated types I came up with was this (13 and above were undocumented:

    enum GeoDirectionAction
    {
    geoActionOther = 0,
    geoActionDepart = 1,
    geoActionArrive = 2,
    geoActionTurnLeft = 3,
    geoActionTurnRight = 4,
    geoActionBearLeft = 5,
    geoActionBearRight = 6,
    geoActionMerge = 7,
    geoActionContinue = 8,
    geoActionCrossBorder = 9,
    geoActionTurnBack = 10,
    geoActionEnterRoundabout = 11,
    geoActionExitRoundabout = 12,
    geoActionConstruction = 13,
    geoActionNameChange = 14,
    geoActionLeftLeft = 15,
    geoActionLeftRight = 16,
    geoActionRightLeft = 17,
    geoActionRightRight = 18,
    geoActionTakeRamp = 19,
    geoActionTakeRampLeft = 20,
    geoActionTakeRampRight = 21,
    geoActionKeepStraight = 22,
    geoActionKeepLeft = 23,
    geoActionKeepRight = 24
    };
    StreetDeck.com Developer (I am Chuck)
    Get StreetDeck at http://www.streetdeck.com
    The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

  2. #12
    Newbie
    Join Date
    Apr 2004
    Location
    NL-Bergschenhoek (near Rotterdam)
    Posts
    26
    Thanks!
    Slowly but surely i'm getting somewhere, i hope ;-)
    I think i found another solution too for recalculation the routes:
    First ask the user for the destination, make it the route-end waypoint. Then get the current GPS position, make this the route-start waypoint. Calculate the route. From now on make a new waypoint that is called 'current position waypoint (cpw)'. Do a waypoint-reorder, or do a 'distance to' on the severall directions. If the cpw has a too big distance to the directions then you are getting off-track. In this case a recalculation comes in place, or so (didn't work that out). The cpw is updated on a regular basis.

    At least now i don't think a 2 secs. interval for rebuilding the the whole route (start-route and route-end) and recalculation is nessecary. Also, with the cpw i can detect if a direction element is near on the track and needs to be shown. In my first prototype application the second direction element was always shown, even if it was km's ahead. I just showed the second one after each recalc, regardless of the distance and regardless of being off route.

  3. #13
    Raw Wave god_of_cpu's Avatar
    Join Date
    Jan 2004
    Location
    SilverSpring Maryland
    Posts
    2,960
    Quote Originally Posted by CorollaVerso'04
    Do a waypoint-reorder, or do a 'distance to' on the severall directions. If the cpw has a too big distance to the directions then you are getting off-track.
    That probably should work. I thought of this too, but didn't implement it because I thought distances were calculated from locations to direction start locations. This would mean you could be moving away from all direction objects in your route and still be on the route if it was real curvy. I later heard that the distances to direction objects are actually the distance from a location to the closest point on the directions route segment. If this is true, your way probably will work real well.
    StreetDeck.com Developer (I am Chuck)
    Get StreetDeck at http://www.streetdeck.com
    The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

  4. #14
    Newbie
    Join Date
    Apr 2004
    Location
    NL-Bergschenhoek (near Rotterdam)
    Posts
    26

    waypoints diffs

    Well I noticed something yesterday short before going to sleep:
    If I take to waypoints and ask for te distance between them I get, lets say, 3.6 kms. But if I set up a route with these wps. as start and end I get a tripdistance of 5.3 kms.


    It was late and had to go to bed so I didn't have time to figure out where the difference comes from.

  5. #15
    I'm sorry, and you are....? frodobaggins's Avatar
    Join Date
    Jan 2003
    Location
    Ruston, LA
    Posts
    8,846
    The lower number is probably the line of sight measurement. (direct line)
    [H]4 Life
    My next generation Front End is right on schedule.
    It will be done sometime in the next generation.
    I'm a lesbian too.
    I am for hire!

  6. #16
    Newbie
    Join Date
    Apr 2004
    Location
    NL-Bergschenhoek (near Rotterdam)
    Posts
    26

    triangle calculation

    what should work too is:
    after the waypoint.reorder (to put the current position waypoint in line with the others) and being on track(!) the distance from the last past waypoint to the next waypoint ahead must be equal to the last waypoint to the currentposition waypoint PLUS the distance from the currentposition waypoint to the next waypoint coming. If not you're moving besides the route.

    wp1---(distance a)---cp---(distance b)---wp2
    wp1------------(total distance)----------wp2

    If the above are not equal we're of track.....I think.

  7. #17
    Raw Wave god_of_cpu's Avatar
    Join Date
    Jan 2004
    Location
    SilverSpring Maryland
    Posts
    2,960
    Quote Originally Posted by CorollaVerso'04
    wp1---(distance a)---cp---(distance b)---wp2
    wp1------------(total distance)----------wp2
    I don't think that will work. I believe the distanceTo method always returns the distance as the crow files even between waypoints on a calculated route. Also if you reorder or add waypoints you will have to recalculate your route.
    StreetDeck.com Developer (I am Chuck)
    Get StreetDeck at http://www.streetdeck.com
    The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

  8. #18
    Newbie
    Join Date
    Apr 2004
    Location
    NL-Bergschenhoek (near Rotterdam)
    Posts
    26

    crow files?

    isn't there something possible with a route coloring-event?
    if i point at a location on the map beside the route, the route stays the same color.
    But if i point at a location on or very nearby the route it colors blue.
    So MP knows if a locations is on the route or not.

    and btw: could you explain '..the distance as the crow files'?
    did you mean '..as the crow flies' perhaps? (remember english is not my native)

  9. #19
    Raw Wave god_of_cpu's Avatar
    Join Date
    Jan 2004
    Location
    SilverSpring Maryland
    Posts
    2,960
    You can programmitically generate a mouse down message and get mappoint to generate a selectionchange event if your close to a direction, however, this event will probably also be generated if its clicked by a POI or something else and I don't know of any easy way to tell if a Direction object is selected or not other then looking at the color of it.

    Distance as the crow files means the shortest distance between two points, a straight line.
    StreetDeck.com Developer (I am Chuck)
    Get StreetDeck at http://www.streetdeck.com
    The Official StreetDeck Forums have moved, please visit us at http://www.streetdeck.com/forum for official support for Streetdeck.

  10. #20
    FLAC IntellaWorks's Avatar
    Join Date
    Jun 2004
    Location
    NH
    Posts
    1,173

    .

    I haven't had time to read the entire post, but I'm doing the same thing Mappoint 2004 / VB.net. Here's what I've got. If no directions have been enterered then I just draw, using the 'addimagetomap' (thats not the real name but you get the idea of the method) The image, is an icon of the car... it moves on the map like a birdseye of your actual car.

    Now, if you enter directions, same deal calculate the route... Keep drawing your car depending on where the GPS says it is... if your car is off the route, (your route is stored in a collection, but I can't remmeber the name, check the Mappoint SDK or Mappoint MSDN pages) then re-calculate the route, otherwise just draw the car and no calucations are required..

    Does this make any sense, I did real quickly polymorphed psuedo-code / explanation of what I'm doing.. we should keep this forum going.. I'll add code when I get time.
    Progress [I will seriously never be done!]
    Via EPIA MII
    512MB RAM
    OEM GPS (embedded)
    nLite WinXP pro on
    1GB Extreme III CF card
    Carnetix 1260 startup/ DC-DC regulator
    Software: Still, re-Writing my existing front end in .Net

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. File Info / Movie Info
    By frodobaggins in forum FP FAQ
    Replies: 0
    Last Post: 12-01-2004, 05:42 PM
  2. MP3Car 200W psu info?
    By kefka_killer in forum Power Supplies
    Replies: 3
    Last Post: 07-20-2004, 02:45 AM
  3. LM64P89 LCD screen info ?
    By bobit in forum LCD/Display
    Replies: 2
    Last Post: 12-01-2002, 11:12 PM
  4. Any info on this laptop dvd drive
    By tapper1999 in forum General Hardware Discussion
    Replies: 3
    Last Post: 01-15-2002, 04:54 PM
  5. a database of id3 info
    By etrik in forum Software & Software Development
    Replies: 16
    Last Post: 01-18-2001, 11:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •