修改了参数

This commit is contained in:
2025-12-05 14:28:33 +08:00
parent ac566a0cf6
commit 9e3cd439f0

View File

@@ -82,12 +82,12 @@ void output_control_data(const cv::Point2f* ballistic_point,
// Convert PID outputs to the expected format // Convert PID outputs to the expected format
// The PID output might be large, so we might need to scale it // 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_yaw = 1.9*-static_cast<int>(pid_yaw_output);
int ballistic_offset_pitch = static_cast<int>(pid_pitch_output); int ballistic_offset_pitch = 1.9*-static_cast<int>(pid_pitch_output);
// Apply same limits as before // Apply same limits as before
if (abs(ballistic_offset_yaw) > 320) { 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) { if (abs(ballistic_offset_pitch) > 180) {
// Use the same scale factor as before // Use the same scale factor as before