Skip to content

Commit

Permalink
Fix center angle tvc set
Browse files Browse the repository at this point in the history
  • Loading branch information
gabekole committed Oct 5, 2024
1 parent 4f970c8 commit fc18ffa
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hardware/TVC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ void TVC::SetXServo(double angle_rad)
double degrees = angle_rad * MissionConstants::kRad2Deg;
double servoAngle = -.000095801*powf(degrees, 4) - .0027781*powf(degrees, 3) + .0012874*powf(degrees, 2) - 3.1271*degrees -16.129;

servoAngle += 90 + MissionConstants::kTvcYCenterAngle;
servoAngle += 90 + MissionConstants::kTvcXCenterAngle;
servoAngle = (servoAngle < 0) ? 0 : servoAngle;
servoAngle = (servoAngle > 180) ? 180 : servoAngle;

Expand Down
2 changes: 1 addition & 1 deletion include/RF.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class RF {
uint16_t mode;
float euler[3];
float velocity[3];
float input[2];
float input[2];
float dt;

uint32_t footer;
Expand Down
2 changes: 0 additions & 2 deletions src/Mode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ Mode::Phase Mode::UpdateCalibration(Navigation& navigation, Controller& controll
static float YTVC = 0.0;

RF::Command command = RF::GetInstance().GetCommand();


if(command == RF::Command::IncrementXTVC){
XTVC += 0.1;
ostringstream os;
Expand Down

0 comments on commit fc18ffa

Please sign in to comment.