Skip to content

Commit

Permalink
Output u in telemetry
Browse files Browse the repository at this point in the history
  • Loading branch information
Hlpred committed Nov 23, 2024
1 parent 9859606 commit 54a77a5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/Controller.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,5 @@ class Controller{
void ResetKIteration(double current_time);
int GetCurrentIterationIndex();
Eigen::Matrix<double, 2, 8> GetCurrentKMatrix();

Eigen::Matrix<double, 2, 1> GetCurrentTVCCommand();
};
5 changes: 5 additions & 0 deletions src/Controller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -195,3 +195,8 @@ int Controller::GetCurrentIterationIndex()
{
return current_iteration_index;
}

Eigen::Matrix<double, 2, 1> Controller::GetCurrentTVCCommand()
{
return input;
}
4 changes: 3 additions & 1 deletion src/Telemetry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ void Telemetry::HardwareSaveFrame(Navigation& navigation, Controller& controller
for(int i = 0; i < 12; ++i){
HardwareSaved << std::to_string(navigation.GetNavigation()(i))<< ", ";
}
HardwareSaved << std::to_string(controller.GetCurrentTVCCommand()[0]) << ", ";
HardwareSaved << std::to_string(controller.GetCurrentTVCCommand()[1]) << ", ";
HardwareSaved << std::to_string(controller.GetCurrentIterationIndex());

std::tuple<double, double, double> linAc = navigation.GetLinearAcceleration();
Expand Down Expand Up @@ -145,7 +147,7 @@ Telemetry::Telemetry()
SensorSaved.open ("../logs/sensors"+str+".txt");


HardwareSaved << "Date, x, y, z, vx, vy, vz, phi, theta, psi, p, q, r, K_Matrix_Index \n";
HardwareSaved << "Date, x, y, z, vx, vy, vz, phi, theta, psi, p, q, r, ux, uy, K_Matrix_Index \n";
SensorSaved << "Date, accelX, accelY, accelZ, gyroX, gryoY, gyroZ \n";


Expand Down

0 comments on commit 54a77a5

Please sign in to comment.