34static constexpr bool useAcceleration =
38 : updatePeriod(static_cast<float>(pUpdatePeriod.count()) / 1000), state()
44void Propagator::step()
46 miosix::Lock<miosix::FastMutex> lock(stateMutex);
54 state = (oldState.nPropagations == 0
56 oldState.timestamp, oldState.nPropagations,
70 if (dt > 0 && dt < MAX_ACCELERATION_TIME.count() && t0 != 0)
80 if (useAcceleration &&
88 lastReceivedTime + MAX_PROPAGATION_TIME.count() ||
101 PropagatorState logState(state);
107 miosix::Lock<miosix::FastMutex> lockState(stateMutex);
108 miosix::Lock<miosix::FastMutex> lock(nasStateMutex);
112 lastRocketNasState = newRocketNasState;
NASState getRocketNasState()
Synchronized getter for the last rocket NAS State passed to the propagator.
void setRocketNasState(const NASState &newRocketNasState)
Synchronized setter for the latest rocket nas state. Also notifies the predictor of a new packet arri...
Propagator(std::chrono::milliseconds updatePeriod)
Constructor of the propagator class.
bool init() override
Dummy init since we don't have to setup anything.
static Logger & getInstance()
uint64_t getTimestamp()
Returns the current timer value in microseconds.
This file includes all the types the logdecoder script will decode.
State of the propagator, taking into account the prediction steps (0 if true NAS state) and the propa...
Eigen::Vector3f getVelocity()
Getter for the vector of velocities NED.
void setZAcceleration(Eigen::Vector3f acc)
Setter for the vector acceleration(only z-axis)
Eigen::Vector3f getPosition()
Getter for the vector of positions NED.
void setPosition(Eigen::Vector3f xProp)
Setter for the vector of positions NED.
void setVelocity(Eigen::Vector3f vProp)
Setter for the vector of velocities NED.
uint32_t nPropagations
Predictions from last received NAS state.
uint64_t timestamp
Prediction timestamp (ARP timestamp) [ms].
Eigen::Vector3f getAcceleration() const
Getter for the vector acceleration.