Repository navigation
Conversation
Three settings, all off at 0 so nothing changes for existing setups: nav_fw_land_downwind_offset puts the wind circle abeam the landing site and the downwind leg parallel to the runway at that distance, on the side given by the approach direction seen from approach heading 1 whatever the landing direction (the free side); the base turn is abeam the start of the final, which begins a turn radius before the approach length so the straight final is as long as configured. The downwind and base legs descend linearly from the approach altitude to nav_fw_land_final_alt. nav_fw_land_loiter_radius is the radius of the wind circle instead of nav_fw_loiter_radius.
…, at the slope of the final
…nd leg, turn space from the planned radius
… and the landing site, downwind on the circle's tangent
…the downwind heading
…s the corner cut plans it
…le, not to the runway
…; nav_fw_land_aim_offset puts the glide path short of the site
… is really flown at
…lown, and turns onto the final as wide
… its edge with the radius flown and descends on a fixed path - The RTH re-aimed at the circuit target on every centimetre it moved, so the missed-waypoint check never fired and the RTH's own 75 m loiter circled the joining point for half a minute; the landing now takes over where the wind circle's approach starts (3.7 radii) and the RTH loiter is off while flying there. - The circle centre used the radius planned when the landing started, while the loiter controller ratchets its radius with the speed (41 m planned, 56 m held after the descent to the circle): the centre now follows the held radius plus the per-turn excess really flown, and is frozen when the circle is left. - Downwind, base and final followed INAV's per-leg interpolation from the height each leg started at, so a high base put the final 6 m high and steep; the circuit now has one descent path by the distance still to fly: circle altitude to the final altitude over the legs, final altitude to the ground at the aim point over the straight final.
…rudder after the throttle cut In glide and flare the heading was held only through the bank, which does nothing on the wheels; a gentle rudder heading hold (2 s time constant, 8 deg/s at most) keeps the touchdown and the roll-out on the runway heading.
…reached slowly Following the radius the loiter controller holds moved the circle with every speed change and with the energy guard's bank: in HITL the guard cut the bank to about 15 degrees in a steep turn below the target altitude, the held radius jumped from 59 to 205 m, the circle centre with it, and the aircraft crossed the runway and flew a 200 m circle. The radius is now frozen when the landing starts and the controller holds exactly it; a circle flown wider still grows to the radius flown after each full turn. The circle altitude is reached at 0.5 m/s, so the descent from the RTH altitude no longer builds 3 m/s of extra speed on the circle.
A negative yaw command turns right, as the heading PID's output; the roll-out hold had the sign reversed and in HITL turned the aircraft 17 degrees off the runway heading after the touchdown.
…ove the flare pitch A flare at a fixed pitch keeps that pitch whatever the speed: the aircraft sinks faster as it slows down at idle, and one that balloons keeps climbing. With nav_fw_land_flare_sink set, the altitude controller flies the flare at that sink rate, which raises the nose as the aircraft slows down and gives less nose up when it balloons, and the flare pitch is the lowest pitch it commands. 0 (default) keeps the pitch flare. The setting is appended to the group with a zero default, so no version bump.
The steady arc law took 0.3 degree of bank off per degree of heading error to the circle's tangent: linearised on a 50 m circle at 17-20 m/s that is a damping of about 0.2. In HITL an aircraft captured 33 degrees inside the tangent kept banking into the circle, crossed it and swung 12 m past its far edge. The loiter circle now uses 1.0 (about 0.75); the waypoint turn arcs keep 0.3.
…lare After the throttle cut the pitch I-term still holds the trim of the powered, faster approach, and the I-term lock keeps it there while the large attitude change of the flare is commanded. In HITL the flare was commanded at 8 degrees nose up, the nose reached 1.4 and dropped to -7 as the aircraft slowed down, onto the nose wheel. Raising the commanded pitch instead (up to nav_fw_climb_angle) was too weak there and would make an aircraft that tracks its pitch well climb steeply near the ground. With a rangefinder, the glide and flare now move the pitch I-term on the attitude error, 10 units/s per degree within pid_iterm_limit_percent, until the nose holds the set pitch; the commanded pitch stays the set one.
…e wind circle's radius The fixed-wing altitude controller asks a climb rate proportional to the altitude error, so on the circuit's sloped path it trailed by 100 / nav_fw_alt_control_response seconds: in HITL 2.6 m above the path at the end of the base leg, then diving into the turn onto the final. The altitude target now leads along the path by that time, whatever the aircraft. The legs before the final descend with the distance flown since the circle instead of the distance still to go, which jumped by twice the corner cut when the aircraft switched leg 35 m inside the base (a 2.9 m step down of the target in the turn onto the final); they reach the final altitude a little before the straight final, so that turn is about level. The turns were also flown at the full bank (42 degrees at 17 m/s) although the circuit placed them for the wind circle's radius (29 degrees): they are now flown at that radius.
…t turns towards the runway The downwind leg was the circle's tangent the aircraft came out on heading downwind: on the far side when the circle turns away from the runway, on the near side, the offset from the runway, when it turns towards it. That depends on the landing direction the wind chooses after the circle: with the circle on the runway's free side, right turns land well one way and put the downwind 10 m from the runway the other way, a base of 10 m for two turns of the circle's radius. The downwind is now always the far tangent; when the circle turns towards the runway it is left heading straight out on the side of the final, and the aircraft turns out to the downwind before the base and final turns.
… a circle left heading out Flown in HITL, the aircraft leaving the circle heading out went straight for the turn point at the end of the downwind: its corner cut, 113 degrees, started 96 m before it on a 152 m leg, so the downwind was skipped, the bank went from 35 degrees right to 62 left at once and the turn onto the final crossed the runway. The circuit now has a corner onto the downwind, straight out of the circle: a 1.5 s straight to roll level, then a 90 degree turn onto the downwind, which lies out by both, and the base and final turns as in the other direction.
…left at Flown in HITL, the aircraft left the circle 2 m above the approach altitude and ballooned to 7 m above the path while rolling level; the altitude controller then dived it into the first turn, 48 degrees of bank and 8 m lost. The legs now descend from the altitude the circle is left at, so the path has no step there.
Flown in HITL, the re-trim from the powered approach trim to the flare took 2.6 s at 10 per degree per second, the whole glide and flare: the nose reached 0.8 degrees of the 4 set and the aircraft touched down level at 0.75 m/s, nose wheel and mains together, and bounced.
… from the wind circle The landing flew at whatever speed the cruise throttle gave, and planned the wind circle at the speed the RTH arrived with: in HITL 20.5 m/s on a circle planned for 18, which needed 39 to 43 degrees of bank. A set approach airspeed is now held with the throttle by the Auto Speed controller from the wind circle to the throttle cut, within its limits, and the circle is planned for it. It needs a valid airspeed (a pitot or the virtual one) and is never held on ground speed, which downwind would fly the aircraft slower than set; at 0 nothing changes.
…the nose as the aircraft slows Flown in HITL, the final ended at 2 m/s and 14.5 m/s, the throttle cut at 2 m and the nose went from -6 to the 4 degrees of the flare pitch in a second and a half. Re-trimmed fast enough to reach it, the fixed flare pitch levelled the aircraft at 1 m at 13 m/s; it floated until 9.8 m/s, the nose dropped and it touched down at 1.16 m/s. Without the fast re-trim the nose never got there and it touched down level at 0.77 m/s. With nav_fw_land_flare_sink set, the circuit's final now rounds out under power where its sink rate equals height / 2.5 s, easing with the height (0.4 m/s at 1 m), and from the throttle cut the altitude controller holds the same sink rate down to the flare sink, raising the nose as the aircraft slows down, up to the flare pitch, which becomes the highest pitch commanded. The pitch I-term is re-trimmed to the pitch asked for.
…d of at once Flown in HITL with the round-out, the aircraft reached the throttle cut at 0.9 m sinking 0.35 m/s; the cut dropped the nose from -1 to -2.7 degrees and it covered the last metre at 0.8 m/s, touching down nose down at 12.2 m/s. The throttle the approach flew with now ramps down to idle over 1.5 s from the cut.
…he flare sink, touchdown at the aim point Flown in HITL, the altitude controller tuned for cruise asked under a degree of nose up for the whole flare and its feed-forward of a sinking target pitched the nose down: the aircraft covered the last metre at 0.55 to 0.7 m/s nose down. The glide and flare now pitch on the flight path angle error (a degree of it is about a degree of pitch on any aircraft, the integral adds the angle of attack the slowing aircraft needs), up to the flare pitch. The approach power is held until the sink rate is down to the flare sink and taken off over the 2.5 s that sink takes to the ground. The round-out and the flare sink carry the touchdown past where the final's line meets the ground; the final is aimed short by that distance, so the wheels touch at the aim point.
…titude over the flare's time, on the rangefinder's sink Flown in HITL with the power held to the flare sink, the wheels touched at the aim point at 0.32 m/s, but at 13.2 m/s with the nose level; the flare read the sink from the baro and GPS estimate, which lagged near the ground, and commanded nose down while the aircraft sank at twice the flare sink. The power now comes off from the glide altitude over the time the flare takes to the ground, and the flare reads the sink rate from the rangefinder when it is trusted.
Flown in HITL at 1 and 1 s the flare commanded 1.5 degrees at most and the aircraft covered the last 40 cm at 0.3 to 0.4 m/s instead of the 0.15 set: 2 degrees of pitch per degree of path error, integral 0.5 s.
… at the aim point Flown in HITL in the other direction, the wheels touched 37 m short of the aim point, before the runway: the final follows the baro and GPS altitude, the flare the rangefinder's, and the ground under the final was not level, so the aircraft reached the glide altitude sinking 0.8 m/s instead of 0.4. From the glide altitude the round-out's time constant is now the one that puts the wheels down at the aim point at the current speed, never shorter than 2.5 s, so a short aircraft floats further at a lower sink and a long one stays soft.
Flown in HITL in the other direction, the soft round-out at 2.5 s took some 100 m from 3.2 m to the ground at 13 m/s, and with the final aimed short by as much it was all flown over the ground before the runway: 3 m high 64 m before the runway end, 15 cm over the threshold. At 1.5 s it is about half as long, at 0.1 g of vertical deceleration from the final's sink.
Flown in HITL with the 1.5 s round-out, 3 and 0.35 s oscillated: the command swung from +1.5 to -5.9 to +4.2 degrees with a 1.4 s period and the wheels touched nose down.
…eads the height The PI on the flight path error trailed the round-out by the second the pitch loop and the flight path take, and at a 1.5 s round-out it swung the nose about it (HITL: level at 0.5 m, then nose down to the ground at 0.6 m/s). The target path angle now goes straight to the pitch, the integral holds only the angle of attack, the target is taken from the height 0.6 s ahead, and the round-out time constant is 2 s.
HITL with the climb rate estimate 0.3 s late: the lead and a 1 s integral levelled the aircraft at 1 m and set it down at 0.37 m/s. A model fitted on the flights puts a 2 s integral without the lead at about 0.2 m/s.
The target sink is height / 2 s plus the flare sink, the classic flare law: it ends at the flare sink on the ground instead of floating down at it from the height of the flare sink, which put the aircraft low over the ground before the runway for about 25 m more.
…no float" This reverts commit 3faff64.
…he height the final crosses it at In place of the touchdown offset of each direction: the final is placed so that it passes over the runway start at that height, on the sink-rate round-out when that is lower, and the wheels touch where the flare ends. The ground before a runway is then crossed high enough and the flare is flown over the runway.
On the circuit's descending legs with flaps the aircraft flew 1-2 m/s above the approach speed with the throttle at nav_fw_min_thr (HITL): the speed controller may now go down to idle there.
…ttle stick low The autoland takes the power down to idle whatever the stick; with the stick low and centred the airmode anti-windup held the pitch I-term at its cruise trim, short of what idle needs: in HITL the attitude stayed 8 degrees below the command on the approach, and the glide, starting from the attitude, dropped the nose 3.5 degrees at 2 m.
…the throttle stick low" This reverts commit a032e7c.
…ror, from any height Down to idle power the T-28 in HITL needed degrees more up elevator; the error that made held the I-term lock and the pitch I-term stayed at its cruise value for the whole approach, 6 to 10 degrees below the command, and the glide, starting from the attitude, dropped the nose. The glide's re-trim now runs on the approach too, and above the runway without a trusted rangefinder height.
…itude error, from any height" This reverts commit de97d8a.
…rliner flare - the sink-rate flare starts where its law asks the sink the aircraft has (ArduPilot LAND_FLARE_SEC, PX4 FW_LND_FL_TIME), flies target sink = (height + bias) / time constant (Sundstrand), blends from the measured sink at its start, and its time constant is the new nav_fw_land_flare_time - the flare's pitch starts from the approach's command, moves no faster than a vertical acceleration allows at the speed, and the bank is limited to 5 degrees near the ground - no I-term lock during the autoland: no stick input, and the trim the power change needs waited for it - the circuit path's climb rate is fed forward to the altitude controller, and below the final's line the aircraft holds its altitude until it meets it (PX4) - half the headwind is added to the approach speed, and the flare's run is planned at the groundspeed left - with a runway start set, a stabilised approach gate: low before it, high, slow or fast at it, the aircraft goes around, climbs straight ahead to 10 m and flies the circuit again, twice at most
… slowing needs HITL: from 12.2 to 9.5 m/s in the flare the angle of attack needed rose about 2 degrees a second, faster than the 2 s integral followed, and the last 0.7 m were flown at 0.5 m/s against 0.2 asked. The lift holding the weight, (angle of attack - zero-lift one, assumed -4 degrees with flaps) grows with the square of the airspeed lost since the flare started, from the angle of attack measured there.
… power HITL: with the approach at idle the flare lost 3 m/s, to 1.1 times the stall, and the last 60 cm were flown nose high at 0.4 m/s with the pitch command at its limit. Under 90 % of the approach speed the power comes back, up to the cruise throttle 2 m/s under it, until the wheels are the flare sink's height off the ground.
…imum throttle HITL: 2 m/s of band to the cruise throttle brought 120 of it back at 0.7 m/s under 90 %, too little and too late: the touchdown came at 8.9 m/s and 0.35 m/s, nose 5.4 degrees up.
… the maximum throttle" This reverts commit b62e84c.
…eed with power" This reverts commit 2ba9c76.
…again The airliner law with a bias asks 0.3 m/s at 0.3 m and reaches the flare sink only on the ground: with the aircraft's half-second lag HITL touched down at 0.35-0.48 m/s, against 0.24-0.26 with the floor. Back to height / time constant down to nav_fw_land_flare_sink, keeping the time trigger, now at time constant x sink, continuous by construction.
…tack its slowing needs" This reverts commit 4c75402.
…acceleration The estimated climb rate trails the true one by 0.2-0.3 s over the flare (HITL, X-Plane truth against the debug on one clock), so the path PI kept pulling while the aircraft had already levelled and then let it drop. A 0.2 s lead from the filtered vertical acceleration cut hard touchdowns by about 40 % over a Monte Carlo of pitch loops, path responses, estimator lags 0.05-0.4 s, noise and gusts, and helps at every lag in it.
On the final before the runway start the rangefinder can read a hedge or raised ground under the approach as the runway: the glide started there and the flare took the power off over the field. The stabilised approach gate keeps its rangefinder check before the runway start: low over whatever is under the aircraft, it goes around.
They held the landing direction alone, so the 2-3 m the turn onto the final left beside the axis stayed to the touchdown and the roll-out drifted further. The course is now the landing direction turned towards the axis through the site by 1.5 deg per metre off it, at most 6 deg, with the bank still limited to 5 deg: about 3 s to the axis.
The rangefinder's climb rate took the back of an obstacle before the runway for a climb: in HITL, a 1.5 m hedge ending 3 m before the runway start read 1.2 m/s of sink as none at the flare entry, the nose stayed down and the aircraft touched at 0.51 m/s and bounced. It also switched source halfway down the flare, where the rangefinder became trusted. The inertial one (accelerometer with baro and GPS), as ArduPilot and PX4 flare on, trailed the truth less in HITL (0.15 against 0.2 s) and without offset; the heights stay the rangefinder's.
In a HITL 5 m/s headwind the aircraft went over the runway start 1.5 m above its path, the altitude controller dove to it at 3.5 m/s from 3 m and the flare, starting at 1.5 m with 2.9 m/s of sink, hit at 2.6 m/s. The descent asked on the final now stays within 1.5 times the path's sink, so a high aircraft lands longer (ArduPilot TECS_LAND_SINK); twice the path's sink before the runway start still dove under the path.
Ballooned at speed in a HITL headwind, the sink-rate law dove to -9 deg at 1.5 m and the aircraft hit at 2 m/s; with a hedge read as the runway it asked -7.2 deg. The lowest pitch is now the one the flare started from, or -4 deg when that was higher: in calm air the flares never went below their entry.
The landing state, its height, the sink asked, the climb rate flown on, the flare's pitch command, the glide start, the distance past the runway start or off the axis and the climb rate the altitude controller is asked, for the blackbox of a real landing.
setLandWaypoint() left posControl.wpDistance where the previous approach waypoint was declared reached, below its turn start distance. The FLY_BY corner cut in the position controller reads it before isWaypointReached() refreshes it, so it could judge the new waypoint already reached: the final approach then began at the turn point, to the side of the runway.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft. This is 11.0 material, opened against maintenance-10.x because
maintenance-11.xdoes not have the turncoordinator (#11812, on 10.x since September) and the FLY_BY corner cut the circuit is planned on. It needs
maintenance-10.x merged into maintenance-11.x first; I will retarget it then. It also contains #12176 (the one-line
base-leg fix), which shows in the diff until that one merges.
What it adds
The fixed-wing autoland of 10.x flies its wind circle over the landing site and turns onto the final from a point four
loiter radii beside the runway. On a small field with trees or houses on one side that is the wrong side, and the
glide to a fixed pitch floats past the site or drops short with the wind. Six settings, all 0 by default (nothing
changes for anyone who does not set them):
nav_fw_land_downwind_offset: flies a landing circuit instead. The wind circle sits abeam the landing site on thefree side (the approach direction of
fwapproach, seen from heading 1 whatever the landing direction), this far fromthe site. From the circle: downwind parallel to the runway, base abeam the start of the final, final. The aircraft
leaves the circle heading out and flies a straight and a square turn, with the turn space the corner cut plans
(the arc plus the roll-in), so it joins the downwind where it should at any speed.
nav_fw_land_loiter_radius: the circle's radius (0 keepsnav_fw_loiter_radius), held at a fixed radius and reachedslowly; the circle is placed with the radius it is really flown at.
nav_fw_land_final_alt: height above the site at the start of the final; the downwind and base descend evenly to itfrom the altitude the circle is left at.
nav_fw_land_approach_speed: an airspeed the landing holds with the throttle, through the Auto Speed controller,from the wind circle to the throttle cut.
nav_fw_land_aim_offset: the glide path meets the ground this far before the site, in either landing direction.nav_fw_land_flare_sink(withnav_fw_land_flare_time): a sink-rate flare. Set, the flare flies on the inertialclimb rate instead of a fixed pitch: it asks for height / flare_time of sink down to the flare sink, holds the
approach speed with power into the round-out, never puts the nose further down than the flare's entry, and touches
down nose up at the aim point. The round-out starts where that target sink equals the glide's.
With them: the
fwapproachrecord takes, for each landing direction, where the runway starts before the site and theheight the final crosses it at (optional fields, old records unchanged), so the glide starts over the runway; the glide
and flare steer towards the runway axis, and from the glide on the rudder gently holds the landing direction for the
roll-out (2 s time constant, 8 degrees per second at most; the roll-out rudder was turned the wrong way before); high
on the final the autoland no longer dives at the ground; the pitch is re-trimmed in the glide and flare and the pitch
I-term lock is off for the whole landing, since there is no stick input; the loiter circle is damped on the heading
error; an RTH that will land with the circuit flies to the far side of the wind circle, not to the runway.
debug_mode = AUTOLANDlogs the landing's internals (state, height flown on, path and measured climb rates, aimdistance, flare target).
Docs:
docs/Fixed Wing Landing.md(the circuit, the flare, thefwapproachfields),docs/Settings.md.navFwAutolandConfig_tgrows by fields appended with zero defaults, so the group keeps its version (pgLoadcopiesthe stored bytes over the defaults).
Testing
HITL with X-Plane 11 on a TBS Lucid H7 Wing, a 1.2 m T-28 model matched to the real aircraft's blackbox logs, on a
99 m grass strip with houses on one side: about forty landings over the development, the last ten with the model as
it is now. With the circuit (circle radius 35 m, 10 m off the site, final from 6 m, 13 m/s, flare sink 15 cm/s, aim
60 m short) the aircraft joins the downwind on the free side every time, touches down 40 to 45 m past the aim
point at 10.8 m/s, within 3 m of the centreline, and stops 30 m before the end of the strip; the classic approach on
the same strip with the same settings lands 56 m past the site and stops at 91 m. Not flown on a real aircraft yet.
Sizes against maintenance-10.x bc76329: MATEKF405SE +9916 B flash and +556 B RAM, KAKUTEF7 +10308 B flash,
KAKUTEF7HDV +10372 B flash (both +544 B RAM, ITCM unchanged), TBS_LUCID_H7_WING +9680 B flash, +544 B RAM, ITCM -16 B.
MATEKF722SE does not link: the base sits at 98.56 % of its flash and this adds about 10 KB, roughly 2.5 KB over.
That is the first thing to fix before this leaves draft: slim the circuit and the flare, or build them only where
they fit. Unit tests 620/620.