bool TaskManager::TargetLock(const unsigned index, bool do_lock) { if (!CheckOrderedTask()) return false; AATPoint *ap = task_ordered.GetAATTaskPoint(index); if (ap) ap->target_lock(do_lock); return true; }
bool TaskManager::HasTarget(const unsigned index) const { if (!CheckOrderedTask()) return false; const AATPoint *ap = task_ordered.GetAATTaskPoint(index); if (ap) return ap->HasTarget(); return false; }
bool TaskManager::SetTarget(const unsigned index, RangeAndRadial rar) { if (!CheckOrderedTask()) return false; AATPoint *ap = ordered_task->GetAATTaskPoint(index); if (ap) ap->SetTarget(rar, ordered_task->GetTaskProjection()); return true; }
bool TaskManager::GetTargetRangeRadial(const unsigned index, fixed &range, fixed &radial) const { if (!CheckOrderedTask()) return false; const AATPoint *ap = task_ordered.GetAATTaskPoint(index); if (ap) ap->get_target_range_radial(range, radial); return true; }
bool TaskManager::SetTarget(const unsigned index, const fixed range, const fixed radial) { if (!CheckOrderedTask()) return false; AATPoint *ap = task_ordered.GetAATTaskPoint(index); if (ap) ap->set_target(range, radial, task_ordered.GetTaskProjection()); return true; }
bool TaskManager::SetTarget(const unsigned index, const GeoPoint &loc, const bool override_lock) { if (!CheckOrderedTask()) return false; AATPoint *ap = task_ordered.GetAATTaskPoint(index); if (ap) ap->set_target(loc, override_lock); return true; }
const GeoPoint& TaskManager::GetLocationTarget(const unsigned index, const GeoPoint& fallback_location) const { if (!CheckOrderedTask()) return fallback_location; const AATPoint *ap = task_ordered.GetAATTaskPoint(index); if (ap) return ap->get_location_target(); return fallback_location; }
bool TaskManager::IsInSector (const unsigned index, const AircraftState &ref, const bool AATOnly) const { if (!CheckOrderedTask()) return false; if (AATOnly) { const AATPoint *ap = task_ordered.GetAATTaskPoint(index); if (ap) return ap->IsInSector(ref); } else return task_ordered.GetTaskPoint(index).IsInSector(ref); return false; }