bool StartPoint::CheckExitTransition(const AircraftState & ref_now, const AircraftState & ref_last) const { const bool now_in_height = ordered_task_behaviour.CheckStartHeight(ref_now, margins, GetBaseElevation()); const bool last_in_height = ordered_task_behaviour.CheckStartHeight(ref_last, margins, GetBaseElevation()); if (now_in_height && last_in_height) { // both within height limit, so use normal location checks return OrderedTaskPoint::CheckExitTransition(ref_now, ref_last); } if (!TransitionConstraint(ref_now.location, ref_last.location)) { // don't allow vertical crossings for line OZ's return false; } // transition inside sector to above return !now_in_height && last_in_height && OrderedTaskPoint::IsInSector(ref_last) && CanStartThroughTop(); }
bool StartPoint::CheckExitTransition(const AircraftState &ref_now, const AircraftState &ref_last) const { if (!constraints.open_time_span.HasBegun(RoughTime::FromSecondOfDayChecked(unsigned(ref_last.time)))) /* the start gate is not yet open when we left the OZ */ return false; if (constraints.open_time_span.HasEnded(RoughTime::FromSecondOfDayChecked(unsigned(ref_now.time)))) /* the start gate was already closed when we left the OZ */ return false; const bool now_in_height = constraints.CheckHeight(ref_now, margins, GetBaseElevation()); const bool last_in_height = constraints.CheckHeight(ref_last, margins, GetBaseElevation()); if (now_in_height && last_in_height) { // both within height limit, so use normal location checks return OrderedTaskPoint::CheckExitTransition(ref_now, ref_last); } if (!TransitionConstraint(ref_now.location, ref_last.location)) { // don't allow vertical crossings for line OZ's return false; } // transition inside sector to above return !now_in_height && last_in_height && OrderedTaskPoint::IsInSector(ref_last) && CanStartThroughTop(); }
fixed FinishPoint::get_elevation() const { const fixed nominal_elevation = GetBaseElevation() + safety_height_arrival; if (m_ordered_task_behaviour.fai_finish) { return max(nominal_elevation, fai_finish_height); } else { return max(nominal_elevation, GetBaseElevation() + fixed(m_ordered_task_behaviour.finish_min_height)); } }
fixed FinishPoint::GetElevation() const { const fixed nominal_elevation = GetBaseElevation() + safety_height; if (constraints.fai_finish) { return std::max(nominal_elevation, fai_finish_height); } else { return std::max(nominal_elevation, fixed(constraints.min_height) + (constraints.min_height_ref == AltitudeReference::AGL ? GetBaseElevation() : fixed(0))); } }
fixed FinishPoint::GetElevation() const { const fixed nominal_elevation = GetBaseElevation() + safety_height_arrival; if (m_ordered_task_behaviour.fai_finish) { return max(nominal_elevation, fai_finish_height); } else { return max(nominal_elevation, fixed(m_ordered_task_behaviour.finish_min_height) + (m_ordered_task_behaviour.finish_min_height_ref == hrAGL ? GetBaseElevation() : fixed_zero)); } }
bool StartPoint::IsInSector(const AircraftState &state) const { if (!OrderedTaskPoint::IsInSector(state)) return false; return ordered_task_behaviour.CheckStartHeight(state, margins, GetBaseElevation()); }
bool FinishPoint::is_in_height_limit(const AircraftState &state) const { if (!constraints.CheckHeight(state, GetBaseElevation())) return false; if (constraints.fai_finish) return state.altitude > fai_finish_height; return true; }
bool FinishPoint::is_in_height_limit(const AIRCRAFT_STATE &state) const { if (!m_ordered_task_behaviour.check_finish_height(state, GetBaseElevation())) return false; if (m_ordered_task_behaviour.fai_finish) { return state.NavAltitude > fai_finish_height; } return true; }
bool FinishPoint::is_in_height_limit(const AircraftState &state) const { if (!m_ordered_task_behaviour.check_finish_height(state, GetBaseElevation())) return false; if (m_ordered_task_behaviour.fai_finish) return state.altitude > fai_finish_height; return true; }
fixed UnorderedTaskPoint::GetElevation() const { return GetBaseElevation() + safety_height_arrival; }
fixed IntermediateTaskPoint::GetElevation() const { return GetBaseElevation() + safety_height; }
fixed StartPoint::GetElevation() const { return GetBaseElevation() + safety_height_terrain; }
bool StartPoint::IsInSector(const AircraftState &state) const { return OrderedTaskPoint::IsInSector(state) && constraints.CheckHeight(state, margins, GetBaseElevation()); }