15 #include "matrixlib.h"
17 #include <MatrixLib/MatrixLib.h>
37 ml_matrix gain_a_pitch;
39 ml_matrix gain_b_pitch;
41 ml_matrix gain_c_pitch;
43 ml_matrix gain_d_pitch;
45 ml_matrix gain_a_roll;
47 ml_matrix gain_b_roll;
49 ml_matrix gain_c_roll;
51 ml_matrix gain_d_roll;
70 ml_matrix axis_command;
82 int pitch_initialized;
88 ml_matrix body_vector_command;
90 ml_matrix eci_vector_command;
92 ml_matrix q_target_last;
103 void Initialize( ml_matrix a, ml_matrix b, ml_matrix c, ml_matrix d,
double angle, ml_matrix inr );
105 void InitializePitch( ml_matrix a, ml_matrix b, ml_matrix c, ml_matrix d,
double angle, ml_matrix inr );
107 void InitializeRoll( ml_matrix a, ml_matrix b, ml_matrix c, ml_matrix d,
double angle, ml_matrix inr );
109 void InitializeYaw( ml_matrix a, ml_matrix b, ml_matrix c, ml_matrix d,
double angle, ml_matrix inr );
113 ml_matrix
Update( ml_matrix q_eci_to_body );
123 void SetInertia( ml_matrix inertia ){this->inertia = inertia;};
Definition: sc_pid3axis.h:33
void Reset(void)
Reset the pid.
Definition: sc_pid3axis.cc:150
ml_matrix Update(ml_matrix q_eci_to_body)
Update the output.
Definition: sc_pid3axis.cc:271
void Initialize(ml_matrix a, ml_matrix b, ml_matrix c, ml_matrix d, double angle, ml_matrix inr)
Initialize all state matrices.
Definition: sc_pid3axis.cc:43
bool GetStatus(void)
Get the PID status.
Definition: sc_pid3axis.cc:124
void SetRotateCommand(ml_matrix axis, double angle)
Set the rotate command.
Definition: sc_pid3axis.cc:165
ml_matrix GetInertia(void)
Get the inertia.
Definition: sc_pid3axis.cc:259
ml_matrix q_desired_state
Target quaternion.
Definition: sc_pid3axis.h:98
void SetAlignCommand(ml_matrix body_vector, ml_matrix eci_vector)
Set the align command.
Definition: sc_pid3axis.cc:184
void AddWindupCompensation(ml_matrix l, ml_matrix saturation)
Add windup compensation.
Definition: sc_pid3axis.cc:136
void InitializeYaw(ml_matrix a, ml_matrix b, ml_matrix c, ml_matrix d, double angle, ml_matrix inr)
Initialize yaw matrices.
Definition: sc_pid3axis.cc:103
void SetDesQuat(ml_matrix qdes)
Set the desired quaternion.
Definition: sc_pid3axis.cc:242
ml_matrix GetDesQuat(void)
Set the desired quaternion to the default.
Definition: sc_pid3axis.cc:251
void SetMaximumDeltaAngle(double delta)
Set the maximum delta per step.
Definition: sc_pid3axis.h:133
void SetAlignAndRotateCommand(ml_matrix body_vector, ml_matrix eci_vector, double angle)
Set the align and rotate command.
Definition: sc_pid3axis.cc:210
void InitializePitch(ml_matrix a, ml_matrix b, ml_matrix c, ml_matrix d, double angle, ml_matrix inr)
Initialize pitch matrices.
Definition: sc_pid3axis.cc:69
void SetInertia(ml_matrix inertia)
Set the inertia.
Definition: sc_pid3axis.h:123
void InitializeRoll(ml_matrix a, ml_matrix b, ml_matrix c, ml_matrix d, double angle, ml_matrix inr)
Initialize roll matrices.
Definition: sc_pid3axis.cc:86
PID3Axis(void)
Constructor.
Definition: sc_pid3axis.cc:17