Servers by jDrones

Qplane FS behavior questions...I want to expand the WIKI

(Henry Wurzburg aka ATX_HELI) #1

I am trying to understand the failsafe behaviour of my new tilt-rotor quadplane…

  1. If I am in plane mode flying around away from home and get FS, it will RTL and when it reaches RTL_RADIUS transition to QRTL and land at home and disarm…this I have verified…

2.If I am in copter mode away from RTL_RADIUS, it will transition to plane mode, climb to RTL alt, and perform #1…is this correct? another post points to the danger of ever flying in copter mode low and far away because of this…

3.If I am in copter mode within the RTL_RADIUS and FS what is the behaviour? I have noted that it apparently immediately goes to QLAND whenever it is, not the expected(at least for me),climb to QRTL_ALT, QHOVER toward home and then QLAND…is this dependent on anything else?

  1. Also, if I was in plane mode and FS occurs within RTL_RADIUS does it switch to QRTL and land, or flies out to RTL_RADIUS and switch to QRTL?
(Tony Atma) #2

Hi Henry, I believe this is very important issue. I agree with you that we must verify all FS conditions. Please confirm, only point 1 that has been verified ??

(Henry Wurzburg aka ATX_HELI) #3

Actually, the answers are simple:

  1. if in plane mode, FS is handled normally, except if Q_RTL_MODE is 1, in which case RTL will switch to QRTL when the plane arrives inside RTL_RADIUS.
  2. In copter mode, FS immediately results in QLAND. So better not be far away!
    I have submitted code to allow EITHER QLAND or QRTL to be evoked by setting a bit in Q_OPTIONS. Its awaiting review and merge…

Ideally, in my opinion, copter mode FS should also be able to result in a climb to Q_RTL_ALT, and transition to plane mode if beyond RTL_RADIUS, then loiter down to altitude, turn into the wind, and QLAND…similar to the existing, undocumented (I am working on adding it to the WIKI!) , Q_OPTION of performing a fixed wing approach on a VTOL_LAND mission command,loiter to alt, turn into wind and QLAND, instead of transitioning immediately to VTOL and proceeding to land point for QLAND.

(Tony Atma) #4

Hi Henry good to hear from you. I just want to make sure again your conclusion. Have tried in the field using real Vtol drone all these FS conditions?

(Henry Wurzburg aka ATX_HELI) #5

YES…verified in flight testing

(Tony Atma) #6

Thank you Henry. But another issue is about Altitude. If the plane is far from home and then FS triggered, the plane is flying to home point at what altitude? Is it same as RTL altitude that we set already? Let say RTL altitude is 300 meter. Then it changes to QRtl when arriving at Qrtl_radius at what altitude?? If the altitude is still 300 m, then it is very dangerous if the plane start the landing process in Copter mode, especially if the wind is very strong. Whatvdo you think???

(Henry Wurzburg aka ATX_HELI) #7

yes, you have to be careful …it flies back at RTL_ALT, transitions at the RTL_RADIUS, heads to home trying to descend to Q_RTL_ALT, which it will stay at until over home, then descend to land

if too large an RTL_RADIUS, it will spend a lot of time moving to home since copter mode defaults are to move pretty slowly…and if RTL_ALT in plane mode is too high, it will a long time to descend…but its a failsafe after all…

again, assuming all the above that FS happens while in plane mode…in copter mode, it just lands right there…

(James Stewart) #8

I’ve been experimenting with SITL simulation, but when I engage a Failsafe while flying as a copter (Auto mode) it does a transition to fixed wing RTL and follows the QRTL procedure normally. Can you share the procedure that you use which results in it going into QLAND mode at current position?

(Henry Wurzburg aka ATX_HELI) #9

hovering, loitering, or qstablize…close in or far away…engage throttle failsafe (which always acts the same as radio failsafe)…will always QLAND…the only AUTO mode I have tested FS in is when its in plane mode, and then it behaves as a plane…

here is the actual code,somewhat abbreviated:
void Plane::failsafe_long_on_event(enum failsafe_state fstype, mode_reason_t reason)

*** case Mode::Number::MANUAL:***
*** case Mode::Number::STABILIZE:***
*** case Mode::Number::ACRO:***
*** case Mode::Number::FLY_BY_WIRE_A:***
*** case Mode::Number::AUTOTUNE:***
*** case Mode::Number::FLY_BY_WIRE_B:***
*** case Mode::Number::CRUISE:***
*** case Mode::Number::TRAINING:***
*** case Mode::Number::CIRCLE:***
*** if(g.fs_action_long == FS_ACTION_LONG_PARACHUTE) {***
*** } else if (g.fs_action_long == FS_ACTION_LONG_GLIDE) {***
*** set_mode(mode_fbwa, reason);***
*** } else {***
*** set_mode(mode_rtl, reason);***
*** }***
*** break;***

*** case Mode::Number::QSTABILIZE:***
*** case Mode::Number::QHOVER:***
*** case Mode::Number::QLOITER:***
*** case Mode::Number::QACRO:***
*** case Mode::Number::QAUTOTUNE:***
*** set_mode(mode_qland, reason);***
*** break;***

*** case Mode::Number::AUTO:***
*** case Mode::Number::AVOID_ADSB:***
*** case Mode::Number::GUIDED:***
*** case Mode::Number::LOITER:***
*** if(g.fs_action_long == FS_ACTION_LONG_PARACHUTE) {***
*** } else if (g.fs_action_long == FS_ACTION_LONG_GLIDE) {***
*** set_mode(mode_fbwa, reason);***
*** } else if (g.fs_action_long == FS_ACTION_LONG_RTL) {***
*** set_mode(mode_rtl, reason);***
*** }***
*** break;***

*** case Mode::Number::RTL:***
*** case Mode::Number::QLAND:***
*** case Mode::Number::QRTL:***
*** case Mode::Number::INITIALISING:***
*** break;***
*** }***
*** gcs().send_text(MAV_SEVERITY_INFO, “Flight mode = %u”, (unsigned)control_mode->mode_number());***

so if in AUTO it WILL RTL…just not non missions…like I am flying a mile away and QLOITER then radio fails…it will land…a mile away…not good