test bio drones

This commit is contained in:
2023-03-27 16:03:37 +08:00
parent d40ddbe239
commit 4b8cc0278f
13 changed files with 196 additions and 100 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ result check_leader(global_location* data, size_t index){
check_ID = std::distance(_d.begin(),std::min_element(_d.begin(),_d.end())); //get minimum value's index
_result.leader_ID = check_ID + 1;
std::cout <<"Drone " << _result.leader_ID << " is leader " << std::endl;
// std::cout <<"Drone " << _result.leader_ID << " is leader " << std::endl;
if (data[1].ID == _result.leader_ID){
_result.is_leader = 1;
+2 -2
View File
@@ -36,8 +36,8 @@ public:
DroneStatus self;
DroneStatus samePlane[5];
void follower(global_location* member_data, size_t index, int refID);
int find_ref_drone(global_location* data[], size_t index, int leaderID);
void follower(global_location** member_data, size_t index, int refID);
int find_ref_drone(global_location** data, size_t index, int leaderID);
float lon[3],lat[3];