Fixed leader drone not responding in land mode

This commit is contained in:
2023-02-08 21:53:01 +08:00
parent eec2609f88
commit d1280cf656
11 changed files with 145 additions and 70 deletions
+4 -3
View File
@@ -51,11 +51,12 @@ private:
global_location leader_location;
global_location current_location;
velocity drone_speed;
int flag = 0,heading_status = 0;
int flag = 0,heading_status = 0,buf = 0;
float pre_alt,cur_alt;
float leader_pid[3] = {0.5 , 0.000000000001 ,0.5};
float error_lon,error_lat;
float leader_pid[3] = {1 , 0.000000000001 ,0.5};
float follower_pid[3] = {1 , 0.00000000001 ,0.5};
float ignore_small = 0.20;
float ignore_small = 0.50;
void calculate_position(float k,float theta,int direction=0);
void spherical_coordinate(float k,float theta,float psi);