Example #1
0
void
BasicComputer::Compute(MoreData &data,
                       const MoreData &last, const MoreData &last_gps,
                       const DerivedInfo &calculated)
{
  ComputeTrack(data, last_gps);

  if (data.HasTimeAdvancedSince(last_gps)) {
    ComputeGroundSpeed(data, last_gps);
    ComputeAirspeed(data, calculated);
  }
#ifndef NDEBUG
  // For testing without gps.
  // When CPU load is low enough it can be done for every sample.
  else if (data.dyn_pressure_available)
    ComputeAirspeed(data, calculated);
#endif

  ComputeHeading(data.attitude, data, calculated);

  ComputeEnergyHeight(data);
  ComputeGPSVario(data, last, last_gps);
  ComputeBruttoVario(data);
  ComputeNettoVario(data, calculated);
  ComputeDynamics(data, calculated);
}
Example #2
0
void
BasicComputer::Compute(MoreData &data,
                       const MoreData &last, const MoreData &last_gps,
                       const DerivedInfo &calculated)
{
  ComputeTrack(data, last_gps);

  ground_speed.Compute(data);

  ComputeAirspeed(data, calculated);

  ComputeHeading(data.attitude, data, calculated);

  ComputeEnergyHeight(data);
  ComputeGPSVario(data, last, last_gps);
  ComputeBruttoVario(data);
  ComputeNettoVario(data, calculated);
  ComputeDynamics(data, calculated);
}