FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
serial::rotation_angle_utils Namespace Reference

Functions

RealType unit_to_radians (const RealType value, const params::RotationAngleUnit unit) noexcept
 
RealType radians_to_unit (const RealType value, const params::RotationAngleUnit unit) noexcept
 
math::RotationCoord external_rotation_to_internal (const RealType azimuth, const RealType elevation, const RealType time, const params::RotationAngleUnit unit) noexcept
 
math::RotationCoord external_rotation_rate_to_internal (const RealType azimuth_rate, const RealType elevation_rate, const RealType time, const params::RotationAngleUnit unit) noexcept
 
RealType internal_azimuth_to_external (const RealType azimuth, const params::RotationAngleUnit unit) noexcept
 
RealType internal_elevation_to_external (const RealType elevation, const params::RotationAngleUnit unit) noexcept
 
RealType internal_azimuth_rate_to_external (const RealType azimuth_rate, const params::RotationAngleUnit unit) noexcept
 
RealType internal_elevation_rate_to_external (const RealType elevation_rate, const params::RotationAngleUnit unit) noexcept
 

Function Documentation

◆ external_rotation_rate_to_internal()

math::RotationCoord serial::rotation_angle_utils::external_rotation_rate_to_internal ( const RealType  azimuth_rate,
const RealType  elevation_rate,
const RealType  time,
const params::RotationAngleUnit  unit 
)
noexcept

Definition at line 32 of file rotation_angle_utils.h.

35 {
36 return {-unit_to_radians(azimuth_rate, unit), unit_to_radians(elevation_rate, unit), time};
37 }
RealType unit_to_radians(const RealType value, const params::RotationAngleUnit unit) noexcept

References unit_to_radians().

Referenced by serial::xml_parser_utils::parseFixedRotation(), and serial::update_platform_paths_from_json().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ external_rotation_to_internal()

math::RotationCoord serial::rotation_angle_utils::external_rotation_to_internal ( const RealType  azimuth,
const RealType  elevation,
const RealType  time,
const params::RotationAngleUnit  unit 
)
noexcept

Definition at line 25 of file rotation_angle_utils.h.

28 {
29 return {(PI / 2.0) - unit_to_radians(azimuth, unit), unit_to_radians(elevation, unit), time};
30 }
constexpr RealType PI
Mathematical constant π (pi).
Definition config.h:43

References PI, and unit_to_radians().

Referenced by fers_get_interpolated_rotation_path(), math::from_json(), serial::xml_parser_utils::parseFixedRotation(), serial::xml_parser_utils::parseRotationPath(), and serial::update_platform_paths_from_json().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ internal_azimuth_rate_to_external()

RealType serial::rotation_angle_utils::internal_azimuth_rate_to_external ( const RealType  azimuth_rate,
const params::RotationAngleUnit  unit 
)
noexcept

Definition at line 50 of file rotation_angle_utils.h.

52 {
53 return radians_to_unit(-azimuth_rate, unit);
54 }
RealType radians_to_unit(const RealType value, const params::RotationAngleUnit unit) noexcept

References radians_to_unit().

Referenced by serial::xml_serializer_utils::serializeRotation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ internal_azimuth_to_external()

RealType serial::rotation_angle_utils::internal_azimuth_to_external ( const RealType  azimuth,
const params::RotationAngleUnit  unit 
)
noexcept

Definition at line 39 of file rotation_angle_utils.h.

40 {
41 return radians_to_unit((PI / 2.0) - azimuth, unit);
42 }

References PI, and radians_to_unit().

Referenced by fers_get_interpolated_rotation_path(), serial::kml_generator_utils::generateDirectionalAntennaKml(), serial::xml_serializer_utils::serializeRotation(), and math::to_json().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ internal_elevation_rate_to_external()

RealType serial::rotation_angle_utils::internal_elevation_rate_to_external ( const RealType  elevation_rate,
const params::RotationAngleUnit  unit 
)
noexcept

Definition at line 56 of file rotation_angle_utils.h.

58 {
59 return radians_to_unit(elevation_rate, unit);
60 }

References radians_to_unit().

Referenced by serial::xml_serializer_utils::serializeRotation().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ internal_elevation_to_external()

RealType serial::rotation_angle_utils::internal_elevation_to_external ( const RealType  elevation,
const params::RotationAngleUnit  unit 
)
noexcept

Definition at line 44 of file rotation_angle_utils.h.

46 {
47 return radians_to_unit(elevation, unit);
48 }

References radians_to_unit().

Referenced by fers_get_interpolated_rotation_path(), serial::kml_generator_utils::generateDirectionalAntennaKml(), serial::xml_serializer_utils::serializeRotation(), and math::to_json().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ radians_to_unit()

RealType serial::rotation_angle_utils::radians_to_unit ( const RealType  value,
const params::RotationAngleUnit  unit 
)
noexcept

Definition at line 20 of file rotation_angle_utils.h.

21 {
22 return unit == params::RotationAngleUnit::Degrees ? value * 180.0 / PI : value;
23 }
@ Degrees
Compass azimuth and elevation expressed in degrees.

References params::Degrees, and PI.

Referenced by internal_azimuth_rate_to_external(), internal_azimuth_to_external(), internal_elevation_rate_to_external(), and internal_elevation_to_external().

+ Here is the caller graph for this function:

◆ unit_to_radians()

RealType serial::rotation_angle_utils::unit_to_radians ( const RealType  value,
const params::RotationAngleUnit  unit 
)
noexcept

Definition at line 15 of file rotation_angle_utils.h.

16 {
17 return unit == params::RotationAngleUnit::Degrees ? value * (PI / 180.0) : value;
18 }

References params::Degrees, and PI.

Referenced by external_rotation_rate_to_internal(), and external_rotation_to_internal().

+ Here is the caller graph for this function: