How do you send directions gradually not all at the same time by using UDP?

I have a problem sir, now I am using UDP to send all directions from this application to Raspberry pi but all directions send at the same time not each current location for the user when he move in the route to give him the direction gradually, How can I solve this problem to send the direction gradually not all in same time??

What you want to do is not very clear. Depending on what you actually expect to do, this advice might help.

If you are using the Navigate control, the following might be a solution:

(How do I achieve turn by turn navigation on AI? - #11 by ewpatton)

Here's an example project that you could build from. When the location sensor gets a new location it compares it to the end point of the current segment. If the location is within 20 meters it will move to the next step. Things like "rerouting" if someone takes different directions than what is provided by the server are not implemented. Another thing you'd want to consider is handling if the location sensor doesn't give a value for a while, causing a skip of a step.

NavigationTest.aia (5.6 KB)



Yes sir, I mean that but in your application, you made it. to send only the current location or next step for the route you indicate from my current location to the destination point. like if I want to go from Newyork city to Mexico, what is the next step you have to take? right and when you finish it the direction tell you to take left until you go to your destination point. I want to send the next step not all these directions to raspberry pi from the UDPXmitter1 communication link, and thanks sir for your reply.

here is my edit in your simple project:
SimpleNavigateDirections_1.aia (75.6 KB)

Youl have to figure this out. Adapt the code in NavigationTest aia and use it in conjunction with Ullis Roboter Seite/AI2 UDP to do what you want it to do.

I do not have that extension or a raspberry; sorry I cannot test. You probably have to provide only the first step in the json returned that shows the entire route. See Evan's example, then ask for a route again. How? It depends on exactly what you want to do.