Spark Went to ATTI Mode after yaw and compass Error
12Next >
2969 42 2018-7-5
Uploading and Loding Picture ...(0/1)
o(^-^)o
Nick_W
lvl.1
Flight distance : 1722 ft
Canada
Offline

Hi,

I was flying my Spark near home, adfter one short flight, I took off for another. After only a few seconds i got an ATTI mode message, and the AC started to take off at a fair speed backwards (blown by the wind I assume).

I had a hard time controlling it, and lost sight of it. The controller was still in contact, so I was able to fly it back (slowly, it would not go very fast) using the map and video, until I could see it again and land it.

Studying the logs, I can see lots of Yaw errors, then compass errors, and dropping to ATTI mode. The AC keeps switching between P-GPS and ATTI mode the whole time. RTH did nothing (I tried several times).

Any idea what happened? why the yaw and compass errors? why did RTH not work?

I nearly lost my drone, makes me nervous about taking it back out without understanding what happened.

Link to my logs at Dropbox below log is DJIFlightRecord_2018-07-05_[14-34-53].txt, DJI_ASSISTANT_EXPORT_FILE_2018-07-05_16-27-12.DAT file is also from this flight (but is huge as it also includes video i think).
Dropbox Logs

Phantomhelp logs here
Phantomhelp Logs

I am not a hugely experienced pilot, so I'm in "intermediate" mode.
2018-7-5
Use props
DJI Gamora
Administrator

Offline

Thank you for reaching DJI Forum, we do apologize if you had an issue with your aircraft. May we ask if there's an error message to the app before you took off? also, may we ask what is the brand or make of your mobile device?
2018-7-5
Use props
Nick_W
lvl.1
Flight distance : 1722 ft
Canada
Offline

DJI Gamora Posted at 2018-7-5 14:03
Thank you for reaching DJI Forum, we do apologize if you had an issue with your aircraft. May we ask if there's an error message to the app before you took off? also, may we ask what is the brand or make of your mobile device?

I didn't notice any error message, the device I'm using is an iPad mini 4.

Thanks,
2018-7-5
Use props
Nick_W
lvl.1
Flight distance : 1722 ft
Canada
Offline

Nick_W Posted at 2018-7-5 14:05
I didn't notice any error message, the device I'm using is an iPad mini 4.

Thanks,

My iPad mini has GPS by the way (cellular vesion).
2018-7-5
Use props
DJI Tony
Administrator

Offline

Nick_W Posted at 2018-7-5 14:50
My iPad mini has GPS by the way (cellular vesion).

Hi, I would suggest flying your aircraft in an open area which there are no interferences that could interrupt the connection between your remote controller and aircraft as on the compass, I would suggest doing a pre-flight checklist first prior to your flight. Kindly ensure that the propellers are properly installed, app and firmware are up to date, RC and AC should be connected, re-calibrate the IMU and compass, especially if you're about to fly in a different location, check the GPS signal (18 or more signals is recommended), avoid any interference because this might interrupt the performance of your drone and put the aircraft into ATTI mode.
2018-7-5
Use props
Nick_W
lvl.1
Flight distance : 1722 ft
Canada
Offline

DJI Tony Posted at 2018-7-5 16:20
Hi, I would suggest flying your aircraft in an open area which there are no interferences that could interrupt the connection between your remote controller and aircraft as on the compass, I would suggest doing a pre-flight checklist first prior to your flight. Kindly ensure that the propellers are properly installed, app and firmware are up to date, RC and AC should be connected, re-calibrate the IMU and compass, especially if you're about to fly in a different location, check the GPS signal (18 or more signals is recommended), avoid any interference because this might interrupt the performance of your drone and put the aircraft into ATTI mode.

Everything seemed good though, previous flight 1 minute before had no issues, had 18 satellites.

Did not loose connection to the AC, nothing around that could cause magnetic interference.

So what caused the yaw errors? How is yaw derived as you can only determine this from a compass (magnetometer), not really from gps, is there a gyroscope?

I can see the sequence, yaw error, compass error, drop to ATTI mode, and you are on your own to get the AC back.

This seems like a problem though, there is a perfectly good gps signal - why drop it for a compass error? Why not switch to dead reckoning?iIn any case, the gps signal would help manually recover the AC (or even RTH).

So how do I avoid this in the future? None of your suggestions seems to address the specific yaw and compass error.

Thanks,
2018-7-5
Use props
Jasta ~
First Officer
Flight distance : 500554 ft
Philippines
Offline

Another case of Yaw Error!

Good to hear you were able to control and flew it back to you.
2018-7-5
Use props
Mirek6
Second Officer
Flight distance : 609724 ft
Canada
Offline

Nick_W Posted at 2018-7-5 17:11
Everything seemed good though, previous flight 1 minute before had no issues, had 18 satellites.

Did not loose connection to the AC, nothing around that could cause magnetic interference.

Nick,

First – congratulations for being calm and directing your Spark successfully back.

