energy changed
This commit is contained in:
@@ -80,6 +80,7 @@ private:
|
||||
float guess_polar_angle;//猜测的下一个目标装甲板极坐标角度
|
||||
float last_base_angle;//上一帧的各扇叶在0区(0°~72°)的基础角度
|
||||
float predict_rad;//预测提前角
|
||||
float predict_rad_norm;//预测提前角的绝对值
|
||||
float attack_distance;//步兵与风车平面距离
|
||||
float center_delta_yaw, center_delta_pitch;//对心时相差的角度
|
||||
float yaw_rotation, pitch_rotation;//云台yaw轴和pitch轴应该转到的角度
|
||||
|
||||
@@ -46,6 +46,7 @@ void Energy::initEnergy() {
|
||||
guess_polar_angle = -1000;
|
||||
last_base_angle = -1000;
|
||||
predict_rad = 25;
|
||||
predict_rad_norm = 25;
|
||||
attack_distance = ATTACK_DISTANCE;
|
||||
center_delta_yaw = 1000;
|
||||
center_delta_pitch = 1000;
|
||||
|
||||
@@ -16,11 +16,9 @@ using std::vector;
|
||||
// ---------------------------------------------------------------------------------------------------------------------
|
||||
void Energy::getPredictPoint(cv::Point target_point) {
|
||||
if (is_big) {
|
||||
if (energy_rotation_direction == 1) rotate(target_point);
|
||||
if (energy_rotation_direction == -1) {
|
||||
predict_rad = -25;
|
||||
rotate(target_point);
|
||||
}
|
||||
if (energy_rotation_direction == 1) predict_rad = predict_rad_norm;
|
||||
else if (energy_rotation_direction == -1) predict_rad = -predict_rad_norm;
|
||||
rotate(target_point);
|
||||
} else if (is_small) predict_point = target_point;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user