more coord. fixes

This commit is contained in:
David St-Onge 2017-01-26 19:49:08 -05:00
parent 1ac062ea3d
commit 641e07fe81
3 changed files with 3 additions and 2 deletions

View File

@ -79,7 +79,7 @@ int buzzuav_goto(buzzvm_t vm) {
goto_pos[1]=cur_pos[1]+dlon*180/3.1416;
goto_pos[2]=cur_pos[2];
cur_cmd=mavros_msgs::CommandCode::NAV_WAYPOINT;
printf(" Buzz requested Go To, to Latitude: %15f , Longitude: %15f, Altitude: %15f \n",goto_pos[0],goto_pos[1],goto_pos[2]);
printf(" Buzz requested Go To, to Latitude: %.7f , Longitude: %.7f, Altitude: %.7f \n",goto_pos[0],goto_pos[1],goto_pos[2]);
buzz_cmd=2;
return buzzvm_ret0(vm);
}

View File

@ -328,6 +328,7 @@ namespace rosbzz_node{
cvt_spherical_coordinates(neighbours_pos_payload, cvt_neighbours_pos_payload);
/*Extract robot id of the neighbour*/
uint16_t* out = buzz_utility::u64_cvt_u16((uint64_t)*(message_obt+3));
cout << "Rel Pos of " << out << ": " << cvt_neighbours_pos_payload[0] << ", "<< cvt_neighbours_pos_payload[2] << ", "<< cvt_neighbours_pos_payload[3] << endl;
/*pass neighbour position to local maintaner*/
buzz_utility::Pos_struct n_pos(cvt_neighbours_pos_payload[0],cvt_neighbours_pos_payload[1],cvt_neighbours_pos_payload[2]);
/*Put RID and pos*/

View File

@ -34,7 +34,7 @@ function hexagon() {
math.vec2.scale(accum, 1.0 / neighbors.count())
# Move according to vector
print("Robot ", id, "must push ",accum.x, "; ", accum.y)
uav_goto(accum.x+position.latitude, accum.y+position.longitude, TARGET_ALTITUDE)
uav_goto(accum.x, accum.y)
}
########################################