Lost all control and crashed

It's certainly a good question and has caused much confusion, but I think the answer is actually fairly simple even though the underlying control processes are not. It hinges on the exact method that the FC uses to determine attitude (pitch and roll), orientation (yaw), velocity and position. Inferring from the existing literature on 9-sensor IMU-controlled flight, it turns out that the GPS data are not primary in any of those for flight control, largely because the resolution is too low both spatially and temporally to be part of any fast control feedback loop.

The 9-sensor IMU is almost certainly doing all the fast stuff using some variant of one of the standard sensor fusion method. In these methods the 3-axis rate gyros and accelerometers provide the primary time-resolved data on all the variables listed above but, since they are measuring first and second derivatives with respect to time of position and orientation respectively, they are subject to accumulating errors (effectively drift) in the integrated (orientation and velocity) and double-integrated (position) data that build over time. Those are corrected for at a lower rate using the sensor's 3-axis magnetometers (for orientation), the GPS carrier wave Doppler data (for velocity) and the GPS position data (for position).

This combined approach allows the FC to detect changes in orientation orientation fast enough (200 Hz) to apply the motor adjustements necessary to correct for them. It also allows it to know the absolute values for position and orientation well enough that in P-GPS mode it can apply the appropriate motor adjustments to correct for horizontal positional drift - i.e. it knows, relative to itself, exactly which direction in which to move. Vertical position (altitude) is easier because the up and down directions are uniquely and absolutely defined by gravity, whereas compass heading is only known relative to the earth's magnetic field.

So now it becomes clearer what happens if the magnetometer data are compromised. Yaw changes (rotation) are still detected by the rate gyros and so yaw can be stabilized, but the FC no longer knows in which direction it is facing. That means that when positional drift is detected from the slower GPS data it is unable to know the appropriate motor adjustments to correct for that. Simply using trial and error - i.e. applying a random correction and seeing how that changes the long-term position drift is not a viable fast control strategy. Due to wind if nothing else, the FC does not even know the relationship between heading and track, and so at best it would end up flying around in circles hunting for a location. For that reason it switches to ATTI mode in which it does not attempt to figure out heading (it assumes that it cannot correct for rate gyro yaw drift because the compass data are bad) and therefore cannot hold horizontal position either.

Those consequences are undesirable but inevitable, and it would require a completely different trial-and-error-based navigational algorithm for the FC to attempt to fly in a specific direction or to a specific location. I'm not aware of any current work on that problem - does anyone else have any insights in that area?
Nicely put.
But if dual redundant hardware (IMUs and Compass) with GPSS back up are still prone to compromise, the next era would entail using TIMU chips and micro PNT.
 
No one is questioning the value or role of a compass in navigation.
What is not clear is why a compass error would trigger a flight mode switch from a GPS hold to Atti, which would definitely make matters worse in terms of controlling the AC for an inexperienced OP.
The P4 is a great flying machine with many redundancies built in. This particular software algorithm has never been satisfactorily explained on any forums.
Another way to look at is that GPS mode could use a better label. Call it YawGPS mode. If GPS says that position needs to be corrected then a correct Yaw makes it possible to fly back to the correct position. When the FC decides it can't use Yaw it's usually the case that Yaw can't be trusted; it might be correct, it might not be. Since Yaw isn't trusted the FC switches out of YawGPS to ATTI mode.

Many, if not almost all, launch time flyaways are caused by a geomagnetic distortion at the launch site. No amount of extra, more precise. more robust or more sophisticated IMU, magnetometers, etc. can prevent this. After launch when the AC leaves the distortion the FC detects that the geomagnetic field changes without a corresponding AC orientation change. It can't really know if it's Yaw or the compass that is correct. The P3 would do the right thing, IMHO, and immediately switch to ATTI. The Mavic, and I think probably the P4, will sometimes remain in GPS mode and try to fix the problem by rotating the AC until Yaw agrees with the compass. Sometimes this works, sometimes it doesn't and the FC ends up switching to ATTI.
 
