コード例 #1
0
ファイル: SectorZone.cpp プロジェクト: Tjeerdm/XCSoarDktjm
bool 
SectorZone::IsInSector(const GeoPoint &location) const
{
  GeoVector f(GetReference(), location);

  return f.distance <= GetRadius() && IsAngleInSector(f.bearing);
}
コード例 #2
0
ファイル: AnnularSectorZone.cpp プロジェクト: Adrien81/XCSoar
bool
AnnularSectorZone::IsInSector(const GeoPoint &location) const
{
  GeoVector f(GetReference(), location);

  return (f.distance <= GetRadius()) &&
    (f.distance >= inner_radius) &&
    IsAngleInSector(f.bearing);
}
コード例 #3
0
ファイル: AnnularSectorZone.cpp プロジェクト: alon/xcsoar
bool
AnnularSectorZone::IsInSector(const AircraftState &ref) const
{
  GeoVector f(GetReference(), ref.location);

  return (f.distance <= GetRadius()) &&
    (f.distance >= inner_radius) &&
    IsAngleInSector(f.bearing);
}