Git Product home page Git Product logo

curveslicer's Introduction

Project Status

Continuous Build Status

New in Debrief

Supported by

The development of Debrief has been supported by Oxygen XML

Oxygen Logo

The development of Debrief has also been supported by the YourKit Java Profiler

YourKit Logo

curveslicer's People

Contributors

ianmayo avatar

Watchers

 avatar  avatar

curveslicer's Issues

Rough algorithm

I had a think about how the algorithm could work yesterday.

When I approached the problem a couple of years ago, I followed the advice from the PDF document:

  • work through the data, slice the data into two at each step. At the time of the curve-change, the two halves (before + after) will have the best fit.

But, this fails when there are more than two straight legs, since our optimal slice will minimise the errors across the 3+ legs, rather than the minimal error between two legs, and the optimal slice will probably occur part way through the central leg.

Here's another thought:

  • work through the continuous period of data
    • find the five-minute period with the lowest delta bearing rate [see note below]
    • if none found, this leg is complete
    • if a matching five minute period is found, treat this as the centre of a straight leg.
    • fit the curve to this period
    • add a point to the right of the curve, fit it again.
    • continue expanding right until we have xx consecutive points above (or below) the curve [see note below]
    • mark the point previous to these "outside" points as the end time of the straight leg
    • continue expanding left until we have xx consecutive points above/below the curve
    • mark the point previous to these "outside" points as the start time of the straight leg
    • add this straight leg to the results list, and remove the data from the overall dataset
    • we now have periods before/after this leg. Treat each one as a continuous period of data, adding them to the list of legs to be processed.

Lowest delta bearing rate

We're trying to find periods of steady state. During the periods the bearing curve takes an ArcTan function. At opposite ends of this curve the shape is convex or concave (see below). This means that at some point in the curve there must be zero degress / min change of rate of bearing. So, we don't look for the lowest bearing rate, we look for the lowest delta bearing rate.

If we were looking for the lowest bearing rate, we'd find the flat horizontal sections near the start/end of the following curve. But, since our plan is to work our way out from the centre of the curve we're more interested in the centre of the curve, where the rate goes from positive to negative:

image

Above/below the line

When we've got a good curve fit, consecutive data points will generally appear above/below our fitted curve. This good fit will grow as the period we're inspecting continues to represent two vehicle in steady motion (course and speed).

Where the shape of the data moves away from the curve, we will start to get consecutive data points on the same side (above/below) the curve. The error between each point and that predicted by the curve will steadily grow.

Good fit, matching either side:
image

Bearings moving away from curve, suggesting one vehicle has changed state:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.