From 07c22ebcd253f3ad03cf0552489d0e28110e678d Mon Sep 17 00:00:00 2001 From: David St-Onge Date: Thu, 26 Jan 2017 20:11:22 -0500 Subject: [PATCH] print tests --- src/roscontroller.cpp | 8 ++++---- src/test1.bzz | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/roscontroller.cpp b/src/roscontroller.cpp index 663d79c..71ead2b 100644 --- a/src/roscontroller.cpp +++ b/src/roscontroller.cpp @@ -249,8 +249,8 @@ namespace rosbzz_node{ /*convert from spherical to cartesian coordinate system callback */ void roscontroller::cvt_cartesian_coordinates(double spherical_pos_payload [], double out[]){ double latitude, longitude, rho; - latitude = spherical_pos_payload[0] / 180 * 3.1416; - longitude = spherical_pos_payload[1] / 180 * 3.1416; + latitude = spherical_pos_payload[0] / 180.0 * 3.1416; + longitude = spherical_pos_payload[1] / 180.0 * 3.1416; rho = spherical_pos_payload[2]+6371000; //centered on Earth try { out[0] = cos(latitude) * cos(longitude) * rho; @@ -315,7 +315,7 @@ namespace rosbzz_node{ double neighbours_pos_payload[3]; memcpy(neighbours_pos_payload, message_obt, 3*sizeof(uint64_t)); buzz_utility::Pos_struct raw_neigh_pos(neighbours_pos_payload[0],neighbours_pos_payload[1],neighbours_pos_payload[2]); - //cout<<"obt lat ,long alt"< ..." include "/home/ubuntu/buzz/src/include/vec2.bzz"