34static constexpr bool useAcceleration =
38 : updatePeriod(static_cast<float>(pUpdatePeriod.count()) / 1000), state()
44void Propagator::step()
46 miosix::Lock<miosix::FastMutex> lock(stateMutex);
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);
111 lastRocketNasState = newRocketNasState;
LoggerResult log(const T &t)
Call this function to log a class.
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.
Driver for the VN100S IMU.
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.