This is a known issue with Spark’s firmware getting confused when Spark fights cross-winds.
I have analyzed multiple almost identical scenarios in the past months on this forum. Some resulted in recovery of Spark and some with Spark loss and successful DJI warranty claim.

Here is what happened.
When you were flying, the wind speed was about 20 km/h. I can see it looking at Spark’s pitch and roll while you were stationary in GPS lock. Wind was roughly from the southern direction. Later, when in ATTI, gusts of winds were close to 25 km/h. This is not too excessive, and Spark is designed to handle it.

However….

Look at Spark’s trajectory just before yaw errors appeared at 5m 13 sec. You were flying NW but the trajectory is not straight – it is elliptical. The reason for it is that Spark is caught in 20 km/h cross wind from the south which causes it to constantly recalculate its heading and position.

When Spark flies, compass, IMU and GPS work in unison. You push on sticks and based on direction (angle) and degree of your push, a vector is calculated where Spark needs to fly. It is calculated based on Spark’s current GPS position, direction of the Spark’s nose (yaw) and magnetic north as per your Spark’s magnetometer (compass). The position which Spark should be in next split of second or so is calculated (so called “commanded” position). Spark flies to commanded position and takes physical measurement using GPS. It shows its new physical location, but this physical location is not the same as commanded position because Spark was pushed north by the wind. So, it recalculates correction vector and a new commanded position based on your sticks input. But, split second later the same thing gets repeated. As a result, Spark constantly corrects (hence elliptical path).

Unfortunately, Spark’s firmware gets confused. At some point it mistakes elliptical path caused by wind with so called “toilet bowl effect” which is caused by uncalibrated compass and/or uncalibrated IMU. Basically, when compass direction and north do not agree, or if IMU’s gyro does not work properly, even in windless conditions the Spark will start to go along ever widening spiral caused by continuous correction of calculated vectors. This phenomenon is difficult to control because correction vectors add up with commanded vectors causing very weird flight patterns.

To avoid toilet bowl effect, if Spark’s firmware detects first signs of toilet bowl effect, it drops from GPS to ATTI mode and allows pilot full manual control. This is correct behaviour and correct design.

But, if Spark drops to ATTI because it mistook elliptical path caused by wind with toilet bowl effect, it is bad. Spark’s sensors are working correctly yet it interpreted readings incorrectly. This is what happened in your case. After Spark took its elliptical path (while commanded straight) it threw yaw error. This error means that there is a disagreement between gyro and compass. When this happens because of Spark’s firmware confusion, it is usually accompanied by other errors – compass, speed, weak GPS signal, IMU heading exception etc. They are bogus. Spark tries to guess which system is at fault. But none of them is.

If you had lost your Spark due to this, you would have had a very good basis for a warranty claim.

So how to avoid it? Be careful with wind. Especially cross wind at higher altitudes - it can get much stronger than at ground level.Make sure that your compass and IMU are calibrated.
Why it happens to some and not the others (for example I do fly in quite strong cross winds but never observed elliptical path for my drone)? I don’t know – differences in sensitivity of h/w sensors? Not sure.
What is certain though is that the pattern you experienced – wind followed by elliptical path, followed by yaw errors, followed by ATTI, is known and well documented on this forum.
DJI, no doubt, knows about it because they do resolve such claims favourably but, they would scrutinize logs and decide each case separately. And they would not tell you what happened (I do not blame them :-)) – they simply replace the drone.  
  
Good luck and keep this in mind next time you fly.
  
  
Mirek

2018-7-5
Use props
Mirek6
Second Officer
Flight distance : 609724 ft
Canada
Offline

One more quick addition to my explanation above.

Experience shows that if you drop to ATTI because of confused sensors or confused firmware, switching to Sport mode may help. In Sport mode Spark is much more tolerant to disagreements between sensors. This is because centrifugal forces combined with inertia during turns with high speed would have constantly produced yaw errors if not detuned somewhat.

This is not a guarantee for success but should you be in trouble again the chances are it may help.

Mirek
2018-7-5
Use props
Gunship9
Second Officer
United States
Offline

A RC drone pilot should expect to be able to fly the drone in ATTI mode.  GPS stability is an autopilot crutch so you can get nice photos.  Autopilots are not the pilot in command and often have issues so the owners needs to be able to step up and take over piloting chores.  Show those skills or be separated from the drone eventually.  Nav faults happen on every aircraft that has been invented.  Hence the need for pilots.
2018-7-5
Use props
Nick_W
lvl.1
Flight distance : 1722 ft
Canada
Offline

Mirek6 Posted at 2018-7-5 18:46
One more quick addition to my explanation above.

Experience shows that if you drop to ATTI because of confused sensors or confused firmware, switching to Sport mode may help. In Sport mode Spark is much more tolerant to disagreements between sensors. This is because centrifugal forces combined with inertia during turns with high speed would have constantly produced yaw errors if not detuned somewhat.

Thank you for your detailed analysis!

I now understand what happened. I have the video from the flight (I was recording at the time), and I can see right when the AC drops to ATTI mode, there is a strong “wobble” just as if the AC got hit by a strong gust of wind.