Nicely put.
I said the exact same thing earlier but you argued with me about it. I merely summed it up in one sentence. :p

Because without the compass the craft doesn't know which way it's facing. So, it can't make positional corrections to hold position via gps, because it doesn't know which motors to spin up or down in order to hold gps position.
 
Another way to look at is that GPS mode could use a better label. Call it YawGPS mode. If GPS says that position needs to be corrected then a correct Yaw makes it possible to fly back to the correct position. When the FC decides it can't use Yaw it's usually the case that Yaw can't be trusted; it might be correct, it might not be. Since Yaw isn't trusted the FC switches out of YawGPS to ATTI mode.

Many, if not almost all, launch time flyaways are caused by a geomagnetic distortion at the launch site. No amount of extra, more precise. more robust or more sophisticated IMU, magnetometers, etc. can prevent this. After launch when the AC leaves the distortion the FC detects that the geomagnetic field changes without a corresponding AC orientation change. It can't really know if it's Yaw or the compass that is correct. The P3 would do the right thing, IMHO, and immediately switch to ATTI. The Mavic, and I think probably the P4, will sometimes remain in GPS mode and try to fix the problem by rotating the AC until Yaw agrees with the compass. Sometimes this works, sometimes it doesn't and the FC ends up switching to ATTI.
Exactly. There is no magic device that exists that would resolve this issue in these drones. TIMU chips, micro PNT, etc are all going to be prone to the same failure.
 
  • Like
Reactions: BudWalker
TO ALL THE MEMBERS ON THIS FORUM WHO KEEP ARGUING THAT A COMPASS ERROR SHOULD DEFAULT AC TO ATTI:
please read the following discussion completely.
Yaw error/Compass error/ATTI Can anybody explain me?
Now, if you have something intelligent to contribute, i'm all ears.
 
TO ALL THE MEMBERS ON THIS FORUM WHO KEEP ARGUING THAT A COMPASS ERROR SHOULD DEFAULT AC TO ATTI:
please read the following discussion completely.
Yaw error/Compass error/ATTI Can anybody explain me?
Now, if you have something intelligent to contribute, i'm all ears.

If we are to infer that you think nothing intelligent has been contributed so far in this thread then I suspect you just guaranteed that you will get no further help with your question.
 
If we are to infer that you think nothing intelligent has been contributed so far in this thread then I suspect you just guaranteed that you will get no further help with your question.
No, not all. I apologize if it could be so construed.
I meant, unlike the back and forth that kept on between at least a couple on that forum, we can concentrate on the "intelligent" parts.
 
TO ALL THE MEMBERS ON THIS FORUM WHO KEEP ARGUING THAT A COMPASS ERROR SHOULD DEFAULT AC TO ATTI:
please read the following discussion completely.
Yaw error/Compass error/ATTI Can anybody explain me?
Now, if you have something intelligent to contribute, i'm all ears.
Yea I read that. And the guy with the “idea” got destroyed by people who very clearly articulated why his idea won’t work on a DJI drone. You apparently chose to only read the part that you wanted to hear.
 
If we are to infer that you think nothing intelligent has been contributed so far in this thread then I suspect you just guaranteed that you will get no further help with your question.
Agreed. This horse isn’t going to get any dead-er :p

Done wasting my time.
 
No, not all. I apologize if it could be so construed.
I meant, unlike the back and forth that kept on between at least a couple on that forum, we can concentrate on the "intelligent" parts.
Then you missed the intelligent parts that explained it isn’t possible with these small drones by nature.
 
No, not all. I apologize if it could be so construed.
I meant, unlike the back and forth that kept on between at least a couple on that forum, we can concentrate on the "intelligent" parts.

Fair enough. Then I would say that from a flight control perspective, the method being described is the trial-and-error, goal-seeking approach that I mentioned above, where the aircraft flies in ATTI mode from the point of view of altitude and attitude stabilization but superimposes a trial-and-error-based attempt to minimize distance to the home point.

I don't see why that would not be workable but it would be a quite different approach to autonomous flight than is currently implemented in these products.
 
Fair enough. Then I would say that from a flight control perspective, the method being described is the trial-and-error, goal-seeking approach that I mentioned above, where the aircraft flies in ATTI mode from the point of view of altitude and attitude stabilization but superimposes a trial-and-error-based attempt to minimize distance to the home point.

I don't see why that would not be workable but it would be a quite different approach to autonomous flight than is currently implemented in these products.
I think the biggest issue is that the aircraft would have a hard time discerning from changes caused by wind and environment vs changes it is trying to do in trial and error. It has to start off with a whole lot of guessing as to which motor is facing "north", and whether or not that position is being changed constantly by the environment, so what it might "learn" is going to change constantly. Not to mention, the large error factor of civilian GPS to the tune of several meters, and to do what the craft needs, it would need to have centimeters or maybe inches at most of accuracy in order to "feel" its way home, as the IMU alone would not be sufficient to determine this. And all of this would have to be done with 0 ability to control provided to the operator. The thread that was linked went into all of this in pretty great detail and showed why it really isn't possible with today's civilian technology. On paper it sounds plausible at first glance, but once you break it down you realize how impossible it is with current civilian technology. OR if it is even remotely possible, it would be incredibly cost prohibitive.
 
I think the biggest issue is that the aircraft would have a hard time discerning from changes caused by wind and environment vs changes it is trying to do in trial and error. It has to start off with a whole lot of guessing as to which motor is facing "north", and whether or not that position is being changed constantly by the environment, so what it might "learn" is going to change constantly. Not to mention, the large error factor of civilian GPS to the tune of several meters, and to do what the craft needs, it would need to have centimeters or maybe inches at most of accuracy in order to "feel" its way home, as the IMU alone would not be sufficient to determine this. And all of this would have to be done with 0 ability to control provided to the operator. The thread that was linked went into all of this in pretty great detail and showed why it really isn't possible with today's civilian technology. On paper it sounds plausible at first glance, but once you break it down you realize how impossible it is with current civilian technology. OR if it is even remotely possible, it would be incredibly cost prohibitive.

Actually I disagree - as a control problem it is not computationally difficult, although it would be inefficient. The thread discussion conflated flight stability control with navigational control; for this to work those have to be separated.
 
Actually I disagree - as a control problem it is not computationally difficult, although it would be inefficient. The thread discussion conflated flight stability control with navigational control; for this to work those have to be separated.
Well, we've been discussing navigational control. Flight stability control is already there. In ATTI mode the drone will self-level and also maintain height. It's just up to the pilot to control it to get it where it needs to go. Navigational control without any ability to determine heading is just not in the cards right now. The issue that started this debate was the claim that it would be "oh so easy" to do this DJI just refuses. It's not "oh so easy". And that's the crux of the debate.
 
Well, we've been discussing navigational control. Flight stability control is already there. In ATTI mode the drone will self-level and also maintain height. It's just up to the pilot to control it to get it where it needs to go. Navigational control without any ability to determine heading is just not in the cards right now. The issue that started this debate was the claim that it would be "oh so easy" to do this DJI just refuses. It's not "oh so easy". And that's the crux of the debate.

As I said, I don't think that technical difficulty is the problem. Consider the situation in compass error-induced ATTI, simplified initially by no wind, so an approximately stationary aircraft. The FC knows, from GPS, both where it is and where the home point is, but not the appropriate direction to fly in the aircraft frame of reference. However, if the FC applies a small amount of forward pitch the aircraft will move (the trial and error part of the process), and on a timescale slow relative to the IMU flight control parameters (200 Hz), but fast enough to be usable, the 5 Hz GPS data allow it to generate a track that it can compare to the heading required to take it to the home point. It can then apply gradual rudder corrections until the GPS track matches the home point heading, at which point it is heading home. This is simply a slow feedback loop superimposed over the fast ATTI stability control feedback loop. The same principle applies even in a wind field since that simply imposes a linear offset between aircraft track and aircraft heading.

