Skip to content

Rotational Path (Fixed Rate)

David Young edited this page Apr 30, 2025 · 1 revision

Description

Defines the orientation (pointing direction) of a platform using a fixed starting orientation and constant angular rates for elevation and azimuth. This provides a simple way to model continuous, steady rotation. The resulting orientation at any given time t is calculated as start_angles + angular_rates * t, with angle wrap-around applied. The orientation is returned as a spherical coordinate vector (SVec3) representing the pointing direction.

Assumptions

  • Assumes the starting angles (_start member of RotationPath, specified in radians) are correct.
  • Assumes the constant angular rates (_rate member of RotationPath, specified in radians per second) are correct.
  • Assumes a constant angular velocity model is the desired behavior for the platform's rotation.

Limitations

  • Constant Velocity Only: This model exclusively represents constant angular velocity. It cannot model acceleration or changes in rotation rate over time.
  • Simple Angle Wrap-around: Uses a simple modulo operation (fmod) for wrapping angles (e.g., azimuth to [-Ο€, +Ο€] or [0, 2Ο€], elevation likely to [-Ο€/2, +Ο€/2]). This mathematical wrap-around might not perfectly represent the nuances of continuous, high-rate physical rotation depending on how the resulting angles are interpreted or used downstream.
  • Exclusive Usage: This rotation mode cannot be combined with waypoint-based rotation (INTERP_STATIC, INTERP_LINEAR, INTERP_CUBIC) for the same platform. The RotationPath object uses one interpolation type (_type = INTERP_CONSTANT for this mode).
  • Output Format: The getPosition method for this path type returns the orientation as a spherical coordinate vector (math::SVec3) with radius 1, representing the direction vector.

Related Components

  • Parsing: xml_parser.cpp (specifically parseFixedRotation function or similar logic handling the XML configuration for this mode).
  • Storage Class: rotation_path.h::RotationPath (stores start angles _start, rates _rate as math::RotationCoord, and type _type=INTERP_CONSTANT).
  • Logic: rotation_path.cpp::RotationPath::setConstantRate (initializes rates), rotation_path.cpp::RotationPath::getPosition (calculates orientation at time t, applies fmod wrap-around).
  • Data Structures: math::RotationCoord (stores elevation/azimuth pairs), math::SVec3 (spherical coordinate representation used for output).

Validation Status

  • Needs Verification: The implementation requires functional validation to ensure correctness.
  • Key Areas for Validation:
    • Accuracy of the orientation calculation (start + rate * t) against known inputs.
    • Correctness and behavior of the fmod angle wrap-around logic, especially near boundary conditions (e.g., crossing Β±Ο€ for azimuth).
    • Verification that this mode cannot be incorrectly combined with waypoint data in the XML configuration or during runtime.
    • Consistency of units (radians, radians/second) throughout calculation and configuration.
  • Priority: Medium (Core motion capability, relatively simple logic but fundamental to platform orientation).

Clone this wiki locally