Fortunately the AC went back to P-GPS mode and I was able to recover it. If it had stayed in ATTI mode it would probably have gone out of range before I could figure it out.

I didn’t think it was that windy, but at altitude, things are different, and looking at the trees, I can see the wind blowing them.

I will keep a careful eye on cross winds in future, and if the AC drops to ATTI mode - keep calm, and try to recover/land ASAP.

I think a lot of these drones are lost due to panic as it takes off at high speed, and you literally only have a few seconds to figure out what is happening before you are hopelessly disorientated and have lost sight of your drone.

THANK YOU for your help, it is much appreciated.
2018-7-5
Use props
Joller79 DK
lvl.4
Flight distance : 26447 ft
Denmark
Offline

The one thing i always comlain about is..
1. We who fly the spark by only phone, are in need of a live minimap, in situations like this.
2. How the hexx can the minimap be usable, when in atti mode(no gps fix). If you have no fix, then it doesnt know where it is, and should not be able to show up in map either??

Spark os way, way to sensitive about interference... My parrot bebop2 newer has any issues, the spark have a lot
2018-7-5
Use props
Antipaxi
Second Officer

Romania
Offline

Congratulations on successfully assessing and managing  the situation! You got your AC back safely.
2018-7-5
Use props
Nick_W
lvl.1
Flight distance : 1722 ft
Canada
Offline

Joller79 DK Posted at 2018-7-5 19:49
The one thing i always comlain about is..
1. We who fly the spark by only phone, are in need of a live minimap, in situations like this.
2. How the hexx can the minimap be usable, when in atti mode(no gps fix). If you have no fix, then it doesnt know where it is, and should not be able to show up in map either??

The thing is you do have a gps fix, the fact that the gps, IMU and compass do not agree doesn’t negate the fact that you have actual readings.

If you still have your radio link (and why not), the mini map should still show the location (right or wrong). You may not have a heading, which makes it hard to fly back, but if you still have your video feed, you can find a landmark and orientate yourself.
Luckily I have a large flag pole (actually a disguised cell tower) close to my home, so I was able to orientate myself to that, then checked the mini map to make sure the AC was getting closer to home.
The spark does seem too sensitive to wind though, and really, you have no warning that anything is wrong before you are dumped into ATTI mode.
If you switch to sports mode in these circumstances, would you get P-GPS mode back?
2018-7-5
Use props
BrilhasMuito
Second Officer
Flight distance : 3745554 ft
Brazil
Offline

Mirek6 Posted at 2018-7-5 18:24
Nick,

First – congratulations for being calm and directing your Spark successfully back.

Mirek6 - The sky master!!!
2018-7-5
Use props
JJBspark
Core User of DJI
Flight distance : 12225059 ft
  • >>>
Netherlands
Offline

Mirek6 Posted at 2018-7-5 18:24
Nick,

First – congratulations for being calm and directing your Spark successfully back.

Hi Mirek,

Nice and good analysis. I am learning from it too.

I do not see really great pitch and roll angles in a hover flight, Spark must be able to handle that.

