41static constexpr float YAW_GAIN_LIMIT =
43static constexpr float PITCH_GAIN_LIMIT =
60 explicit Follower(std::chrono::milliseconds updatePeriod);
102 bool setMaxGain(
float yawGainNew,
float pitchGainNew);
121 void step()
override;
152 Eigen::Vector2f getAntennaCoordinates();
157 Eigen::Vector3f getRocketNASOrigin();
160 std::chrono::milliseconds updatePeriod;
163 const uint8_t maxInitRetries = 120;
165 bool antennaCoordinatesSet =
false;
166 bool rocketCoordinatesSet =
false;
167 bool lastRocketNasStateSet =
false;
168 std::atomic<bool> firstAntennaAttitudeSet{
false};
177 Eigen::Vector2f antennaCoordinates;
180 Eigen::Vector3f rocketNASOrigin;
183 Eigen::Vector2f antennaRocketDistance;
193 miosix::FastMutex followerMutex;
195 float yawGain = YAW_GAIN_LIMIT;
196 float pitchGain = PITCH_GAIN_LIMIT;
Follower class to output the yaw ad pitch necessary to track from the GPS origin the rocket....
FollowerState getState()
Synchronized getter for the State of the follower algorithm.
AntennaAngles getTargetAngles()
Getter for the target antenna position computed by the algorithm.
bool setMaxGain(float yawGainNew, float pitchGainNew)
Set the maximum gain for the yaw and pitch.
void setLastRocketNasState(const NASState &nasState)
Setter for the NAS state of the rocket.
bool init() override
Check that both the antenna and rocket coordinates have been set.
void setLastAntennaAttitude(const VN300Data &attitudeData)
Setter for the attitude of the antenna.
void setRocketNASOrigin(const GPSData &gpsData)
Setter for the GPS coordinates of the rocket's NAS origin reference.
void setAntennaCoordinates(const GPSData &gpsData)
Setter for the GPS coordinates of the antenna.
static PrintLogger getLogger(const string &name)
Driver for the VN100S IMU.
A structure for storing angles relative to the NED frame.
State of the Follower algorithm, with the angles and speeds.
Structure to handle GPS data.