Exemple #1
0
void
OrderedTask::UpdateStatsGeometry()
{
  ScanStartFinish();

  stats.task_valid = CheckTask();
  stats.has_targets = stats.task_valid && HasTargets();
  stats.is_mat = GetFactoryType() == TaskFactoryType::MAT;
  stats.has_optional_starts = stats.task_valid && HasOptionalStarts();
}
Exemple #2
0
bool
AbstractTask::Update(const AircraftState &state, 
                     const AircraftState &state_last)
{
  stats.task_valid = CheckTask();
  stats.has_targets = HasTargets();

  const bool full_update = 
    CheckTransitions(state, state_last) ||
    (active_task_point != active_task_point_last);

  UpdateStatsTimes(state);
  UpdateStatsDistances(state.location, full_update);
  UpdateGlideSolutions(state);
  bool sample_updated = UpdateSample(state, full_update);
  UpdateStatsSpeeds(state, state_last);
  UpdateFlightMode();

  active_task_point_last = active_task_point;

  return sample_updated || full_update;
}