1% =========================================================================== %
2%> @example waypointsToMeasurementsExample.m
5%> classes to create a trajectory and generate realistic sensor data from it.
6% =========================================================================== %
8% Create a set start times and stay times
for each waypoint
9t_start = seconds(0:10:120);
10t_stay = repmat(seconds(0), size(t_start));
12% Create a set of waypoint positions
29% Create a set of waypoint orientations
30%
this is only a yaw-rotation of 90 ° per row and after 360° the pitch also
38 -0.5 -0.5 -0.5 0.5; ...
40 -0.5 0.5 -0.5 -0.5; ...
48% Create a trajectory
object
51% Add the waypoints to the trajectory
52traj.addWaypoints(t_start, t_stay, pos, ori);
57% visualize the trajectory
63data = sensor.generateFromTrajectory(traj);
65% visualize the sensor data
67subplot(211); % acceleration
68plot(data.tt.t, data.tt.acc);
71ylabel(
'Acceleration [m/s^2]');
74subplot(212); % angular velocity
75plot(data.tt.t, data.tt.gyr);
76title(
'Angular Velocity');
78ylabel(
'Angular Velocity [°/s]');
JumpSensor is a simulation of the JUMP sensor of the ZurichMove Project.
Trajectory Class for generating and manipulating trajectories from waypoints.
function generateTrajectory(in obj, in options)
Generate the trajectory from the waypoints table.
app that can be used to visualize a Trajectory object