bool
GlideComputerAirData::FlightTimes(const NMEAInfo &basic,
                                  const NMEAInfo &last_basic,
                                  DerivedInfo &calculated,
                                  const ComputerSettings &settings)
{
  if (basic.gps.replay != last_basic.gps.replay)
    // reset flight before/after replay logger
    ResetFlight(calculated, basic.gps.replay);

  if (basic.time_available && basic.HasTimeRetreatedSince(last_basic)) {
    // 20060519:sgi added (basic.Time != 0) due to always return here
    // if no GPS time available
    if (basic.location_available)
      // Reset statistics.. (probably due to being in IGC replay mode)
      ResetFlight(calculated, false);

    return false;
  }

  FlightState(basic, calculated, calculated.flight,
              settings.polar.glide_polar_task);

  return true;
}
Example #2
0
/**
 * Initializes the GlideComputer
 */
void
GlideComputer::Initialise()
{
  GlideComputerBlackboard::Initialise();
  GlideComputerTask::Initialise();
  ResetFlight(true);

  LoadCalculationsPersist(&SetCalculated());
  DeleteCalculationsPersist();
  // required to allow fail-safe operation
  // if the persistent file is corrupt and causes a crash

  ResetFlight(false);
}
Example #3
0
/**
 * Initializes the GlideComputer
 */
void
GlideComputer::Initialise()
{
  ResetFlight(true);
}