24 #include <interfaces/ObjectPositionInterface.h>
26 #include <core/exceptions/software.h>
88 ObjectPositionInterface::ObjectPositionInterface() : Interface()
90 data_size =
sizeof(ObjectPositionInterface_data_t);
92 data = (ObjectPositionInterface_data_t *)
data_ptr;
126 unsigned char tmp_hash[] = {0x9f, 0x72, 0x61, 0x39, 0x9a, 0xb4, 0x79, 0x4c, 0x33, 0x3, 0x3a, 0x75, 0xfc, 0xf0, 0xe5, 0x7e};
131 ObjectPositionInterface::~ObjectPositionInterface()
145 return data->object_type;
167 data->object_type = new_object_type;
206 data->flags = new_flags;
217 return data->visible;
237 data->visible = new_visible;
268 data->valid = new_valid;
285 return data->visibility_history;
311 data->visibility_history = new_visibility_history;
346 data->roll = new_roll;
381 data->pitch = new_pitch;
430 return data->distance;
453 data->distance = new_distance;
467 return data->bearing;
490 data->bearing = new_bearing;
529 data->slope = new_slope;
544 return data->dbs_covariance;
561 throw Exception(
"Index value %u out of bounds (0..9)", index);
563 return data->dbs_covariance[index];
587 memcpy(data->dbs_covariance, new_dbs_covariance,
sizeof(
float) * 9);
604 throw Exception(
"Index value %u out of bounds (0..9)", index);
606 data->dbs_covariance[index] = new_dbs_covariance;
620 return data->world_x;
644 data->world_x = new_world_x;
659 return data->world_y;
683 data->world_y = new_world_y;
698 return data->world_z;
722 data->world_z = new_world_z;
737 return data->world_xyz_covariance;
754 throw Exception(
"Index value %u out of bounds (0..9)", index);
756 return data->world_xyz_covariance[index];
780 memcpy(data->world_xyz_covariance, new_world_xyz_covariance,
sizeof(
float) * 9);
797 throw Exception(
"Index value %u out of bounds (0..9)", index);
799 data->world_xyz_covariance[index] = new_world_xyz_covariance;
811 return data->relative_x;
833 data->relative_x = new_relative_x;
846 return data->relative_y;
868 data->relative_y = new_relative_y;
881 return data->relative_z;
903 data->relative_z = new_relative_z;
918 return data->relative_xyz_covariance;
935 throw Exception(
"Index value %u out of bounds (0..9)", index);
937 return data->relative_xyz_covariance[index];
961 memcpy(data->relative_xyz_covariance, new_relative_xyz_covariance,
sizeof(
float) * 9);
978 throw Exception(
"Index value %u out of bounds (0..9)", index);
980 data->relative_xyz_covariance[index] = new_relative_xyz_covariance;
992 return data->extent_x;
1014 data->extent_x = new_extent_x;
1027 return data->extent_y;
1049 data->extent_y = new_extent_y;
1062 return data->extent_z;
1084 data->extent_z = new_extent_z;
1097 return data->world_x_velocity;
1119 data->world_x_velocity = new_world_x_velocity;
1132 return data->world_y_velocity;
1154 data->world_y_velocity = new_world_y_velocity;
1167 return data->world_z_velocity;
1189 data->world_z_velocity = new_world_z_velocity;
1204 return data->world_xyz_velocity_covariance;
1221 throw Exception(
"Index value %u out of bounds (0..9)", index);
1223 return data->world_xyz_velocity_covariance[index];
1247 memcpy(data->world_xyz_velocity_covariance, new_world_xyz_velocity_covariance,
sizeof(
float) * 9);
1264 throw Exception(
"Index value %u out of bounds (0..9)", index);
1266 data->world_xyz_velocity_covariance[index] = new_world_xyz_velocity_covariance;
1278 return data->relative_x_velocity;
1300 data->relative_x_velocity = new_relative_x_velocity;
1313 return data->relative_y_velocity;
1335 data->relative_y_velocity = new_relative_y_velocity;
1348 return data->relative_z_velocity;
1370 data->relative_z_velocity = new_relative_z_velocity;
1385 return data->relative_xyz_velocity_covariance;
1402 throw Exception(
"Index value %u out of bounds (0..9)", index);
1404 return data->relative_xyz_velocity_covariance[index];
1428 memcpy(data->relative_xyz_velocity_covariance, new_relative_xyz_velocity_covariance,
sizeof(
float) * 9);
1445 throw Exception(
"Index value %u out of bounds (0..9)", index);
1447 data->relative_xyz_velocity_covariance[index] = new_relative_xyz_velocity_covariance;
1455 "message type for this interface type.", type);
1470 memcpy(data, oi->data,
sizeof(ObjectPositionInterface_data_t));