Thanks  Carsten...I understand a bit better now..
By the way, I am not clear where I should be looking for the AJAX response (to 
see the via_point values and route_instructions) in firebug output...can you 
provide some guidance? I see the firebug output at the bottom of the map...
I will ignore the via_indices as you pointed out there may be errors with it.
And I guess interpolation using the azimuth? would work?

Regards
Sriram

      From: Carsten Malchow <[email protected]>
 To: [email protected] 
 Sent: Wednesday, December 3, 2014 12:35 PM
 Subject: Re: [OSRM-talk] Plotting position in time using OSRM
   
Please look at this exampleand open firebug to see the JSON response.here I add 
a Way point. there you see that the via_point has 3 elements as also the 
via_indices, but this via_indices not corrosponed to any numbers in the 
route_instruction.If you reach the way point then in the route instruction the 
driving directions contains the number 9, for the start points is 10 and for 
the end point is 15. Also you start from a point and all information you have 
is related to the next point. Means for example your startpoint contains an 
entry of 200m means that in 200m the next point is coming. osrm.at/ag6 I hope I 
could example this clearly now.  According to you b.) question may be 
interpolation would help, becouse you have only route instructions if a bigger 
change in the direction will occure.reagardsCGesendet: Mittwoch, 03. Dezember 
2014 um 12:20 Uhr
Von: "S R" <[email protected]>
An: "Mailing list to discuss Project OSRM" <[email protected]>
Betreff: Re: [OSRM-talk] Plotting position in time using OSRM

Thanks Carsten. To clarify then: a. if position is 4, i can find the location 
of the corresponding start point using via_point[4].      This does not seem 
correct though when I look at the example API (Requesting Routes section):      
   https://github.com/Project-OSRM/osrm-backend/wiki/Server-api          In 
that case there is only start and end, but the route_instructions array has 6 
elements.         The position values of these 6 elements   are 0, 2, 3, 8, 17, 
20.         The via_points array has only 2 elements.     So it is not clear 
how to interpret the "position" attribute. b. I realize now that the travel 
times  is the time for travel to the next via point. That is why the end point 
has a travel time of 0.     It is still unclear of course how I can figure out 
the lat+long of position along a street. ThanksSriram    From: Carsten Malchow 
<[email protected]>
To: [email protected]
Sent: Wednesday, December 3, 2014 11:49 AM
Subject: Re: [OSRM-talk] Plotting position in time using OSRM Hi,  ["Turn 
left",    "High Street",    200,                    /// yes this is Integer in 
the unit of meters from the last instruction    4,                        // 
Posistion of instructions according to the geomerty and of course to the start 
point                              // dont be scared if this number not 
follwong the ristrict order if  of 3 not follwos 4.                             
 // as I understand this correct this occur because of a generalizaion of the 
raw geomerty, with this some points can be eliminate.     10,                   
   //Travel time to this point from the last instructions    "200m",    "NE",   
 22.5    ]1.)via_points just give the coordinates back of start/end and 
intermieat pointsvia_indices look this: 
https://github.com/Project-OSRM/osrm-backend/issues/1020 2.) I think this you 
have to calculated by your self. regards CarstenGesendet: Mittwoch, 03. 
Dezember 2014 um 11:04 Uhr
Von: "S R" <[email protected]>
An: "Mailing list to discuss Project OSRM" <[email protected]>
Betreff: Re: [OSRM-talk] Plotting position in time using OSRM
 Hi Carsten Many thanks....the link you mention shows the route instructions 
describe each street and gives the position of the start point, its length, and 
time in seconds. This is very helpful. Still the documentation is not fully 
clear (to me). Take the example in the link:    ["Turn left",    "High Street", 
   200,                   <------ 200 m long    4,                        
<------ position (of the starting point on the street?)    10,                  
    <------- time to traverse this street?    "200m",    "NE",    22.5    ] My 
questions are: 1. What is the lat/long of the starting position on High Street 
i.e how to convert "4" to lat/long.     I think this has to do with via indices 
and via points in the link you mention, but that seems a bit murky (at least to 
me). Any clarification would help a lot.    What is the difference between 
via_indices and via_points. Is there a via_point for each point in the route 
instruction? Can I just use one or the other? 2. After say 5 seconds of travel 
on High Street, what would be the lat/long of the new position. ThanksSriram  
From: Carsten Malchow <[email protected]>
To: [email protected]
Sent: Wednesday, December 3, 2014 10:43 AM
Subject: Re: [OSRM-talk] Plotting position in time using OSRM Hi Sriram to 
reply a part of your question:take a look at this documentacion [1]The first 
number is driving directions.The geomerty is a compressed tring that you have 
to decompress.also discripted in the Link below. Kind regards Carsten [1] 
https://github.com/Project-OSRM/osrm-backend/wiki/Output-jsonGesendet: 
Mittwoch, 03. Dezember 2014 um 09:58 Uhr
Von: "S R" <[email protected]>
An: "[email protected]" <[email protected]>
Betreff: [OSRM-talk] Plotting position in time using OSRM
 I would like to create a simple simulation of  a trip using OSRM. I believe 
the steps would be as follows (my questions are in parenthesis below) a. Load 
OSM map of a city into OSRMb. Choose a random begin, end location that falls 
within the city lat/long (how to find lat/long limits of the loaded map?)c. 
Compute the distance (in time) between start, end using OSRMd. Also compute a 
path between start, end using OSRM (are the node vertices mentioned in route 
the same as in the OSM map?)e. The difficult part:    -- start the simulation 
by displaying the map along with position marker (Leaflet?)    -- As time 
progresses, determine the location along the OSRM route computed above (how can 
this be done?)       and adjust the position marker.   An OSRM route looks like 
this:"route_instructions": [
        [
            "10",    <-------------------- what is this id and how to convert 
it to lat/long
            "Schulstraße",
            126,
            0,
            18,
            "126m",
            "SE",
            116
        ],
        [
            "7",     <----------------  how to find elapsed time to this point 
from previous one
            "Am Rahmtor",
            57,
            2,
            11,
            "57m",
            "NE",
            38
        ]

Given a start and end lat/long, a network distance (time) can be obtained as 
follows:
"distance_table": [
        [
            0,
            26084
        ],
        [
            26084,
            0
        ]

This would be useful if the route way-points above could be converted into time 
units.
Would appreciate any help with the above 
questions,Sriram_______________________________________________ OSRM-talk 
mailing list [email protected] 
https://lists.openstreetmap.org/listinfo/osrm-talk 
_______________________________________________
OSRM-talk mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/osrm-talk
 _______________________________________________ OSRM-talk mailing list 
[email protected] https://lists.openstreetmap.org/listinfo/osrm-talk 
_______________________________________________
OSRM-talk mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/osrm-talk
 _______________________________________________ OSRM-talk mailing list 
[email protected] https://lists.openstreetmap.org/listinfo/osrm-talk
_______________________________________________
OSRM-talk mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/osrm-talk


  
_______________________________________________
OSRM-talk mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/osrm-talk

Reply via email to