Loading...
Searching...
No Matches
FlightState Class Reference

Represents the physical state of the rocket at a given simulation time. More...

`#include <FlightState.h>`

## Public Member Functions

| FlightState ()
| Default constructor. Initializes to zero state.
const std::array< double, 3 > & | getPosition () const
| Gets the current position vector.
void | setPosition (const std::array< double, 3 > &pos)
| Sets the current position vector.
const std::array< double, 3 > & | getVelocity () const
| Gets the current velocity vector.
void | setVelocity (const std::array< double, 3 > &vel)
| Sets the current velocity vector.
const std::array< double, 3 > & | getAcceleration () const
| Gets the current acceleration vector.
void | setAcceleration (const std::array< double, 3 > &acc)
| Sets the current acceleration vector.
const std::array< double, 4 > & | getOrientation () const
| Gets the current orientation quaternion.
void | setOrientation (const std::array< double, 4 > &quat)
| Sets the current orientation quaternion.
const std::array< double, 3 > & | getAngularVelocity () const
| Gets the current angular velocity vector.
void | setAngularVelocity (const std::array< double, 3 > &angVel)
| Sets the current angular velocity vector.
double | getTime () const
| Gets the elapsed simulation time.
void | setTime (double time)
| Sets the elapsed simulation time.

## Private Attributes

std::array< double, 3 > | position_
| (x, y, z) position in meters.
std::array< double, 3 > | velocity_
| (vx, vy, vz) velocity in m/s.
std::array< double, 3 > | acceleration_
| (ax, ay, az) acceleration in m/s2.
std::array< double, 4 > | orientation_
| Orientation quaternion (w, x, y, z).
std::array< double, 3 > | angularVelocity_
| Angular rates (roll, pitch, yaw) in rad/s.
double | time_
| Elapsed simulation time [s].

## Detailed Description

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.

## Constructor & Destructor Documentation

## FlightState()

FlightState::FlightState | ( |  | ) |

Default constructor. Initializes to zero state.

## Member Function Documentation

## getAcceleration()

const std::array< double, 3 > & FlightState::getAcceleration | ( |  | ) | const

Gets the current acceleration vector.

Returns
  Acceleration (ax, ay, az) in meters per second squared.

Here is the caller graph for this function:

## getAngularVelocity()

const std::array< double, 3 > & FlightState::getAngularVelocity | ( |  | ) | const

Gets the current angular velocity vector.

Returns
  Angular velocity (roll rate, pitch rate, yaw rate) in radians per second.

Here is the caller graph for this function:

## getOrientation()

const std::array< double, 4 > & FlightState::getOrientation | ( |  | ) | const

Gets the current orientation quaternion.

Returns
  Orientation quaternion (w, x, y, z).

Here is the caller graph for this function:

## getPosition()

const std::array< double, 3 > & FlightState::getPosition | ( |  | ) | const

Gets the current position vector.

Returns
  Position (x, y, z) in meters.

Here is the caller graph for this function:

## getTime()

double FlightState::getTime | ( |  | ) | const

Gets the elapsed simulation time.

Returns
  Elapsed time in seconds.

Here is the caller graph for this function:

## getVelocity()

const std::array< double, 3 > & FlightState::getVelocity | ( |  | ) | const

Gets the current velocity vector.

Returns
  Velocity (vx, vy, vz) in meters per second.

Here is the caller graph for this function:

## setAcceleration()

void FlightState::setAcceleration | ( | const std::array< double, 3 > & | acc | ) |

Sets the current acceleration vector.

Parameters

  acc | Acceleration (ax, ay, az) in meters per second squared.

Here is the caller graph for this function:

## setAngularVelocity()

void FlightState::setAngularVelocity | ( | const std::array< double, 3 > & | angVel | ) |

Sets the current angular velocity vector.

Parameters

  angVel | Angular velocity (roll rate, pitch rate, yaw rate) in radians per second.

Here is the caller graph for this function:

## setOrientation()

void FlightState::setOrientation | ( | const std::array< double, 4 > & | quat | ) |

Sets the current orientation quaternion.

Parameters

  quat | Orientation quaternion (w, x, y, z).

Here is the caller graph for this function:

## setPosition()

void FlightState::setPosition | ( | const std::array< double, 3 > & | pos | ) |

Sets the current position vector.

Parameters

  pos | Position (x, y, z) in meters.

Here is the caller graph for this function:

## setTime()

void FlightState::setTime | ( | double | time | ) |

Sets the elapsed simulation time.

Parameters

  time | Time in seconds.

Here is the caller graph for this function:

## setVelocity()

void FlightState::setVelocity | ( | const std::array< double, 3 > & | vel | ) |

Sets the current velocity vector.

Parameters

  vel | Velocity (vx, vy, vz) in meters per second.

Here is the caller graph for this function:

## Member Data Documentation

## acceleration_

std::array<double, 3> FlightState::acceleration_

private

(ax, ay, az) acceleration in m/s2.

## angularVelocity_

std::array<double, 3> FlightState::angularVelocity_

private

Angular rates (roll, pitch, yaw) in rad/s.

## orientation_

std::array<double, 4> FlightState::orientation_

private

Orientation quaternion (w, x, y, z).

## position_

std::array<double, 3> FlightState::position_

private

(x, y, z) position in meters.

## time_

double FlightState::time_

private

Elapsed simulation time [s].

## velocity_

std::array<double, 3> FlightState::velocity_

private

(vx, vy, vz) velocity in m/s.

The documentation for this class was generated from the following files:

- include/FlightState.h
- src/FlightState.cpp