Hello, i want to know how to generate a line between 2 waypoints ??
i want to do an algorithm that the robot or aircraft folow this line
Thanks ![]()
Usually, people calculate the heading angle (also bearing or azimuth) with respect to true North from one waypoint to the next, and use a compass to follow it.
Calculate heading from latitude, longitude pairs using the great circle or equirectangular approximation, as described here.
Thanks i have alson the standar formula, but me i want to do other algorithme i want to folow a line not a waypoint.
jone31:
Thanks i have alson the standar formula, but me i want to do other algorithme i want to folow a line not a waypoint.
A line between two points x1,y1 and x2,x2 is elementary linear algebra.
Unless he wants a great circle route. 8^)
Yes a route, i do simulation on MATLAB/SIMULINK i did algorithm that take the aircraft to the desired waypoint, but it's not good, i want to do an algorithm like on real board aircraft a route follow algorithm not just a waypoint.
![]()
i want to do an algorithm like on real board aircraft
And what do you think that is?
the problem of folowing just a waypoint is that you go to the waypoint without undefined heading when you ritch this waypoint.
look the pic you will understand
jone31:
look the pic you will understand
No. I only see two paths. One straight and one curved. How can I make any sense of that?
The curved one is my algorithm and the straight is what i want to do
jone31:
The curved one is my algorithm and the straight is what i want to do
Please post your algorithm.
i can't its a simulink bloc diagram and it's my theses i can't for the moment after i will post the doc
jone31:
i can't its a simulink bloc diagram and it's my theses i can't for the moment after i will post the doc
Then you will have to explain yourself better.
Really, all you have to do is calculate the slope, convert to angular values. That gives you the correct initial heading. After that, you just rinse and repeat. Because with GPS you always have the current coordinates and you (presumably) have the target coordinates.
What is so hard about that?
Also, what does this have to do with Arduino?
Could you explain more please i didn't understand you
Could you explain more please i didn't understand you
You are the one who needs to explain -- we don't understand what you want to do.
If I want to go from 50.000000N, 100.000000W to 50.006389N, 99.840000W, I travel 1.000 km at 45.00 degrees with respect to due North. Here is the map (I might have trouble with some farmer).
One issue that often gets overlooked when working with routes and waypoints is actually 2 parts -- First, how do you know you are at the waypoint? Usually you need some sort of guard circle around the waypoint - say 100 meters so that if you get within that circle, you have "reached" the waypoint (try hitting an exact point in the sky at 200kts in an airplane :o ) The second part of that needs to address the case where the user decides they are close enough and move on to the next waypoint in the route. I used to have that issue with my Loran in the boat - you could create a route, but there was no way to skip a waypoint, so if you were in clear air and could see where you wanted to go next, until you went all the way out to the waypoint, you could not get the Loran to switch to the next one (the users manual said it could be done, but no instructions and the factory rep I talked to agreed that it should and he would get back to me ... never to be heard from again >:( )
try hitting an exact point in the sky at 200kts in an airplane
Try proving I didn't. 8)
Hi i think you didn't understand my question. i did an alogorithm that take the aircraft to a desired waypoint and i calculate the distance between the aircraft and the waypoint on a real time and when the aircraft will be close to the waypoint it swith the next waypoint. the problem it's not here.
me i want to reach the desired waypoint with a desired heading angle.
my algorithm do just tak the aircraft to the desired waypoint for exempl if the heading of the aircraft is 140 it will reach the waypoint on the heading 90
but me i want t o generate a line that the aircraft follow and rich the waypoint with a desired heading for example if my aircraft has a 140 degres i want to reach the waypoint with a 100 degree for example.
see the picture you will understand.
but me i want t o generate a line that the aircraft follow
You have been told how to do that.
yes i wat for answers, i don't know what i use like sensors and what use like actuators to make a pid. for the aircraft to follow the line generated by multiple waypoints
