100KM

Feature Request: Hold Heading Mode

After flying two (arduous) 20km FPV flights, I was thinking it would be fantastic to have a mode that would keep the plane heading, altitude and speed. FBW & Stabilize holds the plane level, but it drifts. Auto requires I pre-load waypoints.

This would be a fantastic feature for the FPV users. What do you guys think?

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • 100KM
    Brilliant! I can't wait to test it, unfortunately work and wind intervenes until Thursday!
  • Developer

    As I thought it wasn't too hard to add a heading hold mode (now called CRUISE), so I've now pushed out 2.74beta4 with CRUISE mode included. I've been flying it a bit in the SITL simulator and it seems to work quite nicely. It would be great if I could get some more people to try it out, both in HIL and in real planes.

    The way it works is this:

    • if you have any aileron or rudder input then it flies just like FBWB. So it holds altitude until you use the elevator to change the target altitude (at the FBWB_CLIMB_RATE rate) and it adjusts airspeed based on throttle
    • when you let go of the aileron and rudder sticks for more than 0.5 seconds it sets an internal waypoint at your current location, and projects a target waypoint one kilometre ahead
    • as it flies along it heads for the target waypoint, and constantly updates that target to always be one kilometre ahead, leaving the previous waypoint as the position that you centred the aileron and rudder sticks
    • as long as you don't touch the aileron or rudder, it will run the same navigation it uses for waypoints, including crabbing, cross-track etc, so it will very accurately hold that ground course even in the face of changing wind conditions

    One of the nicer aspects of it is how it handles rudder. If you give it some rudder then the roll controller will keep the wings level, but the plane will yaw with the rudder. So you get a "wings level" turn, allowing you to rotate your flight to point at whatever geographic feature you want to head towards. Then when you let go of the rudder it will head straight for that point.

    Please give it a try and give some feedback. It is available now in mission planner as a 'beta' firmware.

    I'd recommend you fly it with the need TECS speed/height controller, by setting ALT_CTRL_ALG=2. Also make sure you tune your plane correctly, following the tuning guides for attitude, navigation and speed/height on plane.ardupilot.com

    Cheers, Tridge

  • Developer

    What should we call this new mode? Some suggestions:

    • HEADHOLD
    • HEADING
    • CRUISE
    • COURSEHOLD

    Any other ideas?

    The reason I want it to be a separate mode, and not just change FBWB, is that for photography with a directly down-facing camera and no gimbal you don't want the plane rolling its wings. The current FBWB mode is ideal for that.

    For people flying FPV I think they'll just use the new mode and not have FBWB setup on their mode switch at all.

    Cheers, Tridge

  • Developer

    yes, that would be fairly easy to do. This is probably best done as a new HEADHOLD mode.

    The heading to hold would be taken from whenever the aileron and rudder are released back to zero (within the deadzone). So if you don't touch aileron and rudder then it would hold heading. As soon as you start using aileron or rudder it would fly like FBWB until you let go of aileron and rudder again, at which point it would again lock heading. This would allow you to use aileron or rudder to adjust the heading you are holding, and be completely hands free for longer runs.

    Altitude and speed would be like FBWB, with the same controls.

    Sound ok?

    If you like the idea please create an issue for it in the issues list and I'll implement it when I get a chance.

    Cheers, Tridge

  • Yes! Heading hold and altitude hold. We would we not want FBW mode to do this already?
This reply was deleted.