Esempio n. 1
0
fixed
UnorderedTask::GetFinishHeight() const
{
  TaskPoint *tp = GetActiveTaskPoint();
  if (!tp) {
    return fixed_zero;
  }
  return tp->GetElevation();
}
Esempio n. 2
0
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);
}
Esempio n. 3
0
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);
}
Esempio n. 4
0
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);
}