It's not difficult, either in theory or practice, it doesn't require any new sensors, and the computational load would be minor, but it is an entirely new flight mode. I cannot think of any technical reason that it could not be implemented - DJI may have their reasons, or they may simply not regard it as a priority. If you can see any flaws in my assessment of the method then please point them out.
 
As I said, I don't think that technical difficulty is the problem. Consider the situation in compass error-induced ATTI, simplified initially by no wind, so an approximately stationary aircraft. The FC knows, from GPS, both where it is and where the home point is, but not the appropriate direction to fly in the aircraft frame of reference. However, if the FC applies a small amount of forward pitch the aircraft will move (the trial and error part of the process), and on a timescale slow relative to the IMU flight control parameters (200 Hz), but fast enough to be usable, the 5 Hz GPS data allow it to generate a track that it can compare to the heading required to take it to the home point. It can then apply gradual rudder corrections until the GPS track matches the home point heading, at which point it is heading home. This is simply a slow feedback loop superimposed over the fast ATTI stability control feedback loop. The same principle applies even in a wind field since that simply imposes a linear offset between aircraft track and aircraft heading.

It's not difficult, either in theory or practice, it doesn't require any new sensors, and the computational load would be minor, but it is an entirely new flight mode. I cannot think of any technical reason that it could not be implemented - DJI may have their reasons, or they may simply not regard it as a priority. If you can see any flaws in my assessment of the method then please point them out.
I think in theory it seems doable, but the reality is different.
 
I think in theory it seems doable, but the reality is different.

Clearly in theory it is doable. But why do you think that the reality is different? Are you aware of any specific technical difficulties, or is that opinion just based on the observation that DJI has not implemented such a method?
 
Clearly in theory it is doable. But why do you think that the reality is different? Are you aware of any specific technical difficulties, or is that opinion just based on the observation that DJI has not implemented such a method?
I will PM you.
 
  • Like
Reactions: sar104
Mavic Pro had a similar issue which DJI resolved thus:
"Some Mavic users have reported that "Compass Error, Exiting P-GPS mode" displays in the app when flying in Sport mode after upgrading to the latest firmware.
This is because the main compass may encounter electromagnetic interference when it’s flying fast. The flight controller monitors GPS data and calculates compass orientation in real-time, and if the orientation deviation was too large, GPS and compass data would not be used, and the aircraft would enter Attitude mode.
The latest firmware, v01.03, has added a feature that allows the aircraft can select the best compass for a given situation. When the main compass encounters interference, it will seamlessly switch to the backup compass, avoiding the issue where the aircraft switched from P-GPS mode to Attitude mode"
Mavic Pro Compass Switching Issue
So the fact remains that DJI elects to make firmware according to what they think is best. Beta testing is then left to the consumers which sometimes results in situations which could have been salvageable if the firmware would have allowed. Suggestions from users have been submitted to DJI, it remains to be seen what they elect to do.
 
Mavic Pro had a similar issue which DJI resolved thus:
"Some Mavic users have reported that "Compass Error, Exiting P-GPS mode" displays in the app when flying in Sport mode after upgrading to the latest firmware.
This is because the main compass may encounter electromagnetic interference when it’s flying fast. The flight controller monitors GPS data and calculates compass orientation in real-time, and if the orientation deviation was too large, GPS and compass data would not be used, and the aircraft would enter Attitude mode.
The latest firmware, v01.03, has added a feature that allows the aircraft can select the best compass for a given situation. When the main compass encounters interference, it will seamlessly switch to the backup compass, avoiding the issue where the aircraft switched from P-GPS mode to Attitude mode"
Mavic Pro Compass Switching Issue
So the fact remains that DJI elects to make firmware according to what they think is best. Beta testing is then left to the consumers which sometimes results in situations which could have been salvageable if the firmware would have allowed. Suggestions from users have been submitted to DJI, it remains to be seen what they elect to do.
This doesn't apply to the phantom, it has always seamlessly switched to whichever compass is best.
 

Recent Posts

Members online

Forum statistics

Threads
143,095
Messages
1,467,611
Members
104,981
Latest member
Scav8tor