What if the steering loop is calculated wrongly in the Spark itself? I mean if you want to fly straigh forward in line with Xwind the drone will initial drift left or right. Spark noticed this and as you said recalculate new steering output values to the desired direction. What if that calculation is wrong, will have the same effect on the flightpath.
Why do i think this? Because shortly before the YAW error VPS height start to indicate height. Strange ofcourse when you fly outside VPS range, but if let`s say some internal power circuit drops to out of range value you get all weird thinhs happening to electronic components.
I had a PM with a Dutch drone flyer who lost his drone with similar errors. Without handing over drone blackbox data (as it was not found) and just on his flightlog DJI replaced his drone with a new one.

And Nick a you probably reading this too ; very good effort to bring back your drone home safely!

cheers
JJB

2018-7-6
Use props
Nick_W
lvl.1
Flight distance : 1722 ft
Canada
Offline

Gunship9 Posted at 2018-7-5 18:49
A RC drone pilot should expect to be able to fly the drone in ATTI mode.  GPS stability is an autopilot crutch so you can get nice photos.  Autopilots are not the pilot in command and often have issues so the owners needs to be able to step up and take over piloting chores.  Show those skills or be separated from the drone eventually.  Nav faults happen on every aircraft that has been invented.  Hence the need for pilots.

Just wondering how a spark owner is supposed to learn to fly the AC in ATTI mode, given that there is no way to switch a spark to ATTI mode manually?
2018-7-6
Use props
Mirek6
Second Officer
Flight distance : 609724 ft
Canada
Offline

Nick_W Posted at 2018-7-5 20:04
The thing is you do have a gps fix, the fact that the gps, IMU and compass do not agree doesn’t negate the fact that you have actual readings.

If you still have your radio link (and why not), the mini map should still show the location (right or wrong). You may not have a heading, which makes it hard to fly back, but if you still have your video feed, you can find a landmark and orientate yourself.

Nick,

Yes you are right, when in ATTI GPS still works fine. GPS position is still there as you can see on a flight path (red) and I can see in the logs.

Yes - I have seen logs which suggest that switching to Sport mode Spark regains control between compass, IMU and GPS and Spark sticks to one GPS position without drifting with the wind when no input from sticks (proving switch to P-GPS mode while logs show Sport). I also have heard testimonies from pilots on this forum that switching to Sport while in ATTI allowed them to control Spark. While I do not know for sure why this is happening in Spark, knowing how internal sensors work together in quadcopters, I am making an educated guess about desensitizing of compass/IMU/GPS discrepancies to allow flight with higher speeds and greater inertia without false positive yaw errors.  In other words, if I were DJI engineer, I would certainly consider doing such thing in Sport mode. Good chances are, they did it this way - which is great for us.

Will it work in all circumstances? No it won't. I have seen logs and testimonies where pilot did attempt switch to Sport and AC remained in ATTI. This may indicate that discrepancies between compass/IMU and GPS were so large that even with Sport mode desensitization, they were still outside of the range accepted by Spark's firmware to get back to P-GPS.

Mirek
2018-7-6
Use props
Mirek6
Second Officer
Flight distance : 609724 ft
Canada
Offline

BrilhasMuito Posted at 2018-7-5 20:31
Mirek6 - The sky master!!!

Thank you for kind words BrilhasMuito. I am less of a "sky master" but more of a logical thinker with strong engineering background :-) I like to understand how things work from engineering point of view.
I am glad to be of help.

Mirek
2018-7-6
Use props
Nick_W
lvl.1
Flight distance : 1722 ft
Canada
Offline

JJBspark Posted at 2018-7-6 01:24
Hi Mirek,

Nice and good analysis. I am learning from it too.

The reason the VPS starts to show a height is that at that point I was flying over some tall trees, I think the AC automatically stopped/moved to avoid them, and I increased altitude to move above them. That's when things stared to go wrong.

If you look in the dropbox folder here Flight records there is a video (panic.MP4) of the flight, you can see how close to the trees it is at that point. You can also see the wobble just after - that's when it dropped to ATTI mode.

Maybe the video sheds some extra light on the whole event.

What I don't understand is why the AC then keeps shifting between ATTI and P-GPS mode, with the yaw/compass error coming and going.

I also think that most people say that the AC was "unresponsive to commands" when this happens because what they are doing is pressing RTH frantically, not realizing that in ATTI mode this does not work. I didn't, and tried it several times, but there is no record of it in the logs.

Seems to me DJI should try to make RTH always work, I mean you're not pressing it because you are in control, right? the AC has a valid home position, and in spite of yaw/compass errors, you still have a possibly valid GPS fix, so why not try to make it to the home position, instead of flying further away? it wouldn't take too long for the AC to work out what direction to move in to reduce the distance to the home location, even if it doesn't trust the compass (and seriously? if i was going to distrust anything, it would be the gyroscope, not the compass).
2018-7-6
Use props
JimFandango
lvl.4
Flight distance : 130768 ft
United Kingdom
Offline

Nick_W Posted at 2018-7-6 04:36
Just wondering how a spark owner is supposed to learn to fly the AC in ATTI mode, given that there is no way to switch a spark to ATTI mode manually?

I don't think there is a way to learn to fly the Spark in ATTI, short of covering in in tin foil. I think you'll have to look at buying a cheap, toy grade drone without GPS if you want to hone your ATTI skills. I have the Hubsan X4 H107C and the Visuo XS809HW, both of which are good for practice and cost around £25 to £30 each.

You did well to remain calm and pilot the Spark back to you...well done!
2018-7-6
Use props
Mirek6
Second Officer
Flight distance : 609724 ft
Canada
Offline

JJBspark Posted at 2018-7-6 01:24
Hi Mirek,

Nice and good analysis. I am learning from it too.

JJB,

Thank you for engaging in creative discussion again.

Take a look at timeline between 5m and 5m 4s. For these 4 seconds Spark is stationary with no directional inputs from sticks. It has yaw of about 306 degrees and consistent pitch greater than 8 with slightly negative roll. This is consistent with quite strong southerly breeze which Spark tries to resist to stay in one spot. According to my measurements and experiments flying with different speeds, this pitch is consistent with speeds of roughly 20 km/h. Give or take. Hence my wind speed rough guess at this moment. This finding is consistent with later drift in ATTI mode.

Yes – as you noted, Spark should be able to handle that. But, in many cases we have seen, it does not. And the cases which I analyzed so far, which are similar and resulted in Spark loss, were successfully claimed as warranty cases due to Spark malfunction.

You may be right about messed up circuitry exhibited first by VPS sensor misreading. I must admit I did not notice that in logs but now, looking at it again, I see it starting less than a second before yaw errors appear. It is plausible and something like this needs to be checked against more logs with similar cases to make a strong connection.

Having said that, I do see consistent pattern in the fly-aways I analyzed in past months when the wind blows.
Strong cross-wind (usually 20 km/h or more) resulting in elliptical path, resulting in yaw errors and all hell breaking loose with other messages followed shortly by ATTI.

Why elliptical path in these cases and no elliptical path for my Spark even with fairly strong cross-winds? Perhaps, as you said, the culprit is dropping power to some circuitry where Spark is much “weaker” and more susceptible to wind which result in all the phenomena I described.

The bottom line and the result, no matter what was the real internal cause (which, I guess, we will never know because DJI will not tell us) is the same: cross-wind -> elliptical path -> yaw error -> other confusion and errors -> ATTI -> fly-away.

BTW. Recent case which could suggest power drop was as follows: head wind -> Spark unable to hold GPS position pushed by wind and overcorrecting a bit -> confusion of firmware -> speed/yaw/compass errors -> ATTI.

All the same.

Let’s be vigilant and learn.

Mirek
2018-7-6
Use props
Nick_W
lvl.1
Flight distance : 1722 ft
Canada
Offline

Mirek6 Posted at 2018-7-6 04:48
Thank you for kind words BrilhasMuito. I am less of a "sky master" but more of a logical thinker with strong engineering background :-) I like to understand how things work from engineering point of view.
I am glad to be of help.

Thanks Mirek6,

interestingly I am also a logical thinker with an engineering background (I'm a Nuclear P.Eng), and I have written some IMU software as a hobby. having said that, there is a big difference between writing software and flying an AC!

Just yesterday I was helping a student with an IMU problem using some of my code for the accelerometer, and one of my comments in the code said:    // x,y,z accel (in g),  pitch and roll (in degrees) displayed every 5 seconds (no you can't detect yaw, need a magnetometer for that!)
So i appreciate the problems that the spark is trying to solve in real time - and it mostly does a great job!

i will take your great analysis and learn from it.
2018-7-6
Use props
Mirek6
Second Officer
Flight distance : 609724 ft
Canada
Offline

Nick_W Posted at 2018-7-6 05:03
The reason the VPS starts to show a height is that at that point I was flying over some tall trees, I think the AC automatically stopped/moved to avoid them, and I increased altitude to move above them. That's when things stared to go wrong.

If you look in the dropbox folder here Flight records there is a video (panic.MP4) of the flight, you can see how close to the trees it is at that point. You can also see the wobble just after - that's when it dropped to ATTI mode.

Nick,

You say: “Seems to me DJI should try to make RTH always work, I mean you're not pressing it because you are in control, right? the AC has a valid home position, and in spite of yaw/compass errors, you still have a possibly valid GPS fix, so why not try to make it to the home position, instead of flying further away?”

Yes – AC could get a fix on home direction with a bit of active “hunting” with GPS only. No, Spark does not support that functionality (some higher end drones may).

Why DJI did not program it in? Perhaps processing power, perhaps because such ATTI situations are rare (yes – I know we see it here on the forum all the time, but we do not see how many successful flights people have with Spark because they usually come here with problems, not to claim how wonderful Spark is :-)) and additional safety net is not justified from benefit/cost perspective? I don’t know but I suspect the combination of all of the above.

BTW I am very happy that you joined this forum. We have some very good technical members here (I have M.Sc in Telecommunications and work in Software Engineering in Telecom field) but more technical people , especially with knowledge about quadcopters inner working is a huge bonus. As you could probably see, DJI is not forthcoming with any insights. We are on our own trying to reverse engineer their design and learn what Spark is programmed to do and what it’s weaknesses are, so we can be more aware for ourselves and, in the process, help others. This is a tedious process through observing patterns and analyzing logs. We had many hypothesis before which were ultimately proved wrong. We had many which are proven correct. Anyways – the journey to understanding and discovery is always fun.

Personal question – as a nuclear scientist you are not in Chalk River – are you? (I live in Ottawa and am familiar with nuclear research sites nearby).

Mirek
2018-7-6
Use props
Gunship9
Second Officer
United States
Offline

Nick_W Posted at 2018-7-6 04:36
Just wondering how a spark owner is supposed to learn to fly the AC in ATTI mode, given that there is no way to switch a spark to ATTI mode manually?

I will give you that it would be nice to be able to switch to ATTI mode to get a feel for how it reacts.  Or be able to switch to RATE mode to really feel a drone without GPS or IMU stabilization.  Get a cheap Blade Inductrix Ready To Fly drone to learn ATTI mode on.

But even without ATTI mode switching a Spark flier should learn to pilot.  How does he learn to fly?  He learns to keep the drone within eyesight or be able to fly accurately with video lag (sport mode?).  He learns how to control the drone accurately in all orientations (facing him, facing away, facing to the left, facing to the right).  He learns how to use the sticks to return the drone to home instead of the autopilot button.  He learns how to use the sticks to control the Spark precisely even in Sport mode without the autopilot restricting speeds.

Mostly, he learns to fly the spark using the sticks so when it goes into ATTI mode he isn't letting go of the sticks, stabbing the RTH button a hundred times, and claiming the wind took it.  Pilot fail.  Furthermore, he isn't pushing the sticks in the wrong direction while claiming the wind took it. All drones will go into ATTI mode at some point in their lives so you have to know how to pilot it without the autopilot crutch.


Not a RTH button commanded return

Not a RTH button commanded return
2018-7-6
Use props
Gunship9
Second Officer
United States
Offline

Mirek6 Posted at 2018-7-6 06:53
Nick,

You say: “Seems to me DJI should try to make RTH always work, I mean you're not pressing it because you are in control, right? the AC has a valid home position, and in spite of yaw/compass errors, you still have a possibly valid GPS fix, so why not try to make it to the home position, instead of flying further away?”

You are looking to the Spark to reverse engineer it.  You are taking it from the wrong end of the story.  Drones were a home built Frankenstein monster in the beginning.  I always wondered why people would buy a store bought drone instead of building their own.

In 2004ish, RC helicopters used paddles on the rotors to steady the helicopter in pitch and roll.  Yaw had a RATE gyro placed between the receiver radio and the rudder servo.  It would hold the tail still unless the pilot acted on it.  Held it still in yaw no matter what.  People just put RATE gyros between the radio and the motor's ESC on quadcopters.  Now you have a semi stable quadcopter that won't change its ATTItude unless the pilot acts on it.

At the same time they were developing autopilots for RC planes that would return to horizontal or fly orbits around a position so newbie pilots could learn to fly their trainer aircraft.   Those could be put into quadcopters.  Now days, one little box will have the gyros, autopilot, and the radio receiver, all built into one.

Hook a controller to a stepper motor and you can accurately place the motors position for CAD/CAM machine work or little robot arms.  Put a RATE gyro between the controller and the stepper motor and you can hold a camera still in space while the mount moves around it.  Gimbal.
2018-7-6
Use props
Gunship9
Second Officer
United States
Offline

Mirek6 Posted at 2018-7-6 06:53
Nick,

You say: “Seems to me DJI should try to make RTH always work, I mean you're not pressing it because you are in control, right? the AC has a valid home position, and in spite of yaw/compass errors, you still have a possibly valid GPS fix, so why not try to make it to the home position, instead of flying further away?”

I think that is why we see so many drones available.  Such fast innovation.  The technology can't really be patented.  Drone tech was developed by hobbyists hacking together model aircraft parts.  It existed long before companies saw it as a product they could sell.

I think Futaba might be able to patent it because their small RATE gyro was the first one that worked well enough for model aircraft and was plug and play.
2018-7-6
Use props
BudWalker
First Officer
Flight distance : 5966247 ft
  • >>>
United States
Offline

I took a look at both the .DAT and .txt logs. I kinda like an explanation different than the cross wind explanation. I think the incident started at 329 s when the ultrasonic height sensor mistakenly reported 2.1 meters instead of the actual height which was 22.5 meters. As a result the Spark thought it was close to the ground and started using the "vision compass" instead of the IMU heading computations.
2018-07-06_8-37-37.jpg

DatCon isn't smart enough to know when the "vision compass" is being used, but it does know if the vision system (instead of the GPS system) is being used to compute velocities
2018-07-06_8-49-40.jpg
At time 330.319 secs neither GPS or the vision system are not being used. Then at 332.5 srcs (green background) the vision system starts being used to compute velocities.
2018-7-6
Use props
Tervist
Second Officer
Flight distance : 20830 ft
United States
Offline

Nick_W Posted at 2018-7-5 19:17
Thank you for your detailed analysis!

I now understand what happened. I have the video from the flight (I was recording at the time), and I can see right when the AC drops to ATTI mode, there is a strong “wobble” just as if the AC got hit by a strong gust of wind.

To get an idea of what kind of wind to anticipate at a given altitude in your area, you may want to check out the UAV Forecast App.

https://itunes.apple.com/us/app/uav-forecast/id1050023752?mt=8
2018-7-6
Use props
Mirek6
Second Officer
Flight distance : 609724 ft
Canada
Offline

BudWalker Posted at 2018-7-6 07:53
I took a look at both the .DAT and .txt logs. I kinda like an explanation different than the cross wind explanation. I think the incident started at 329 s when the ultrasonic height sensor mistakenly reported 2.1 meters instead of the actual height which was 22.5 meters. As a result the Spark thought it was close to the ground and started using the "vision compass" instead of the IMU heading computations.
[view_image]

BudWalker,

Thanks for your angle on this issue. I appreciate such analysis,

Yes - we did talk about VPS abnormality earlier in this thread (JJB pointed it out).

Nick explained that he was flying low over trees - so no abnormal sensor behaviour.

If VPS were causing ATTI, we would have seen it before, in other cases, at low altitudes (I am not talking about flying inside with no GPS and dark conditions). We never did (not that I am aware on this forum).Also, while VPS is used to compute VPS velocity, it cannot be used to steer the drone using commanded/physical position algorithm. Spark droppes to ATTI when this algoritm is failing due to disagreement between compass/IMU and GPS (not VPS). It drops to ATTI to avoid toilet bowl effect which cannot happen with no GPS (with OPTI only).

I am simply putting two and two together based on multiple logs from multiple fly-aways over past months. They are more or less consistent.

I am also leaning towards several possible root causes:
- some power fluctuation weakening Spark so the feral sequence wind -> elliptic path -> error -> ATTI starts
- possible issue with compass and/or IMU calibration
- possible weakness of Spark's firmware in how to interpret sensory input.

There may be other root causes.

Mirek  
2018-7-6
Use props
Nick_W
lvl.1
Flight distance : 1722 ft
Canada
Offline

Mirek6 Posted at 2018-7-6 06:53
Nick,

You say: “Seems to me DJI should try to make RTH always work, I mean you're not pressing it because you are in control, right? the AC has a valid home position, and in spite of yaw/compass errors, you still have a possibly valid GPS fix, so why not try to make it to the home position, instead of flying further away?”

Mirek6. actually  I'm in Mississauga. I've spent 30 years working for General Electric on medical devices (cyclotrons, PET scanners and such). I'm the National Support Engineer for Canada, so I spend a lot of my time poring over logs trying to figure out what happened, and why.

So I do know the pain of trying to work out the sequence of events, and root cause from a ton of technical data.

BTW, Chalk River is now out of the medical Isotopes business, since the NRU is offline, everyone has to get their isotopes from elsewhere (or a nearby cyclotron).
2018-7-6
Use props
Bluedot
lvl.2
Flight distance : 218471 ft
Germany
Offline

Mirek6 Posted at 2018-7-5 18:24
Nick,

First – congratulations for being calm and directing your Spark successfully back.

Wow, that was an educational and interesting post, thank you very much.
2018-7-6
Use props
BrilhasMuito
Second Officer
Flight distance : 3745554 ft
Brazil
Offline

Mirek6 Posted at 2018-7-6 04:48
Thank you for kind words BrilhasMuito. I am less of a "sky master" but more of a logical thinker with strong engineering background :-) I like to understand how things work from engineering point of view.
I am glad to be of help.

Mirek,
Seriously man,
You can have any level of knowledge, doesnt matter.
The most important thing is that you are always willing to help and share whatever you know.
You are a kind and helpful person.
I really appreciate that!

2018-7-6
Use props
JJBspark
Core User of DJI
Flight distance : 12225059 ft
  • >>>
Netherlands
Offline

Mirek6 Posted at 2018-7-6 05:16
JJB,

Thank you for engaging in creative discussion again.

Hi Mirek,

Nice to join a good discussion, not much time though, busy preparing summer holiday!

Your first question, please help me out.

Ik look at 5m to 5m4s. Heading Drone steady 308.
Drone pitches down with about 7-9 degrees, roll angle 2.9 right to 2.0 left. (so it various)

I think that the wind blows 128 degrees with some variation.
So why do you think its a Southerly breeze?

As the OP told that he was flying over some trees, VPS height was measured.
I think that only VPS heigt and vison is used if the GPS signal becomes too weak, if VPS is out of range than ATTI mode gets active.

Will plot the flying pattern somehow, see if can find some 'weird' values taken the wind vector and RC input into this.


cheers
JJB



analysis1.png
2018-7-7
Use props
Jasta ~
First Officer
Flight distance : 500554 ft
Philippines
Offline

DJI needs to take and fix that YAW ERROR SERIOUSLY!
2018-7-7
Use props
Mirek6
Second Officer
Flight distance : 609724 ft
Canada
Offline

JJBspark Posted at 2018-7-7 08:34
Hi Mirek,

Nice to join a good discussion, not much time though, busy preparing summer holiday!

JJB,

Below I pasted relevant log between 5m 0s and 5m 4s.

The yaw is between 308.5 to 309.2.
The pitch varies with wind but is fairly consistently over 8 degrees positive which is pitch to the back of the plane (nose is up). Spark is fighting the wind coming from its back (from SE)
Roll starts with positive values, due to inertia – Spark was just breaking, so I took them out of equation and focused more on 5m 1s to 5m 4s. I see fairly consistent small negative values between 0 and 1.7 degrees. This shows slight banking to the left as if resisting slight wing vector from SW.

These two vector combined give roughly SSE wind (blowing from SSE to NNW) with various gusts. I did make simplification saying southerly breeze. It was more breeze from SSE. My rough high level vector estimation is wind from the direction of roughly 140-150 in the direction of roughly 320-330 with some variation.

You say: “I think that only VPS height and vison is used if the GPS signal becomes too weak…”

I do not believe that GPS signal was weak in this case. GPS count is high and quite consistent (yes, I know that despite high count you may have weak signal) and you can see clearly that Spark never lost its GPS bearings. I believe that “Weak GPS signal” warning was a false positive caused by system confusion.

You say: “… if VPS is out of range than ATTI mode gets active.”

Yes – if the GPS signal is weak (which, I believe, was not the case here). I believe that Spark went to ATTI because of confusion between sensor readings caused by forced elliptical path which was interpreted by firmware in a wrong way. Again, this is just my speculation based on multiple other cases which exhibit the same pattern and same sequence of events.

Now – I did test my Spark over the weekend in fairly strong wind. I did it on purpose. I calibrated compass and IMU carefully and than pushed it to the max – flying across wind, with wind, higher altitudes. I had high speed wind warnings all the time. No elliptical path anywhere. No yaw errors even though I tried my damnest to force them by flying with highest speeds and banking extremely sharp, twirling Spark back and forth etc. No luck (which is a good thing).

So, if we see results like in this case and other cases, it must be something not quite right.
You suggested drop in power levels. This is possible. Such a drop may result in Spark unable to flight straight in a cross wind. This could be battery firmware, battery h/w, Spark h/w or Spark firmware issue.
Or, it could be as simple as slightly un-calibrated compass and/or IMU which is interpreted by DJI Go App as normal. If you ask me if I trust DJI GO status readings? To some extent – yes, but I am always suspicious and will not believe them every time. I just analyze my situation carefully and make my own decisions to calibrate or not calibrate based on my experience and circumstances.

I am looking forward to an new firmware release for Spark and RC and we will see if these weird patterns keep happening.
DJI had a lot of time to tune it in the past 7 months and, undoubtedly, they have analyzed these “elliptical” fly-aways and should know exactly what is the root cause.

Mirek

2018-7-9
Use props
JJBspark
Core User of DJI
Flight distance : 12225059 ft
  • >>>
Netherlands
Offline

Mirek6 Posted at 2018-7-9 08:33
JJB,

Below I pasted relevant log between 5m 0s and 5m 4s.

HiMirek,

about the wind vector, you are so right. I had a brain fart, pitch up means wind from behind...so simple, how can i make that mistake  ;-)

I will try to make a wind vector in my program, once programmed ok never think about it just see the vector!

Yes, i meant to say that even in the VPS was indication (tree), that info is not used for some calculations beacuse GPS signal was there.

Fun, i had my Spark out yesterday, many yaw errors etc. Even a ATTI message on my screen but not logged in the flighhtrecord and not in the DJI flight video playser in the App. real curious!

SO my MA fly`s without any error and my Spark fly`s with errors,
We have to wait for DJI to deliver a better FM.

cheers
JJB
2018-7-9
Use props
Mirek6
Second Officer
Flight distance : 609724 ft
Canada
Offline

JJBspark Posted at 2018-7-9 10:32
HiMirek,

about the wind vector, you are so right. I had a brain fart, pitch up means wind from behind...so simple, how can i make that mistake  ;-)

JJB,

You say: "Fun, i had my Spark out yesterday, many yaw errors etc. Even a ATTI message on my screen but not logged in the flighhtrecord and not in the DJI flight video playser in the App. real curious!"

Yeah - messages from DJI GO are not always reliable and not always in sync in logs.

Just for the fun of it. What would happen if you re-calibrate, very carefully, compass and IMU of the Spark which displayed those errors and took it for a spin again? In similar conditions with similar flight patterns?

If, after re-calibration, you have same issues, chances are that something else is at work here.
Since we are using same firmware (I assume you are on latest version from December 2017) there would have to be some h/w issue (we talked about possible power instability as an example).

Mirek
2018-7-9
Use props
JJBspark
Core User of DJI
Flight distance : 12225059 ft
  • >>>
Netherlands
Offline

Mirek6 Posted at 2018-7-9 11:07
JJB,

You say: "Fun, i had my Spark out yesterday, many yaw errors etc. Even a ATTI message on my screen but not logged in the flighhtrecord and not in the DJI flight video playser in the App. real curious!"

I had my Spark calibrated and IMU, indeed very precise.
Short flight in open area just 350 meters fwd, slow 180 degree turn to HP again.
Lots of compass and later yaw erros, but it stayed in GPS mode!
If i have time i will do the same flight again in the same area.
cheers
JJB
2018-7-9
Use props
Mirek6
Second Officer
Flight distance : 609724 ft
Canada
Offline

JJBspark Posted at 2018-7-9 11:15
I had my Spark calibrated and IMU, indeed very precise.
Short flight in open area just 350 meters fwd, slow 180 degree turn to HP again.
Lots of compass and later yaw erros, but it stayed in GPS mode!

JJB,

I assume that this was the video I saw.
Flying at 90m altitude over beautiful open fields of Netherlands :-). No real reason for any interference.

I am soo looking forward to the new firmware to confirm if there is really some issues with h/w and sensors inconsistencies.

I cannot explain what you experienced (with well calibrated Spark) versus what I am experiencing (with my well calibrated Spark) given that we use same firmware, outside of some potential h/w instabilities.

DJI announced new firmware couple of days ago and... silence :-(.

Mirek
2018-7-9
Use props
12Next >
Advanced
You need to log in before you can reply Login | Register now

Credit Rules