fixed UnorderedTask::GetFinishHeight() const { TaskPoint *tp = GetActiveTaskPoint(); if (!tp) { return fixed_zero; } return tp->GetElevation(); }
GlideState GlideState::Remaining(const TaskPoint &tp, const AircraftState &aircraft, const fixed min_h) { assert(aircraft.location.IsValid()); return GlideState(tp.GetVectorRemaining(aircraft.location), std::max(min_h, tp.GetElevation()), aircraft.altitude, aircraft.wind); }
GlideResult TaskSolution::GlideSolutionSink(const TaskPoint &taskpoint, const AircraftState &ac, const GlideSettings &settings, const GlidePolar &polar, const fixed s) { GlideState gs(taskpoint.GetVectorRemaining(ac.location), taskpoint.GetElevation(), ac.altitude, ac.wind); return MacCready::SolveSink(settings, polar, gs, s); }
GlideResult TaskSolution::GlideSolutionTravelled(const TaskPoint &taskpoint, const AircraftState &ac, const GlideSettings &settings, const GlidePolar &polar, const fixed min_h) { GlideState gs(taskpoint.GetVectorTravelled(), max(min_h,taskpoint.GetElevation()), ac.altitude, ac.wind); return MacCready::Solve(settings, polar, gs); }