void AnalyseFlight(DebugReplay &replay, const BrokenDateTime &takeoff_time, const BrokenDateTime &scoring_start_time, const BrokenDateTime &scoring_end_time, const BrokenDateTime &landing_time, ContestStatistics &olc_plus, ContestStatistics &dmst, PhaseList &phase_list, PhaseTotals &phase_totals, WindList &wind_list, const unsigned full_points, const unsigned triangle_points, const unsigned sprint_points, const unsigned max_iterations, const unsigned max_tree_size) { Trace full_trace(0, Trace::null_time, full_points); Trace triangle_trace(0, Trace::null_time, triangle_points); Trace sprint_trace(0, 9000, sprint_points); FlightPhaseDetector flight_phase_detector; Run(replay, flight_phase_detector, wind_list, takeoff_time, scoring_start_time, scoring_end_time, landing_time, full_trace, triangle_trace, sprint_trace); olc_plus = SolveContest(Contest::OLC_PLUS, full_trace, triangle_trace, sprint_trace, max_iterations, max_tree_size); dmst = SolveContest(Contest::DMST, full_trace, triangle_trace, sprint_trace, max_iterations, max_tree_size); phase_list = flight_phase_detector.GetPhases(); phase_totals = flight_phase_detector.GetTotals(); }
void error_push_debug(const char *file, int line, int context, const char *fmt, ...) { va_list ap; va_start(ap, fmt); if (debug & GQ_DEBUG_ERROR_LINE) { GString *s = g_string_sized_new(200); g_string_sprintf(s, "%s:%d %s", file, line, fmt); if (debug & GQ_DEBUG_ERROR_TRACE) { g_string_append(s, "\n*** TRACE ***:\n"); sprint_trace(s); } /* Is it allowed to change the fmt? */ error_push_production_v(context, s->str, ap); g_string_free(s, TRUE); } else { error_push_production_v(context, fmt, ap); } va_end(ap); }