26 const auto iter = std::lower_bound(_coords.begin(), _coords.end(), coord);
27 _coords.insert(iter, coord);
35 throw PathException(
"Finalize not called before getPosition in RotationPath.");
58 return {1, coord.azimuth, coord.elevation};
83 _type = InterpType::INTERP_CONSTANT;
Exception class for handling path-related errors.
void finalize()
Finalizes the rotation path for interpolation.
void setConstantRate(const RotationCoord &setstart, const RotationCoord &setrate) noexcept
Sets constant rate interpolation.
void setInterp(InterpType setinterp) noexcept
Sets the interpolation type for the path.
SVec3 getPosition(RealType t) const
Gets the rotational position at a given time.
InterpType
Enumeration for types of interpolation.
void addCoord(const RotationCoord &coord) noexcept
Adds a rotation coordinate to the path.
A class representing a vector in spherical coordinates.
double RealType
Type for real numbers.
constexpr RealType PI
Mathematical constant π (pi).
Coordinate and rotation structure operations.
Classes and operations for 3D geometry.
Utility functions for path interpolation and exception handling.
void getPositionLinear(RealType t, T &coord, const std::vector< T > &coords)
Performs linear interpolation between coordinate points.
void getPositionStatic(T &coord, const std::vector< T > &coords)
Interpolates a static position from a list of coordinates.
void finalizeCubic(const std::vector< T > &coords, std::vector< T > &dd)
Finalizes cubic spline interpolation by calculating second derivatives.
void getPositionCubic(RealType t, T &coord, const std::vector< T > &coords, const std::vector< T > &dd)
Performs cubic spline interpolation between coordinate points.
Defines the RotationPath class for handling rotational paths with different interpolation types.
Represents a rotation in terms of azimuth, elevation, and time.
RealType elevation
Elevation angle.
RealType azimuth
Azimuth angle.