DJI Mavic, Air and Mini Drones
Friendly, Helpful & Knowledgeable Community
Join Us Now

Drone flew 600m away from me - out of my control!

@sar104 - First, thank you for another lesson. You don't run out of surprises do you? Now some questions. How rare is this kind of data corruption? It is the first time I see it. And is there an option to fix it within CsvView? Or do you do it with some other program? Thanks!

If you are interested in the fix - it really is simple. This is the function code, where data_wave is passed as the field to be fixed. Note that offsetmax is determined by inspection.

Function fix(data_wave)
Wave data_wave
int n
variable offsetmax
WaveStats data_wave
offsetmax = 20
n = 1
do
if (abs(data_wave[n] - data_wave[n-1]) > offsetmax)
data_wave[n] = data_wave[n-1]
endif
n+=1
While (n < V_npnts)
End
 
If you are interested in the fix - it really is simple. This is the function code, where data_wave is passed as the field to be fixed. Note that offsetmax is determined by inspection.

Function fix(data_wave)
Wave data_wave
int n
variable offsetmax
WaveStats data_wave
offsetmax = 20
n = 1
do
if (abs(data_wave[n] - data_wave[n-1]) > offsetmax)
data_wave[n] = data_wave[n-1]
endif
n+=1
While (n < V_npnts)
End
OK, that is alien to me but I thank you nonetheless. Hopefully, someone else will find it helpful.
 
@sar104 - That's great work.

Can you explain (in pretty simple terms!) how on earth you corrected those data files? So the numbers and errors could not of just been random?

There must of been of been a pattern? How did you spot it and quantify it?
 
Extrapolating velocity to that time gives the following as a track:

1581657811972.jpeg

@SamCrouch that gives some hope . . . it seems more than likely it would have 99.9% made landfall, a much better option than the loch bed.
It is a long shot, but if you're in a position to go back and try a search radiating out from that yellow pin, well, you might get lucky.
I guess the weather now is the issue !!
 
If you are interested in the fix - it really is simple. This is the function code, where data_wave is passed as the field to be fixed. Note that offsetmax is determined by inspection.

Function fix(data_wave)
Wave data_wave
int n
variable offsetmax
WaveStats data_wave
offsetmax = 20
n = 1
do
if (abs(data_wave[n] - data_wave[n-1]) > offsetmax)
data_wave[n] = data_wave[n-1]
endif
n+=1
While (n < V_npnts)
End
So the corruption amounts to a "shift +1” in an array (a.k.a. vector) of data points. The fix is to perform a “shift -1” on the array. Yeah?

Questions:
  1. Why do we test the absolute value of a data point against the actual value of its predecessor? Seems odd.
  2. What does the empirical offsetmax really mean? It suggests there’s a discontinuity in the (corrupted) data, but I’m not sure.
  3. Probably related to other logic, but why declare Wave and WaveStats? They’re not used here.
  4. Minor point: I assume V_npts is defined globally, probably the common array length of all fields.
 
If you are interested in the fix - it really is simple. This is the function code, where data_wave is passed as the field to be fixed. Note that offsetmax is determined by inspection.

Function fix(data_wave)
Wave data_wave
int n
variable offsetmax
WaveStats data_wave
offsetmax = 20
n = 1
do
if (abs(data_wave[n] - data_wave[n-1]) > offsetmax)
data_wave[n] = data_wave[n-1]
endif
n+=1
While (n < V_npnts)
End
I started attempting to fix the .csv in Excel but gave up after 5 minutes when I could see that it would take the better part of an hour. My approach was similar. Instead of replicating the previous row I was deleting the bad rows.
 
  • Like
Reactions: Prismatic
@sar104 - That's great work.

Can you explain (in pretty simple terms!) how on earth you corrected those data files? So the numbers and errors could not of just been random?

There must of been of been a pattern? How did you spot it and quantify it?

The corruption was in the form of random brief offsets from the real data in all the fields, including the flight time. Starting with that, if you look at the OSD_flyTime data as a function of point number, you will see the following:

time_data.png

The time data should increment by 0.1 seconds each point, but in some cases there are large data offsets. So that's easily fixed by detecting the discontinuous outliers and replacing them with the appropriate time step, being careful not to overwrite the small real discontinuities at the end that reflect data loss. That gives:

fix_time_2.png

Now that the time data are fixed, the same basic algorithm can be applied to other data which have similar problems, such as height:

Uncorrected_height.png

Corrected_height.png

That method is then applied to each data field.
 
I started attempting to fix the .csv in Excel but gave up after 5 minutes when I could see that it would take the better part of an hour. My approach was similar. Instead of replicating the previous row I was deleting the bad rows.

Yes - with nearly 10,000 rows to go through that's going to be very time consuming. You could write a similar conditional script in Excel, but Igor is much easier.
 
  • Like
Reactions: BudWalker
@sar104 - Many thanks. I think I sort of get it!

You know, I think anyone who recovers a drone due to your work or wins a warranty claim with DJI, so make a small donation to a charity of your choice.
 
  • Like
Reactions: Lincoln and sar104
So the corruption amounts to a "shift +1” in an array (a.k.a. vector) of data points. The fix is to perform a “shift -1” on the array. Yeah?

