Welcome to PhantomPilots.com

Sign up for a weekly email of the latest drone news & information

Does RTH work with Compass Error?

Discussion in 'Pro/Adv Discussion' started by Mimoid, May 17, 2016.

  1. Mimoid

    Joined:
    Apr 18, 2016
    Messages:
    155
    Likes Received:
    82
    Do you know if the RTH function is still working if the Phantom reports a Compass Error failure?

    From time to time I get this error (maybe once every 20th flight) and I usually have to pilot the Phantom back using Atti mode and the live video feed. But what if I would lose the video link as well (e.g. because of the distance) or completely lose my orientation? Would it work to initiate RTH and get the Phantom to return to the home point - even with an active compass error? Or is "Compass Error + Loss of FPV" a certain killer combo?

    //Tom
     
    #1 Mimoid, May 17, 2016
    Last edited: May 17, 2016
    curiosity likes this.
  2. cordeiro

    Joined:
    May 13, 2016
    Messages:
    1
    Likes Received:
    0
    Good point. Had it happening once and for a few seconds but is a good point. What if happens far away and no fpv....
     
  3. Mark The Droner

    Joined:
    Aug 26, 2015
    Messages:
    3,993
    Likes Received:
    1,167
    Location:
    Brookeville, MD, USA
    If the compass error means you have no compass, the aircraft can't come home because it doesn't know where home is. Even if it knows its own GPS location and even if it knows the home point location, it still can't find home. It's like - what if you woke up and found yourself in a field in complete darkness. You know your house is exactly 100 meters due north, but you have no idea where north is. So you stumble off in a random direction hoping to get lucky...
     
    curiosity likes this.
  4. MedinaTaylor

    Joined:
    Jan 26, 2016
    Messages:
    261
    Likes Received:
    115
    Sounds like my weekends in college.
     
    MrGarvey, Apilot101, Gumby and 8 others like this.
  5. BobMcKinlay

    Joined:
    Apr 28, 2016
    Messages:
    50
    Likes Received:
    19
    Agreed. But it should be able to easily figure things out. Let's say it's at coordinates x1:y1. It needs to go home to x2:y2. If it had a working compass, the algorithm is a slam dunk. If not, it simply travels in it's current direction for a (short) bit and assumes that's 0 degrees. Checks it coordinates and then can determine it needs to rotate a certain amount and then repeats the process. It may take a little longer and may have somewhat diminished accuracy. But it's better than nothing.

    I did a development contract for something like this (GPS-enabled farm equipment) some years ago. Details are a bit different, but the logic is fairly straightforward.

    If the GPS is screwed, but not the compass, it's simple as well, short of the not knowing what altitude you're at drama.
     
    curiosity and MarkEt like this.
  6. Mimoid

    Joined:
    Apr 18, 2016
    Messages:
    155
    Likes Received:
    82
    Which in that case, sounds to me like an awfully poor design.

    It should not be difficult (or processor/memory intensive) to sample the GPS location with, say, one second intervals, and compare the current heading with the bearing to the home point. I would think that it would take less than 10 seconds to home in on the home point vector and fly into that direction.

    I am sure that the guys at DJI could write that algorithm with just a handful of code.

    //Tom
     
    curiosity and deltamike like this.
  7. Mark The Droner

    Joined:
    Aug 26, 2015
    Messages:
    3,993
    Likes Received:
    1,167
    Location:
    Brookeville, MD, USA
    I suspect the engineers at DJI are smarter than any of us, and if there was a way to fly home without a compass, they'd have figured it out.
     
  8. Mark The Droner

    Joined:
    Aug 26, 2015
    Messages:
    3,993
    Likes Received:
    1,167
    Location:
    Brookeville, MD, USA
    Rotate a certain amount? How can it "rotate a certain amount" without a compass?
     
    MarkEt likes this.
  9. Mimoid

    Joined:
    Apr 18, 2016
    Messages:
    155
    Likes Received:
    82
    No doubt they are. But working with software engineers, developers and IT-architects all day (all being extremely bright and skilled), I know that even the smartest guys sometimes tend to miss the most obvious things if it's not perceived as a real problem by the designers. Maybe no drone has got lost because of a compass error + loss of FPV ever.

    //Tom
     
    #9 Mimoid, May 17, 2016
    Last edited: May 17, 2016
    curiosity likes this.
  10. Mimoid

    Joined:
    Apr 18, 2016
    Messages:
    155
    Likes Received:
    82
    Let one of the motors spin 10% faster for half a second and then revert to the original RPM. The true heading should now have changed with an arbitrary number of degrees. The main thing is not precision, but an effective change in direction.

    //Tom
     
    curiosity likes this.
  11. FrequentFlyer

    Joined:
    Feb 14, 2016
    Messages:
    145
    Likes Received:
    32
    Location:
    Riverside,Ca
    Isn't this exactly what the GPS does, it knows it's GPS location, it knows it's recorded GPS Home point location, even without a compass and not knowing which way north is, it heads toward the Home point coordinates. In fact once the phantom is moving, the GPS also computes heading direction and rate of speed, all without a compass.


    Sent from my iPhone using PhantomPilots mobile app
     
    curiosity likes this.
  12. Mark The Droner

    Joined:
    Aug 26, 2015
    Messages:
    3,993
    Likes Received:
    1,167
    Location:
    Brookeville, MD, USA
    How do you figure heading is computed without a compass?
     
  13. BudWalker

    Joined:
    Jun 24, 2015
    Messages:
    775
    Likes Received:
    230
    Location:
    Santa Margarita, Ca
    Yes, a good example of this can be seen here Standard - Insight on my Fly Away? - HealthyDrone & YT Link You might want to back up a couple of posts though..Because of a compass error when RTH was initiated the P3 took off in the direction it mistakenly thought was home.

    @Luap, I and others are still looking at this flight. But, as others in this thread are speculating it does seem like there is an adaptation as the P3 figures out the yaw value that it needs to use to get home. In the later stages of this flight the P3 was using a yaw value 40 degrees different than the actual yaw but was flying in a straight line towards home.
     
  14. FrequentFlyer

    Joined:
    Feb 14, 2016
    Messages:
    145
    Likes Received:
    32
    Location:
    Riverside,Ca
    It seems that My car GPS figures out what direction I am moving, rate of speed, all with the GPS system. Or maybe it has an internal compass that assists the GPS. ? (Like the Phantom)? Hmmm


    Sent from my iPhone using PhantomPilots mobile app
     
    curiosity likes this.
  15. Mimoid

    Joined:
    Apr 18, 2016
    Messages:
    155
    Likes Received:
    82
    Hm, the GPS nav system in my car does not have a compass (as far as I know). When the car is stationary, it doesn't know the heading (the direction of the front of the car). But as soon as the car starts moving, it will be able to display the current heading on the moving map.

    If combined with an autopilot, it would be able to turn the car to a predefined heading and start driving in that direction (bad idea for a car, but should work for a lost drone).

    //Tom
     
    #15 Mimoid, May 17, 2016
    Last edited: May 17, 2016
    curiosity and varangian like this.
  16. alokbhargava

    Joined:
    Sep 28, 2015
    Messages:
    5,142
    Likes Received:
    1,658
    Location:
    San Francisco, CA
    P3 needs compass working to comeback to home point.

    Technically a drone can make it to home without a compass if it's yaw is locked but would need an algorithm to minimize distance from home.
     
    #16 alokbhargava, May 17, 2016
    Last edited: May 17, 2016
    Yeager74 and Mimoid like this.
  17. Mimoid

    Joined:
    Apr 18, 2016
    Messages:
    155
    Likes Received:
    82
    Thank for the clear and concise answer.

    This seems to me like an incredible oversight from the DJI design team. The compass is a very sensitive part of the flight navigation system and which is easily brought out of order by an incorrect calibration before take-off.

    Making the failsafe system highly dependant on such a error-prone, non-redundant function jeopardizes the whole automatic failsafe system.

    Also something that could be fixed with relative ease (unless I am missing something that's beyond my highly limited engineering skills).

    I think I will check that with DJI.

    //Tom
     
  18. jonebk12

    Joined:
    Feb 6, 2016
    Messages:
    272
    Likes Received:
    96
    Doesn't the thread BudWalker posted a link to show proof that the bird CAN possibly return home without a compass?
     
  19. Mimoid

    Joined:
    Apr 18, 2016
    Messages:
    155
    Likes Received:
    82
    Thank you, I will check out the link.

    It should not be impossible to test - make a deliberately bad calibration (near the car for instance), and take off on an open field (within eye sight of course).

    When the compass error occurs (which it should do when the magnetic anomaly is removed), press the RTH button and see what happens. As long as you can see what the Phantom does, you should be able to override the autopilot and bring it back safely.

    I am not sure I will have the nerve, though...

    //Tom
     
    curiosity and deltamike like this.
  20. BudWalker

    Joined:
    Jun 24, 2015
    Messages:
    775
    Likes Received:
    230
    Location:
    Santa Margarita, Ca
    This has already been "tested" for you. Check out that link Standard - Insight on my Fly Away? - HealthyDrone & YT Link