Skyward boardcore
Loading...
Searching...
No Matches
Boardcore::Propagator Class Reference

Predictor class that linearly propagates the last available rocket position by means of the rocket NAS velocity. More...

#include <Propagator.h>

Inheritance diagram for Boardcore::Propagator:
Collaboration diagram for Boardcore::Propagator:

Public Member Functions

 Propagator (std::chrono::milliseconds updatePeriod)
 Constructor of the propagator class.
 
bool init () override
 Dummy init since we don't have to setup anything.
 
void setRocketNasState (const NASState &newRocketNasState)
 Synchronized setter for the latest rocket nas state. Also notifies the predictor of a new packet arrival.
 
NASState getRocketNasState ()
 Synchronized getter for the last rocket NAS State passed to the propagator.
 
PropagatorState getState ()
 Synchronized getter for the State of the predictor.
 
- Public Member Functions inherited from Boardcore::Algorithm
void begin ()
 Starts the execution of the algorithm and set the running flag to true.
 
void end ()
 Terminates the algorithm's execution and sets the running flag to false.
 
void update ()
 Checks wether the algorithm is in a running state or not, and eventually calls the.
 
bool isRunning ()
 

Additional Inherited Members

- Protected Attributes inherited from Boardcore::Algorithm
std::atomic< bool > running {false}
 

Detailed Description

Predictor class that linearly propagates the last available rocket position by means of the rocket NAS velocity.

Definition at line 50 of file Propagator.h.

Constructor & Destructor Documentation

◆ Propagator()

Boardcore::Propagator::Propagator ( std::chrono::milliseconds updatePeriod)
explicit

Constructor of the propagator class.

Parameters
updatePeriodThe period of update of the predictor algorithm [ms].

Definition at line 37 of file Propagator.cpp.

Member Function Documentation

◆ getRocketNasState()

NASState Boardcore::Propagator::getRocketNasState ( )
inline

Synchronized getter for the last rocket NAS State passed to the propagator.

Returns
The last NAS state of the rocket.

Definition at line 80 of file Propagator.h.

◆ getState()

PropagatorState Boardcore::Propagator::getState ( )
inline

Synchronized getter for the State of the predictor.

Returns
The state of the predictor.

Definition at line 91 of file Propagator.h.

◆ init()

bool Boardcore::Propagator::init ( )
overridevirtual

Dummy init since we don't have to setup anything.

Returns
True.

Implements Boardcore::Algorithm.

Definition at line 42 of file Propagator.cpp.

◆ setRocketNasState()

void Boardcore::Propagator::setRocketNasState ( const NASState & newRocketNasState)

Synchronized setter for the latest rocket nas state. Also notifies the predictor of a new packet arrival.

Parameters
newRocketNasStateThe updated NAS state of the rocket.

Definition at line 105 of file Propagator.cpp.


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