Ejemplo n.º 1
0
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;
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
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;
}
Ejemplo n.º 4
0
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;
}
Ejemplo n.º 5
0
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;
}
Ejemplo n.º 6
0
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;
}
Ejemplo n.º 7
0
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;
}
Ejemplo n.º 8
0
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;
}