Exemplo n.º 1
0
int main(int argc, char **argv)
{
  plan_tests(717);

  task_behaviour.SetDefaults();
  ordered_task_settings.SetDefaults();

  TestAll();

  return exit_status();
}
Exemplo n.º 2
0
int main(int argc, char **argv)
{
  plan_tests(728);

  task_behaviour.SetDefaults();

  TestAll();

  glide_polar.SetMC(fixed(1));
  TestAll();

  glide_polar.SetMC(fixed(2));
  TestAll();

  glide_polar.SetMC(fixed(4));
  TestAll();

  return exit_status();
}
Exemplo n.º 3
0
bool
TaskStats::calc_flight_mode(const TaskBehaviour &settings)
{
  const int margin =
      (flight_mode_final_glide ? 1 : 0) * flight_mode_height_margin;

  /* when final glide Auto MacCready is enabled, it will auto-set MC
     to 0 if needed; therefore, we must use the "MC=0" solution to
     decide whether to switch to final glide */
  const GlideResult &solution_remaining = settings.IsAutoMCFinalGlideEnabled()
    ? total.solution_mc0
    : total.solution_remaining;

  const bool this_is_final = solution_remaining.IsOk() &&
    positive(solution_remaining.altitude_difference + fixed(margin));

  if (flight_mode_final_glide == this_is_final)
    return false;

  flight_mode_final_glide = this_is_final;
  return true;
}