package org.mwc.debrief.track_shift.freq;

import java.util.ArrayList;

public class DopplerCurve
{
  private final ArrayList<Long> _times;
  private final ArrayList<Double> _freqs;

  public DopplerCurve(final ArrayList<Long> times, final ArrayList<Double> freqs)
  {
    _times = times;
    _freqs = freqs;
    
    // ok, fit the data
  }
  
  public boolean hasInflection()
  {
    return false;
  }
  
  public double inflectionFreq()
  {
    return -1;
  }
  
  public double inflectionTime()
  {
    return -1;
  }

  public double valueAt(final long t)
  {
    return 149.5 + Math.random() * 1d;
  }
}

@@ -93,16 +93,46 @@
 Curve%0A%7B%0A
+  @SuppressWarnings(%22unused%22)%0A
   privat
@@ -163,16 +163,49 @@
 _times;%0A
+  %0A  @SuppressWarnings(%22unused%22)%0A
   privat
@@ -394,16 +394,115 @@
 he data%0A
+    %0A    // now check if there's an inflection point%0A    %0A    // and store the equation parameters%0A
   %7D%0A  %0A 
@@ -678,16 +678,135 @@
 1;%0A  %7D%0A%0A
+  /** calculate the value on the curve at this time%0A   * %0A   * @param t time%0A   * @return frequency at this time%0A   */%0A
   public

introduce comments