debrief / mda

Working location for development of Debrief Manoeuvre Detection Algorithms
Eclipse Public License 1.0
0 stars 0 forks source link

Verify Delta 2 operation #10

Closed IanMayo closed 7 years ago

IanMayo commented 8 years ago

We have a working version of the Delta 2 algorithm. This algorithm doesn't use moving averages, it works with raw course data.

I've just received a more formal spec for this algorithm, here

We need to verify we've implemented it correctly. Significantly, I think the document constrains the window size more than ours.

If I don't get chance to consider this tomorrow (Weds), I'd appreciate you looking at it, please.

Update

Aah, we got this feedback:

On first sight, I don't think you've picked up the last part of the algorithm
in my note which is essentially when the difference in column M is 
greater than the threshold, we should declare the manoeuvre, but it 
should be one time step earlier.

What I was finding is that looking at the data at intervals of 1 sec you
could see exactly when the delta got larger than the threshold.  As you
go to longer time intervals, the delta still increases at exactly the same
rate but you don't see the intermediate values on the second.  So, if the
time interval was 8 seconds say, the deltas are exactly the same as the
1 second time interval but you only get every 8th one.  So you can get
one point where the delta is just less than 5 degrees but the next point
isn't until 8 seconds later but which time the delta could have jumped up
to 10 deg.  So the manoeuvre must have happened somewhere between 
the first and second time step.  We don't know exactly where it went
above 5 degrees so to be safe, we declare it at the earlier one even 
although the delta at that point was less than 5 degrees.

So, we certainly have a fix to the Delta 2 calculation. It looks like we have to make the turn start one time-step earlier, and finish one time-step later.

GDXFR commented 7 years ago

Calculation is ok and follow the formula as described in the doc.

I just change OFFSET to INDEX function for performence.

IanMayo commented 7 years ago

Aah, @gwenaeldelaleux - you need to push the change that includes the switch to the INDEX function.

Hmm, actually the spreadsheet may have changed since you made your edit. It's probably better to apply your fix to the most recent version (be sure to SYNC when you open).

IanMayo commented 7 years ago

The analyst reported this still being broken. Investigate it tomorrow morning.

IanMayo commented 7 years ago

Fixed in https://github.com/debrief/mda/commit/c715892df55443b0acb7c33df732d00a5a4c11ba