修改了参数
This commit is contained in:
@@ -82,12 +82,12 @@ void output_control_data(const cv::Point2f* ballistic_point,
|
||||
|
||||
// Convert PID outputs to the expected format
|
||||
// The PID output might be large, so we might need to scale it
|
||||
int ballistic_offset_yaw = static_cast<int>(pid_yaw_output);
|
||||
int ballistic_offset_pitch = static_cast<int>(pid_pitch_output);
|
||||
int ballistic_offset_yaw = 1.9*-static_cast<int>(pid_yaw_output);
|
||||
int ballistic_offset_pitch = 1.9*-static_cast<int>(pid_pitch_output);
|
||||
|
||||
// Apply same limits as before
|
||||
if (abs(ballistic_offset_yaw) > 320) {
|
||||
ballistic_offset_yaw = (ballistic_offset_yaw / abs(ballistic_offset_yaw)) * 220; // Keep the scale factor
|
||||
ballistic_offset_yaw = (ballistic_offset_yaw / abs(ballistic_offset_yaw)) * 220*1.9; // Keep the scale factor
|
||||
}
|
||||
if (abs(ballistic_offset_pitch) > 180) {
|
||||
// Use the same scale factor as before
|
||||
|
||||
Reference in New Issue
Block a user