updated xbee list, takeoff height and hidden target gps list

This commit is contained in:
dave 2018-11-18 15:34:19 +01:00
parent 4fbdb07ce4
commit f51bf10482
3 changed files with 30 additions and 8 deletions

View File

@ -1,4 +1,10 @@
1,-73.609219,45.510336,1 1,-13.710661,29.020850,10.0,1
2,-73.608913,45.510723,0 2,-13.711061,29.020946,10.0,0
3,-73.610035,45.510182,1 3,-13.711605,29.020421,10.0,1
4,-73.609235,45.510114,0 4,-13.711925,29.020003,10.0,0
5,-13.712166,29.020435,10.0,1
6,-13.710498,29.020341,10.0,0
7,-13.711506,29.019919,10.0,0
8,-13.712048,29.020385,10.0,0
9,-13.711514,29.020261,10.0,1
10,-13.711621,29.020725,10.0,1
1 1 -73.609219 -13.710661 45.510336 29.020850 10.0 1
2 2 -73.608913 -13.711061 45.510723 29.020946 10.0 0
3 3 -73.610035 -13.711605 45.510182 29.020421 10.0 1
4 4 -73.609235 -13.711925 45.510114 29.020003 10.0 0
5 5 -13.712166 29.020435 10.0 1
6 6 -13.710498 29.020341 10.0 0
7 7 -13.711506 29.019919 10.0 0
8 8 -13.712048 29.020385 10.0 0
9 9 -13.711514 29.020261 10.0 1
10 10 -13.711621 29.020725 10.0 1

View File

@ -12,5 +12,14 @@ takeoff_heights ={
.16 = 9.0, .16 = 9.0,
.17 = 3.0, .17 = 3.0,
.18 = 6.0, .18 = 6.0,
.19 = 9.0 .19 = 9.0,
.20 = 3.0,
.21 = 3.0,
.22 = 3.0,
.23 = 0.0,
.24 = 38.0,
.25 = 34.0,
.26 = 25.0,
.27 = 42.0,
.28 = 29.0
} }

View File

@ -195,12 +195,13 @@ void parse_gpslist()
double lon = atof(strtok(NULL, DELIMS)); double lon = atof(strtok(NULL, DELIMS));
double lat = atof(strtok(NULL, DELIMS)); double lat = atof(strtok(NULL, DELIMS));
int alt = atoi(strtok(NULL, DELIMS)); int alt = atoi(strtok(NULL, DELIMS));
// int tilt = atoi(strtok(NULL, DELIMS)); int tilt = atoi(strtok(NULL, DELIMS));
// DEBUG // DEBUG
// ROS_INFO("%.6f, %.6f, %i %i %i",lat, lon, alt, tilt, tid); // ROS_INFO("%.6f, %.6f, %i %i %i",lat, lon, alt, tilt, tid);
RB_arr.latitude = lat; RB_arr.latitude = lat;
RB_arr.longitude = lon; RB_arr.longitude = lon;
RB_arr.altitude = alt; RB_arr.altitude = alt;
RB_arr.r = tilt;
// Insert elements. // Insert elements.
map<int, buzz_utility::RB_struct>::iterator it = wplist_map.find(tid); map<int, buzz_utility::RB_struct>::iterator it = wplist_map.find(tid);
if (it != wplist_map.end()) if (it != wplist_map.end())
@ -227,8 +228,14 @@ void check_targets_sim(double lat, double lon, double *res)
double ref[2]={lat, lon}; double ref[2]={lat, lon};
double tar[2]={it->second.latitude, it->second.longitude}; double tar[2]={it->second.latitude, it->second.longitude};
rb_from_gps(tar, rb, ref); rb_from_gps(tar, rb, ref);
if(rb[0] < visibility_radius){ if(rb[0] < visibility_radius && (buzz_utility::get_bvmstate()=="WAYPOINT" && it->second.r==0)){
ROS_WARN("FOUND A TARGET!!! [%i]", it->first); ROS_WARN("FOUND A TARGET IN WAYPOINT!!! [%i]", it->first);
res[0] = it->first;
res[1] = it->second.latitude;
res[2] = it->second.longitude;
res[3] = it->second.altitude;
} else if(rb[0] < visibility_radius && (buzz_utility::get_bvmstate()=="DEPLOY" && it->second.r==1)){
ROS_WARN("FOUND A TARGET IN WAYPOINT!!! [%i]", it->first);
res[0] = it->first; res[0] = it->first;
res[1] = it->second.latitude; res[1] = it->second.latitude;
res[2] = it->second.longitude; res[2] = it->second.longitude;