Skip to content

File CircularFieldOfView.hpp

File List > astrea > trace > trace > platforms > sensors > fov > instances > CircularFieldOfView.hpp

Go to the documentation of this file

#pragma once

#include <numbers>
#include <unordered_map>

#include <astro/astro.fwd.hpp>
#include <astro/frames/dynamic_frames.hpp>
#include <units/units.hpp>

#include <trace/platforms/sensors/fov/FieldOfView.hpp>

namespace astrea {
namespace trace {

class CircularFieldOfView : public FieldOfView {
  public:
    CircularFieldOfView(const Angle& halfConeAngle = std::numbers::pi / 4.0 * mp_units::angular::unit_symbols::rad) :
        _halfConeAngle(halfConeAngle)
    {
    }

    ~CircularFieldOfView() = default;

    bool contains(
        const astro::CartesianVector<Distance, astro::frames::earth::icrf>& boresight,
        const astro::CartesianVector<Distance, astro::frames::earth::icrf>& target
    ) const;

  private:
    Angle _halfConeAngle; // Half-cone angle defining the circular field of view
};

} // namespace trace
} // namespace astrea