修改了一点参数

This commit is contained in:
2025-12-05 13:27:42 +08:00
parent b4c795f77d
commit 93935889e0

View File

@@ -6,7 +6,7 @@
#include <thread> #include <thread>
#include <memory> #include <memory>
#include <unistd.h> #include <unistd.h>
#include <math.h>
#include <opencv2/opencv.hpp> #include <opencv2/opencv.hpp>
#include <opencv2/tracking.hpp> #include <opencv2/tracking.hpp>
@@ -30,13 +30,13 @@ void output_control_data(const cv::Point2f* ballistic_point,
std::ostringstream send_str; std::ostringstream send_str;
// Calculate offset (based on actual image center) // Calculate offset (based on actual image center)
int ballistic_offset_x = -static_cast<int>(ballistic_point->x - img_center.x); int ballistic_offset_yaw = 1.9*-static_cast<int>(ballistic_point->x - img_center.x);
if ( abs(ballistic_offset_x) > 320){ if ( abs(ballistic_offset_yaw) > 320){
ballistic_offset_x = ( ballistic_offset_x / abs( ballistic_offset_x ) ) * 320 ; ballistic_offset_yaw = ( ballistic_offset_yaw / abs( ballistic_offset_yaw ) ) * 220 ;
} }
int ballistic_offset_y = -static_cast<int>(img_center.y - ballistic_point->y); int ballistic_offset_pitch = 1.9*-static_cast<int>(img_center.y - ballistic_point->y);
if ( abs(ballistic_offset_y) > 180 ) { if ( abs(ballistic_offset_pitch) > 180 ) {
ballistic_offset_y = ( ballistic_offset_x / abs( ballistic_offset_x ) ) * 180 ; ballistic_offset_pitch = ( ballistic_offset_pitch / abs( ballistic_offset_pitch ) ) * 180*1.9 ;
} }
// Color simplification mapping // Color simplification mapping