Questions:

Why do we test the absolute value of a data point against the actual value of its predecessor? Seems odd.

Because we have to decide if the change in data is real or spurious. The only dependable method is to note that the spurious changes are too large to be physical, and so the test is to compare with the previous data point. The abs function just allows a single test to detect positive or negative excursions.
What does the empirical offsetmax really mean? It suggests there’s a discontinuity in the (corrupted) data, but I’m not sure.

It's the threshold set to determine if the change was too large.
Probably related to other logic, but why declare Wave and WaveStats? They’re not used here.

Yes they are. The wave declaration is required to declare that data_wave is a wave. The WaveStats function generates, amongst other things, the standard variable V_npnts which is used to close the do loop.
Minor point: I assume V_npts is defined globally, probably the common array length of all fields.

No - it's an output result for the wave that WaveStats operated on.
 
  • Like
Reactions: Prismatic
Because we have to decide if the change in data is real or spurious. The only dependable method is to note that the spurious changes are too large to be physical, and so the test is to compare with the previous data point.


It's the threshold set to determine if the change was too large.


Yes they are. The wave declaration is required to declare that data_wave is a wave. The WaveStats function generates, amongst other things, the standard variable V_npnts which is used to close the do loop.


No - it's an output result for the wave that WaveStats operated on.
Good info, thanks! I was guessing, as I am unfamiliar with the language. (My Master’s was largely about the design of programming languages, but that’s of limited use when given just a short snippet of code. ?)
 
Good info, thanks! I was guessing, as I am unfamiliar with the language. (My Master’s was largely about the design of programming languages, but that’s of limited use when given just a short snippet of code. ?)

Apologies - I should have annotated it but it was really included just for anyone currently using Igor Pro.
 
Such talented analysis of the corrupted data - I am in awe! I hope I never have to ask for this kind of help from the group but it is very reassuring that such help is available.....
 
I think I've seen a similar case once before. So it's probably quite rare. I doubt that CsvView can fix it since it requires a somewhat customized signal processing. As it happens I first developed simple functions to fix those kinds of errors some years ago, when a bug in some Tektronix digitizers caused similar random offset issues. I was programming and controlling the digitizers with Igor Pro, and the same basic approach works for these data.
Sar104 - - you amaze me !!!!
how you can figure all this out is mind blowing
You helped me out explaining a crash I had in the past
Thanks much for your time with this group !
 
  • Like
Reactions: Pietros
Afternoon everyone - a bit of help if possible please.

Took my Mavic Mini and decided to fly it near to a Loch (I think you can guess where this is heading!). i was flying it above the church next to the Loch and it lost signal and went into some kind of fail safe mode, only had the drone since Christmas so I am not fully up to speed with the terminology etc yet :-/

Anyway, I lost sight of the drone, above some trees and after several minutes the screen on my remote was still saving that it had lost signal. I ran around searching for the drone, aiming the remote at the sky where the drone roughly was, but with no luck. After assuming that he drone was going to land directly below where it was flying, I searched for approx 45 minutes before checking that the drone had in fact flown in a straight line over the Loch and ended up 600m from the homepoint at the to bottom of the Loch, I was unable to attempt to recover the drone.

What are my options? I honestly believe that it was not my fault that the drone did this, the wind was not that strong at all and was was actually going the opposite direction to where the drone ended up, so the drone actually flew into the wind to where it ended up. I have seen that people can access the flight log etc to see if any errors occurred and to prove that this was a drone malfunction as opposed to pilot error so to speak.

Any help much appreciated.

Cheers
Sam
First thing I did when got my new drone, I insured it. DJI offering insurance but I found a better deal with my Insuarance company. In case of an incident they're asking only for a proof of purchase.

Trees are not blocking RF signal. However I don't know the max flying distance for Mavic Mini. Mavic 2 Pro is 18 km.

Mavic 2 Pro has an option RTH in case of signal lost.
 
  • Like
Reactions: Prismatic
First thing I did when got my new drone, I insured it. DJI offering insurance but I found a better deal with my Insuarance company. In case of an incident they're asking only for a proof of purchase.

Trees are not blocking RF signal. However I don't know the max flying distance for Mavic Mini. Mavic 2 Pro is 18 km.

Mavic 2 Pro has an option RTH in case of signal lost.
The mavic mini has also this feature.
 
First thing I did when got my new drone, I insured it. DJI offering insurance but I found a better deal with my Insuarance company. In case of an incident they're asking only for a proof of purchase.

Trees are not blocking RF signal. However I don't know the max flying distance for Mavic Mini. Mavic 2 Pro is 18 km.

Mavic 2 Pro has an option RTH in case of signal lost.
Just a small but important point: trees definitely can and do impede the RF signals between the AC and RC. Flying above a dense canopy of vegetation that you're standing under drastically reduces your range. It's actually the water in the plant that causes this, so forests of bare trees have less effect than those with lots of juicy leaves.
 
  • Like
Reactions: Camino Ken
Lycus Tech Mavic Air 3 Case

DJI Drone Deals

New Threads

Forum statistics

Threads
130,600
Messages
1,554,275
Members
159,607
Latest member
Schmidteh121