Shop OBEX P1 Docs P2 Docs Learn Events
ELEV-8 V3 -- Hold heading feature? — Parallax Forums

ELEV-8 V3 -- Hold heading feature?

Can anyone comment on how tough it would be to add a 'hold heading' feature to the flight controller?

If this exists already - I've missed it (read the docs).

I have enough flight time now to manage the drone in manual mode - but I've noticed that would be handy to always know that the drone has it's head pointed to North (or any bearing for that matter).

This would take yaw control away from the pilot - but when the drone is at a distance you could be certain what direction 'pitch' and 'roll' would take you in.

Comments

  • It's already there as I understand it, fully supported by firmware and a GroundStation. Both heading and elevation hold have been implemented. We had internal discussions on documenting this for release but we did not follow through. A member of our team can provide more specifics, else I can figure it out on Monday and report back with some level of intelligence.
  • Thank you!

    No rush to this - if it's going to be formally documented at some point - I can wait.

    It just seemed like something that would be relatively easy and provide a practical benefit.

    KenMc
  • JasonDorieJasonDorie Posts: 1,930
    edited 2017-02-25 20:38
    "Relatively easy". You'd be surprised. I was.

    Compass-based heading hold is not enabled in the main branch. It is fully functional in the ActiveDevelopment branch but hasn't been folded back into the main branch.

    Compass based heading hold doesn't behave any differently than the standard flight modes, which already lock to a given heading, just without the compass as a reference, so they drift a little over time.

    The Elev8 will hold any heading you tell it to, but any yaw input changes the commanded heading. It sounds like what you're asking for is a way to have it return to a known heading - is that correct? If so, that doesn't currently exist, but would be pretty trivial to add now that the compass support is working. (if that's what you were referring to as "relatively easy", then yes, I agree - it was getting the compass support integrated into the IMU that was surprisingly hard)
  • Hmmm...you would think that by now I would have learned to be more careful with terms such as 'relatively easy'...

    I live next to a farm field. I'm very new at flying drones - so I'm pretty cautious with my ELEV-8 (ignoring my ... crash and ruined battery).

    I've been keeping the drone close but venturing out a little further each time.

    I was flying in a 5mph wind and moved the drone about 200 feet out. I realized that I couldn't 'see' the orientation of the drone - so 'tweaking' the stick didn't orient me - still I was confident in the heading - and I knew moving the stick to the right would bring the drone back - even though at first I couldn't tell if it was moving.

    At that point it occurred to me that if the drone could be set to a compass heading - you could be relatively certain of directional commands.

    I thought the FC had a compass - but I see that it is a magnetometer (interpretation required).

    There's a couple of possibilities - one would be an absolute setting where the pilot gives up YAW control - the other would be a 'orient to North' and pass YAW control back to the pilot.

    Thanks for the replies - it's helpful to get an idea of how the ELEV-8 and FC come together under the covers (as with most programming the level of effort to make it work has no correlation to the ease of using it).
  • I use a little negative expo on the yaw channel, and bright LEDs for orientation.
  • Your point is well taken - but this was a case where the drone was still "in sight" but beyond the point where I could clearly discern it's motion in response to small changes on the controls.

    I suppose that I could assume that just using the reverse motion that I sent it out with would bring it back.

    Still the ability to be certain of the drone's heading would be a plus.
  • A "return to takeoff heading" would be pretty simple to implement now that the compass stuff is working. Re-orienting to true north would be less intuitive because it'd require you (the human) to know where that was. :)

    There have also been requests to implement a heading-agnostic control mode. Basically, you assume that the pilot is behind the drone at startup, and all controls are relative to that starting position, regardless of the orientation of the craft. This means you are allowed to yaw (to aim a camera, for example) but the controls for left/right and fwd/back respond in the original directions, even as the yaw changes.

    This is harder than just re-orienting to a known yaw, but the math is relatively straightforward.

    As for the compass / magnetometer being "relatively easy", don't sweat it. I was honestly surprised by the complexity, mostly because I didn't realize that the magnetic field is warped, offset, and points in or out of earth depending on where you are relative to the equator. You have to compensate for all of that before you can get a meaningful heading.

    It *is* actually relatively simple to get a north reading if you know the magnetometer is level, but I need to be able to find the north vector regardless of the current orientation, and that's significantly harder.
  • JasonDorie wrote: »
    It *is* actually relatively simple to get a north reading if you know the magnetometer is level, but I need to be able to find the north vector regardless of the current orientation, and that's significantly harder.

    Isn't that how DGI does it? 360 horizontal walk around, then the same with the nose pointed down.

  • That's just the calibration phase, where you're measuring the offsets and scales. When airborne, you take the mag reading, transform it by the inverse of the current orientation to put it into "world relative" space, project the result into the XY plane, normalize it, then rotate it back into "drone space". That's just to remove declination.

    Then you compute the cross of that vector and your estimated "north" vector to get the error term to feed back into the IMU. Then you take the "north" vector in world space and compute a heading from it by using Atan, being careful of the fact that it doesn't work if you're too far from horizontal, and that it's backwards if you're upside down.

    Now, do all of this without "if" statements - there's no room in the FPU core for logic instructions.
  • A "return to takeoff heading" would be just as good as a return to 'north'. Maybe better.

    In known settings (such as my backyard) - I'm very sure I know where 'north' is - worse, where I live the roads are almost always NS or EW -- leaving me with the false sense of confidence that I "intuitively" know where North is. (I could tell about the time my "sense of North" was turned 180 and how disoriented I was, but that's too long a story.)

    How difficult would it be to code a 'return to radio contact' -- in the event that a drone loses radio - can you make it attempt to reconnect - not 'return to home' - just move back to where it last had a radio signal?

    Thanks again for the replies. Really helpful.
  • BTW - IMHO I think 'headless' mode is only useful in the most limited consumer setting. There are a lot of drones sold that see 3 or 4 battery charges - then are relegated to the closet.

    If you're going to be serious about using a drone - you need to learn to fly without any assist (aside from leveling). Piloting an aircraft of any kind is serious business and if I've learned anything about aviation (in 3 months) it's that the pilots in our country (professional and sport) deserve a lot of respect for the time and effort they put in to making the air space above our heads safe.
  • "Return to xxxx" is no different than return to home, as far as complexity is concerned. You'd need a GPS on board, and all the code that implies.

    It might be possible to "fake it" by just flying in the opposite direction for a bit until you re-establish contact, but what if that wasn't the reason for the radio loss? How far do you fly backwards? How do you even know you're going backwards without a GPS? (was there a tailwind?) I can poke all kinds of holes in it, so I don't think it's realistically doable without just going all-in on GPS.
  • It'd be neat, and probably terribly confusing and disorienting to any experienced pilot, if the RC transmitter also had a compass in it. The quadcopter would have no actual front: the front would always be in the direction the pilot is facing.
  • With GPS, this kind of thing is possible - You use fwd/back to increase/decrease the distance from the takeoff point, and left/right to move in a circle around the takeoff point. As long as the pilot doesn't move, it works reasonably well. :)
  • RTR (retutn to radio)

    I was thinking more along the lines of trying to guess reversing the last 15 to 30 seconds of flight. Just a wild though.
Sign In or Register to comment.