code: public void update(long time, double latitude, double longitude, double rateOfTurn)
      {
          if (strat == Strategy.LONG)
          {
              throw new IllegalStateException("mixing short/long update");
          }
          strat = Strategy.SHORT;
          lock.lock();
          try
          {
              if (prevTime > 0)
              {
                  this.time = time;
                  this.latitude = latitude;
                  this.longitude = longitude;
                  this.speed = speed(prevTime, prevLatitude, prevLongitude, time, latitude, longitude);
                  this.bearing = bearing(prevLatitude, prevLongitude, latitude, longitude);
                  this.rateOfTurn = rateOfTurn;
                  calculated = false;
              }
              prevTime = time;
              prevLatitude = latitude;
              prevLongitude = longitude;
          }
          finally
          {
              lock.unlock();
          }
      }
docs: Updates values and calculates speed and bearing.
  
  <p>Don't mix short and long update method usage in same instance!
  
  @param time
  @param latitude
  @param longitude
  @param rateOfTurn Degrees / minute
  @throws IllegalStateException If mixing short and long update method usage in same instance!