-
Notifications
You must be signed in to change notification settings - Fork 0
/
vlpMoveSensor.m
23 lines (17 loc) · 764 Bytes
/
vlpMoveSensor.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function [ displacedSensor ] = vlpMoveSensor( originalSensor , displHTM )
%VLPMOVESENSOR Displaces a sensor or a receiver array in 3D space
% displacedSensor = vlpMoveSensor( originalSensor , displHTM )
%
% The sensor is an array of Emitter_t structs. The sensors in the array
% are displaced (translated and/or rotated) by the transformation defined in
% the Homogeneous Transformation Matrix displHTM
%
% VLPMOVESENSOR applies the transformation displHTM to all HTMs of the
% sensors in the originalSensor structure.
% This is the non-optimized version
% TODO: verify if vectorization can improve timing.
displacedSensor = originalSensor;
for n = 1:numel(originalSensor)
displacedSensor(n).HTM = displHTM * originalSensor(n).HTM;
end
end