PDA

View Full Version : Discussion How smart are the autopilots?


skogsvargen
Jul 26, 2007, 03:37 AM
I am slowly moving ahed with my autopilot...

Read and parse NMEa from GPS OK
Store waypoints in eeprom OK
Calculate distance and heading to WP OK
Control servo (will be used to tilt the FMS CoPilot) OK
Send navigation data to base station OK

Next thing to do is decide how i am going to make the plane hit the waypoints as accurate as possible.

The simplest way is off course to steer towards next waypoint (WP) and when the distance to the WP is short enough i continue to next WP. This approach wil probably work in calm conditions.


Waypoint pass criterias
In my old boat-GPS i could select a number of "Waypoint pass criterias" for each waypoint in my route. In addition to WP proximity i could select to continue to next WP when I passed a line drawn at different angles through the waypoint it continued to next WP. See attached image. This way i should be able to avoid that the plane circles the WP without getting close enough to pass it.

Navigation to waypoint
The approach i am thinking of is trying to minimize cross track error (XTE). Steer towards the line between previous and next WP. When the distance to the WP is less then X i will steer towards the WP instead.


What methods are used in the autopilots you are using and how well does they perform?

/Magnus

toxicmouse
Jul 26, 2007, 08:09 PM
i don't fully understand the part with the lines.

i am making my own autopilot, i hope that i can answer your question effectively.

my code makes the UAV point directly at the waypoint until it comes to within x metres, at which point it assumes that it has reached that point and aims for the next waypoint. i think that this is the same as yours. turns are done as a series of blind actions, so after testing i will know what the turn rate is. if the UAV is too close to be able to turn into the waypoint successfully it will move in a straight line until the distance to the waypoint is great enough that it is able to reach the waypoint in a turn (which will mean a U turn). simulations show that this should work but for the proof... we will have to be patient.

to allow for winds, when i say the UAV points towards the waypoint, it does not mean that the UAV physically points there. i find the UAV bearing, and thus the way it points, from calculations of GPS coordinates while the UAV has the rudder in the straight flight position.

also i intend to have waypoints greater than 200m apart, for which i think the code will work. if the waypoints were a lot closer together, say 20m, then this code will not work efficiently if at all.

i hope that this helps.

skogsvargen
Jul 27, 2007, 08:12 AM
Hm, My pictures are a bit unclear.

The green dot is current waypoint.
The gray dots represent previous and next waipoint
The red lines are the waypoint pass criterias. When the plane crosses that line it continues to the next WP.

/Magnus

Bulma
Jul 27, 2007, 08:55 AM
I am thinking of using something like this, once my autopilot reach that phase of development ;)
1. Connect waypoints with lines, you can also use some more complex curve like spline or whatever you like.
2. Find closest point on the line, but farther than some predefined distance, like 20m.
3. Point plane to that point
4. Go to step 2

As plane will move, so will the point on line, so plane will actually continuously track the line. Also, it will never reach the waypoint, but will have nice, slow turns (depends on your predefined distance and plane speed). I think you`ll also have to remember last reached point, because you could easily end up going backwards.

toxicmouse
Jul 27, 2007, 04:57 PM
Bulma, what are you using for processing?

vespa
Jul 28, 2007, 09:54 PM
The approach we use is to count the waypoint
if:
We are close, AND the distance to the waypoint is increasing (meaning we have passed it)
or: we have entered 3 of the N/S/E/W quadrants radiating outward from the waypoint since leaving the last waypoint

Bulma
Jul 30, 2007, 04:37 AM
Bulma, what are you using for processing?

LPC-2378 (ARM7). However, I`ll probably need some more processing power, so I am thinking of adding additional CPU, something with FPU, around 1GHz, but I am still looking for cheap SBCs, if there is any. So in the end, I`ll probably end up with microATX :rolleyes: