#ifndef FLIGHTSTATE_H #define FLIGHTSTATE_H #include /** * @brief Represents the physical state of the rocket at a given simulation time. * * The FlightState contains position, velocity, acceleration, orientation, * and angular velocity information, future-proofed for 6-DoF dynamics. */ class FlightState { public: /** * @brief Default constructor. Initializes to zero state. */ FlightState(); /** * @brief Gets the current position vector. * @return Position (x, y, z) in meters. */ const std::array& getPosition() const; /** * @brief Sets the current position vector. * @param pos Position (x, y, z) in meters. */ void setPosition(const std::array& pos); /** * @brief Gets the current velocity vector. * @return Velocity (vx, vy, vz) in meters per second. */ const std::array& getVelocity() const; /** * @brief Sets the current velocity vector. * @param vel Velocity (vx, vy, vz) in meters per second. */ void setVelocity(const std::array& vel); /** * @brief Gets the current acceleration vector. * @return Acceleration (ax, ay, az) in meters per second squared. */ const std::array& getAcceleration() const; /** * @brief Sets the current acceleration vector. * @param acc Acceleration (ax, ay, az) in meters per second squared. */ void setAcceleration(const std::array& acc); /** * @brief Gets the current orientation quaternion. * @return Orientation quaternion (w, x, y, z). */ const std::array& getOrientation() const; /** * @brief Sets the current orientation quaternion. * @param quat Orientation quaternion (w, x, y, z). */ void setOrientation(const std::array& quat); /** * @brief Gets the current angular velocity vector. * @return Angular velocity (roll rate, pitch rate, yaw rate) in radians per second. */ const std::array& getAngularVelocity() const; /** * @brief Sets the current angular velocity vector. * @param angVel Angular velocity (roll rate, pitch rate, yaw rate) in radians per second. */ void setAngularVelocity(const std::array& angVel); /** * @brief Gets the elapsed simulation time. * @return Elapsed time in seconds. */ double getTime() const; /** * @brief Sets the elapsed simulation time. * @param time Time in seconds. */ void setTime(double time); private: std::array position_; ///< (x, y, z) position in meters. std::array velocity_; ///< (vx, vy, vz) velocity in m/s. std::array acceleration_; ///< (ax, ay, az) acceleration in m/s2. std::array orientation_; ///< Orientation quaternion (w, x, y, z). std::array angularVelocity_; ///< Angular rates (roll, pitch, yaw) in rad/s. double time_; ///< Elapsed simulation time [s]. }; #endif // FLIGHTSTATE_H