Loading...
Searching...
No Matches
FlightState.h
Go to the documentation of this file.
#ifndef FLIGHTSTATE_H
#define FLIGHTSTATE_H
#include <array>
class FlightState {
public:
FlightState();
const std::array<double, 3>& getPosition() const;
void setPosition(const std::array<double, 3>& pos);
const std::array<double, 3>& getVelocity() const;
void setVelocity(const std::array<double, 3>& vel);
const std::array<double, 3>& getAcceleration() const;
void setAcceleration(const std::array<double, 3>& acc);
const std::array<double, 4>& getOrientation() const;
void setOrientation(const std::array<double, 4>& quat);
const std::array<double, 3>& getAngularVelocity() const;
void setAngularVelocity(const std::array<double, 3>& angVel);
double getTime() const;
void setTime(double time);
private:
std::array<double, 3> position_;
std::array<double, 3> velocity_;
std::array<double, 3> acceleration_;
std::array<double, 4> orientation_;
std::array<double, 3> angularVelocity_;
double time_;
};
#endif // FLIGHTSTATE_H
FlightState::FlightState
FlightState()
Default constructor. Initializes to zero state.
Definition FlightState.cpp:6
FlightState::setOrientation
void setOrientation(const std::array< double, 4 > &quat)
Sets the current orientation quaternion.
Definition FlightState.cpp:45
FlightState::getAcceleration
const std::array< double, 3 > & getAcceleration() const
Gets the current acceleration vector.
Definition FlightState.cpp:33
FlightState::getOrientation
const std::array< double, 4 > & getOrientation() const
Gets the current orientation quaternion.
Definition FlightState.cpp:41
FlightState::setVelocity
void setVelocity(const std::array< double, 3 > &vel)
Sets the current velocity vector.
Definition FlightState.cpp:29
FlightState::setAngularVelocity
void setAngularVelocity(const std::array< double, 3 > &angVel)
Sets the current angular velocity vector.
Definition FlightState.cpp:53
FlightState::acceleration_
std::array< double, 3 > acceleration_
(ax, ay, az) acceleration in m/s2.
Definition FlightState.h:94
FlightState::time_
double time_
Elapsed simulation time [s].
Definition FlightState.h:99
FlightState::orientation_
std::array< double, 4 > orientation_
Orientation quaternion (w, x, y, z).
Definition FlightState.h:96
FlightState::angularVelocity_
std::array< double, 3 > angularVelocity_
Angular rates (roll, pitch, yaw) in rad/s.
Definition FlightState.h:97
FlightState::setPosition
void setPosition(const std::array< double, 3 > &pos)
Sets the current position vector.
Definition FlightState.cpp:21
FlightState::getPosition
const std::array< double, 3 > & getPosition() const
Gets the current position vector.
Definition FlightState.cpp:17
FlightState::velocity_
std::array< double, 3 > velocity_
(vx, vy, vz) velocity in m/s.
Definition FlightState.h:93
FlightState::getVelocity
const std::array< double, 3 > & getVelocity() const
Gets the current velocity vector.
Definition FlightState.cpp:25
FlightState::getTime
double getTime() const
Gets the elapsed simulation time.
Definition FlightState.cpp:57
FlightState::getAngularVelocity
const std::array< double, 3 > & getAngularVelocity() const
Gets the current angular velocity vector.
Definition FlightState.cpp:49
FlightState::setTime
void setTime(double time)
Sets the elapsed simulation time.
Definition FlightState.cpp:61
FlightState::position_
std::array< double, 3 > position_
(x, y, z) position in meters.
Definition FlightState.h:92
FlightState::setAcceleration
void setAcceleration(const std::array< double, 3 > &acc)
Sets the current acceleration vector.
Definition FlightState.cpp:37