APM:Plane: "spiral" autolanding (loitering) like the "senseFly eBee"

1,329 views
Skip to first unread message

Marco Robustini

unread,
Oct 21, 2015, 8:10:05 AM10/21/15
to drones-discuss
Today i made many attempts to autoland my FX61 as the "senseFly eBee"making a continues spiral (in Loiter) until a few meters above the ground, then force a LAND waypoint.
Unfortunately with the current Mavlink commands and with the parameters of "APM:Plane V3.4.0" i think it's impossible at the moment.
I played a lot with all the parameters of "LOITER_TO_ALT" but I could not bring down slowly my FX61, too fast (from 70 to 10 meters in a few seconds).
This feature I was asked several times to land small fixed-wing aircraft in a little space.
I therefore ask to insert in one of the existing "LOITER waypoint" commands (like ""LOITER_TO_ALT") the following parameters in the "mission planning" (Mission Planner):

RADIUS (only for this function (not based to the LOITER Radius, if i want to going down with a different radius)
METERS PER SECOND (vertical descent speed, in meters)
ALT (the final altitude)

When the plane
it reaches the level declared in "Alt" parameter go to the next waypoint (in my case LAND).
Example (in the Planner, Flight Plane section):

Command                Radius           M/S        Alt

LOITER_TO_ALT         20                2            2


If my FX61 is 70 meters high in this way will perform a Loiter losing height about "2 m/s" (not too fast like now), and once arrived at 2 meters will run the next waypoint.
This feature would be very useful also in other cases.

My $0.02...


Marco

Chris Anderson

unread,
Oct 21, 2015, 10:19:56 AM10/21/15
to drones-discuss
+1 on Marco's suggestion. 

-c

--
You received this message because you are subscribed to the Google Groups "drones-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to drones-discus...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
    CEO 
    3D Robotics
    website | twitter | facebook | instagram



Marco Robustini

unread,
Oct 21, 2015, 11:23:47 AM10/21/15
to drones-discuss
I'm sorry, missing one important parameter, the initial altitude, so:

Command                Radius           M/S        AltF     Alt

LOITER_TO_ALT         20                2            2         70

"Alt" is the initial altitude (as now), "AltF" is the final one.

Marco

Tom Pittenger

unread,
Oct 21, 2015, 2:44:48 PM10/21/15
to drones-discuss
Don't forget that LOITER_TO_ALT has a heading option to help in landings. Have you tried that yet?

>>but I could not bring down slowly my FX61, too fast (from 70 to 10 meters in a few seconds)
This is controlled by TECS_SINK_MAX which defaults to 5 m/s. So, (70-10)/5 = 12s. If your airspeed is going up then you need to lower this param until you can descent without gaining airspeed.

Couple things here:
- radius of 20 is not obtainable on many aircraft at cruise speed. What we really needs is a decreasing radius.
- the sink rate option is currently TECS_SINK_MAX which, when tuned correctly, is the max sink that won't raise your airspeed. Sound slike you need to lower that. In your example you are suggesting the value of 2 go in there. That renders this field useless unless you're trying to intentionally go slower than which is not a bad idea.
- AltF is the current normal LOITER_TO_ALT altitude field. An initial altitude is achieved by simply placing a normal waypoint above the loiter point at 70 in this case.


So, with current code features you can in fact do exactly what you're wanting to do. I do like the idea to limit sink rate temporarily but that is something we could make a param for.


However, right now the rangefinder in Plane is only utilizing the height during a land approach so circling down to 2m will quite possibly drive you into he ground with normal baro drift. The rangefinder will need to be extended to all mission stages or at least hacked in for this one mission item (not preferred). 

I am already experimenting doing this same thing now with a Loiter Turns by using a normal waypoint at startAlt above the loiter then a loiter_time point below it at altEnd with the time in seconds set to (altStart - altEnd) / TECS_SINK_MAX which allows me to come out of the turn exactly on-time every time. Not to mention the LOITER_TO_ALT heading lock which is a huge help for landing.

-TomP

--

Marco Robustini

unread,
Oct 22, 2015, 3:29:08 AM10/22/15
to drones-discuss
Hi Tom, thanks for joining this discussion:


Don't forget that LOITER_TO_ALT has a heading option to help in landings. Have you tried that yet?
 
Yes, I tried it and it works very well, of course at the time I limited myself to test it with security heights, without actually landing.


>>but I could not bring down slowly my FX61, too fast (from 70 to 10 meters in a few seconds)
This is controlled by TECS_SINK_MAX which defaults to 5 m/s. So, (70-10)/5 = 12s. If your airspeed is going up then you need to lower this param until you can descent without gaining airspeed.


I know this parameter but this would be to act even in normal navigation, It would be preferable to have a something just for the approach that I have outlined.
 

Couple things here:
- radius of 20 is not obtainable on many aircraft at cruise speed. What we really needs is a decreasing radius.


With my FX79 and with my thumbs I can perform the maneuver manually I described staying in a virtual cylinder of 30 meters in diameter, making it land in this space.
If i can i'm sure that the software we can succeed, and certainly better than i do.
Obviously my request is applicable only to small aircraft like eBee, and we know that the future is going in this direction.

- the sink rate option is currently TECS_SINK_MAX which, when tuned correctly, is the max sink that won't raise your airspeed. Sound slike you need to lower that. In your example you are suggesting the value of 2 go in there. That renders this field useless unless you're trying to intentionally go slower than which is not a bad idea.
- AltF is the current normal LOITER_TO_ALT altitude field. An initial altitude is achieved by simply placing a normal waypoint above the loiter point at 70 in this case.


Yeah, in fact i've always done so, I put a waypoint exactly the same place where I then entered the LOITER_TO_ALT event.
 

So, with current code features you can in fact do exactly what you're wanting to do. I do like the idea to limit sink rate temporarily but that is something we could make a param for.


However, right now the rangefinder in Plane is only utilizing the height during a land approach so circling down to 2m will quite possibly drive you into he ground with normal baro drift. The rangefinder will need to be extended to all mission stages or at least hacked in for this one mission item (not preferred). 

I am already experimenting doing this same thing now with a Loiter Turns by using a normal waypoint at startAlt above the loiter then a loiter_time point below it at altEnd with the time in seconds set to (altStart - altEnd) / TECS_SINK_MAX which allows me to come out of the turn exactly on-time every time. Not to mention the LOITER_TO_ALT heading lock which is a huge help for landing.

-TomP


I believe that it would take something more simple and immediate.
We know how to do these things, but the normal user no, what has already difficult even to plan a simple mission.
It needs a simple option like the one I described, it needs a simple option like the one I described, with few parameters.
My two cents...

-Marco

Tom Pittenger

unread,
Oct 22, 2015, 5:58:46 AM10/22/15
to drones-discuss

I think a loiter sink rate param is probably the way to go.

LOIT_SINK_MAX?

I can also investigate adding a sink rate as a mission item field. Would this apply to all loiter commands? Seems like it would be appropriate. Can you write up an issue?

john...@gmail.com

unread,
Oct 22, 2015, 8:16:18 AM10/22/15
to drones-discuss
Love the idea, it's a common landing 'technique' when flying manual R/C in less then ideal locations.
But there are some practical implications to consider. This type of approach would be a fly trap for stalls if the plane is less then optimally tuned and or overweight.

iskess

unread,
Oct 22, 2015, 2:33:31 PM10/22/15
to drones-discuss
I vote for a mission command parameter for loiter sink rather than a global parameter. This is a specific use case and I don't want it to affect other loiter situations. Unless we used a parameter like LAND_LOIT_SINK or something specific to a an approach.

Tom Pittenger

unread,
Oct 22, 2015, 2:46:18 PM10/22/15
to drones-discuss
 LAND_LOIT_SINK would imply it is only used during landing which is not during a loiter. It would have to effect all loiters or just the mission item.

Sounds like a mission command param is the way to go.

On Thu, Oct 22, 2015 at 11:33 AM, iskess <isk...@hotmail.com> wrote:
I vote for a mission command parameter for loiter sink rather than a global parameter. This is a specific use case and I don't want it to affect other loiter situations. Unless we used a parameter like LAND_LOIT_SINK or something specific to a an approach.

Tom Pittenger

unread,
Oct 22, 2015, 2:52:21 PM10/22/15
to drones-discuss

Jason Franciosa

unread,
Oct 22, 2015, 9:13:05 PM10/22/15
to drones-discuss
Why not a "Loiter_TO_LAND" parameter and you can set the altitude of when the loiter stops which then enters the normal land parameters? Doing a loiter to altitude to 2 meters seems risky and complicated as when it reaches this it may not be in the proper direction. 

With a Loiter to land you could have it circle at that height until it is lined up properly with the final landing stage and then the plane will level off and do a proper landing.

Radius, M/S, and Alt will still remain, however, Alt is the altitude when it switches to the land parameter and you would need to add a parameter for direction to land in and integrate it with the GCS so it is easy to chose that direction.

Jason

Tom Pittenger

unread,
Oct 23, 2015, 12:05:02 AM10/23/15
to drones-discuss

I think we need to update the landing wiki, I've already mentioned this a few times in this thread but I'll say it again.

Thanks to Michael Day, the loiter to alt command not only has an altitude criteria, but also an optional heading criteria it must meet before it completes the loiter.

So, with that single command you can set the loiter radius, turn direction, exit heading and exit altitude. If you were to place a normal waypoint above it then a helical loiter with predictable exit location is possible. The problem is the lidar is not active so exiting at 2m, or even 10m, may mean driving into the ground.

Also, the landing slope will not take into account the radius so that will need fixing as well.

--

Tom Pittenger

unread,
Oct 23, 2015, 12:11:56 AM10/23/15
to drones-discuss

I don't want to come off sounding like I'm not in favor of this. I'm really excited about it. Just want to make sure we know what we already have and want we need to do to make this work well.

Iam Bouret

unread,
Oct 23, 2015, 1:39:51 AM10/23/15
to drones-...@googlegroups.com
Tom,
I've never tried this, but I'm eager to. I'm not clear on the last sentence, "Also, the landing slope will not take into account the radius".
If I use a Loiter to Altitude command, down to say 15m, then place a final WP at 15m just after the loiter, then a Land command WP downfield, the final glide slope should be defined for the last segment and the landing should proceed normally after the loiter breakout on heading? 
I take it that you are saying that without the final WP, the loiter won't put the plane in the approach phase logic. 

BTW. I have now tested the landing abort logic extensively and it is fantastic! Thank you for all your hard work in making this happen, and being so open to community input.   

Iam


You received this message because you are subscribed to a topic in the Google Groups "drones-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/drones-discuss/Q5_MivrAzBY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to drones-discus...@googlegroups.com.

Randy Mackay

unread,
Oct 23, 2015, 1:51:24 AM10/23/15
to drones-...@googlegroups.com

 

     Slightly off topic but while people are doing these kinds of thing, it would be great to get some more videos.  We have loads of copter videos, (Marco, me) but we don’t see to many for Plane. .. maybe education to show others how to do it or maybe just for our viewing pleasure.

 

-Randy

Marco Robustini

unread,
Oct 23, 2015, 2:51:27 AM10/23/15
to drones-discuss
I agree with Randy.
For this reason i will make a video of APM:Plane carrying out a complete photogrammetry over my airfield, with triple visual (FPV, Planner and the photos taken, syncronized with the rest), automatic take-off and landing, but i would have liked to do it just by using this kind of "helical landing".

Marco

Tom Pittenger

unread,
Oct 23, 2015, 4:13:43 AM10/23/15
to drones-discuss

Iam,

Thanks for checking the abort code, glad it's working out for you. I have grand ideas for it with auto go-around in the future, stay tuned.
Meanwhile, what I was saying about the slope not lining up was considering a mission where the land was directly after the loiter. The glide slope would be calculated from the loiter center. If you put a waypoint at the point where the exit heading is then you can skip that. I would consider generating that waypoint in flight instead of being preplanned. It's in a very predictable location and easy to calculate its location pragmatically.

Randy and Marco,
Videos sound good. Problem with plane is that they are so far away! A video would be nice showing some sample mission planning with auto take off, cruise, and land. Wouldnt hurt to demo the aborted landings, nice safety feature new to v3.4.

The helical turns can be done now in v3.4 but to do it well you would have to set TECS_SINK_MAX to <=3. It would prove the concept.

Try this:
Waypoint alt 100 (above loiter ).
Loiter to alt, alt 20, exit heading to match approach, center of loiter point is offset from runway by its radius, turn direction to allow correct exit heading.
Waypoint alt 20, at radius edge to create tangent approach path.
Land alt 0 slope <=10deg

Keeyen Pang

unread,
Oct 23, 2015, 5:08:31 AM10/23/15
to drones-discuss
I fly FX 61 quite a lot and it is very stall resistance with a 200 gram payload and Multistar 5200 3S battery on board. I've done " semi auto " landing by :

1. Set a way point at the place where you want the approach to begin, take into consideration of the loiter radius. 
2. Set that way point as " Loiter unlimited " and a altitude that I prefer, say 100 meter
3. Use " Change Altitude " at the flight data command window to lower the altitude gradually, say from 100 meter, then 50 meter, then 30 meter, then 20 meter, then 15 meter until you think it is a suitable approach altitude. We can visually judge the altitude so barometer drift is not a problem.
4. Once you settle in the final approach altitude, now just wait for the right timing ( exit direction ) to switch from auto to FBWA with the throttle set at idle. The plane should come in and settle down nicely. You can flare at the last moment. 

I think it may be useful to let the user control the descend altitude with a spring load switch, switch H in case of Futaba radio. With the switch on, the plane will loiter and descending with a preset rate and once switch off it will stop descend and loiter normally. Once the ideal altitude is reach, the plane will loiter for may be 2 more rounds and if no further descend command ( switch H ) received, then autopilot will execute the exit and land command. 

Tom Pittenger

unread,
Oct 23, 2015, 11:08:39 AM10/23/15
to drones-discuss

Thanks Keenyen, sounds like you have manual landings tuned pretty good! Have you tried a fully auto landing yet?

Keeyen Pang

unread,
Oct 23, 2015, 8:15:26 PM10/23/15
to drones-discuss
Hi Tom, yes, I do try full auto land with 3.3. My experience is if the drone use air speed sensor, the landing glide path and final touch down point is quite accurate. without air speed sensor, it will be good with some head wind but will overshoot quite far in low  or no wind condition. I do not use auto land for real mission flying because of the barometer drift issue. To me, using lidar is not an ideal option because first and foremost, it is still expensive and it only serve one purpose, not to mention the weight gain. I think it should not too difficult to upload the difference of temperature change ( temperature reading can easily obtain from hand phone apps ) to the autopilot during the final stage of landing or it reach RTL point. If this is not possible, then we may able to use two stage Loiter to ALT, First stage as per normal but only descent to say 50 meter, The next stage will be control by user with a pre set descent rate via a spring load switch, or switch H for Futaba. Once the desire altitude is reach, user simply release the switch and the autopilot will exit the loiter and perform the final approach, flare and land as usual. 
BTW, I only use auto tune level 7 to tune my FX 61 with some minor adjustment after the autotune. TECS is default. 

Tom Pittenger

unread,
Oct 23, 2015, 8:34:40 PM10/23/15
to drones-discuss

Hi Keeyen,

Baro is always temperature compensated but the drift is mainly from atmospheric pressure change. Lidar is the only real solution for good auto landing. Lidar lite is ~$100, I suggest you give it a try.

This thread is addressing a spiral descent leading to a full auto landing, not semi auto. Let's try to get it back on topic. Do you have any comments about full auto landing with a spiral?

Marco Robustini

unread,
Oct 24, 2015, 3:53:26 AM10/24/15
to drones-discuss
Here my "full autotakeoff and autolanding" with my FX79, you can evaluate the precision and low speed.
No LIDAR, just a good tuning and M8N gps:

https://www.youtube.com/watch?v=72YSINJ20t0


Marco

On Wednesday, October 21, 2015 at 2:10:05 PM UTC+2, Marco Robustini wrote:

Tom Pittenger

unread,
Oct 24, 2015, 4:09:35 AM10/24/15
to drones-discuss

Thanks for the video. If you fly for an hour you will find that the landing is not so smooth, the baro drift will ruin it.

--

Marco Robustini

unread,
Oct 25, 2015, 4:40:01 AM10/25/15
to drones-discuss
I know, here a complete mission, with a good autolanding:

https://www.youtube.com/watch?v=Vu-O6rBa1aQ

Marco

Marco Robustini

unread,
Oct 26, 2015, 2:06:08 PM10/26/15
to drones-discuss
Today i did some "automatic helical landing" tests using "LOITER_TO_ALT" set to "0", but i believe that this waypoint has problems on entering the desired values in the Planner.
If you set any radius value, such as "30" and writing the mission, when you read the value goes to "1".
Another: the heading, any value i try to write when read the misison this value go to "1".
Or the wiki is wrong, or there's some bug in the Planner... ;-)
Anyway playing a lot with "LOITER_TO_ALT", "TECS_SINK" and LOITER_RADIUS (30 meters here) after several attempts i managed to do a "perfect" automatic helical landing, here my video: https://youtu.be/IGoST0A18M0
I also documented a full manual helical landing, to show how the code it should do it automatically, respecting the heading of the landing track.
Dunno why during "LOITER_TO_ALT" approach sometime changes
randomly the rotation direction (CW/CCW), see my video... another issue?
Please check the "LOITER_TO_ALT" parameter value in the Planner, imho there's some issue with "param1" and "param2" when write and then read the mission from the flight control.
From the wiki:

LOITER_TO_ALT
This command enables auto-tuning on Plane.

Command parameters

Command Field Mission Planner Field Description
param1 Heading Heading Required (0 = False)
param2 Radius Radius in meters. If positive loiter clockwise, negative counter-clockwise, 0 means no change to standard loiter.
param3
Empty
param4
Empty
param5 Lat Latitude.
param6 Long Longitude
param7 Alt Altitude


We need to make them do all automatically, and with a simple dedicated waypoint.
"APM:Plane" must be able to do it better than me in manual... :p

-Marco


On Wednesday, October 21, 2015 at 2:10:05 PM UTC+2, Marco Robustini wrote:

Randy Mackay

unread,
Oct 26, 2015, 11:43:16 PM10/26/15
to drones-...@googlegroups.com

Great video Marco!

 

-Randy

--

john...@gmail.com

unread,
Oct 27, 2015, 8:08:40 AM10/27/15
to drones-discuss
Good example.

Also next time if your camera man use manual focus set at infinity, your videos will not have problems with auto focus hunting.

Marco Robustini

unread,
Oct 27, 2015, 9:28:55 AM10/27/15
to drones-discuss
I know John, old little compact camera without manual focus, damn! :p

Marco

Keeyen Pang

unread,
Dec 1, 2015, 9:10:48 AM12/1/15
to drones-discuss
I think it is important to set the exit heading, this is the bearing the plane should reach while in loiter mode before going to the next way point, i.e Land. Without a specific heading, the auto pilot will exit the loiter once it reach the require altitude and most likely not the heading we want. Or even better it can be program to automatically draw a tangent to the Land command way point. If this is done, the next issue is baro drift, let see if we have any idea to counter it without using Lidar. 

Tom Pittenger

unread,
Dec 1, 2015, 10:12:10 AM12/1/15
to drones-discuss

That is already implemented in loiter to alt command.

--

Tom Pittenger

unread,
Dec 1, 2015, 12:49:27 PM12/1/15
to drones-discuss
See MAV_CMD_NAV_LOITER_TO_ALT

The only problem with it is once you've spiraled down to "the bottom", it keeps circling until the desired heading - as intended. That means you're no longer dropping altitude and thus will kick in the motor and such while you circle around on the altitude plane.  Would would be really nice is if that could be a controlled descent:

If heading lock is enabled, while loitering from up high we should drop at our fastest rate per TECS_SINK_MAX but then when we get close to the altitude (or start our final circle) then we clamp the sink rate to match the timing so that we would hit the target alt and heading at the same time. That would allow a landing from up high without ever turning the motor on. THAT would be a lovely improvement.

Keeyen Pang

unread,
Dec 7, 2015, 8:32:02 PM12/7/15
to drones-discuss
Now may be only one extra function needed to make the spiral landing perfect, that is the ability to perform 2 stage decent. ( Arducopter has been doing this for long time ) The first stage can decent like normal, once it reach an altitude, say 30 meter, it will enter the second stage descent with the assignable descent rate, may be 1 meter per second to the targeted altitude. It will also be good if we can use a spring switch to terminate the descenting and the auto pilot will go to next way point with the desire heading. This can prevent the plane to descent too low because of baro drift. 
Reply all
Reply to author
Forward
0 new messages