Beispiel #1
0
void
PrintHelper::orderedtaskpoint_print(std::ostream& f,
                                    const OrderedTaskPoint& tp,
                                    const AircraftState& state,
                                    const int item)
{
    if (item==0) {
        taskpoint_print(f,tp,state);
        orderedtaskpoint_print_boundary(f,tp,state);
        f << "# Entered " << tp.GetEnteredState().time << "\n";
        f << "# Bearing travelled " << tp.GetVectorTravelled().bearing << "\n";
        f << "# Distance travelled " << tp.GetVectorTravelled().distance << "\n";
        f << "# Bearing remaining " << tp.GetVectorRemaining(state.location).bearing << "\n";
        f << "# Distance remaining " << tp.GetVectorRemaining(state.location).distance << "\n";
        f << "# Bearing planned " << tp.GetVectorPlanned().bearing << "\n";
        f << "# Distance planned " << tp.GetVectorPlanned().distance << "\n";
    }
}
Beispiel #2
0
GlideResult
TaskSolution::GlideSolutionPlanned(const OrderedTaskPoint &taskpoint,
                                   const AircraftState &ac,
                                   const GlideSettings &settings,
                                   const GlidePolar &polar,
                                   const fixed min_h)
{
    GlideState gs(taskpoint.GetVectorPlanned(),
                  std::max(min_h, taskpoint.GetElevation()),
                  ac.altitude, ac.wind);
    return MacCready::Solve(settings, polar, gs);
}