-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvrMsg.m
More file actions
41 lines (37 loc) · 1.3 KB
/
vrMsg.m
File metadata and controls
41 lines (37 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
classdef vrMsg < event.EventData
properties
Xpos
Ypos
Zpos
ViewAngle
Dt
ForwardVelocity
RotationalVelocity
iterations
World
Velocity
RawVelocity
Time
end
methods
function eventData = vrMsg(vr)
eventData.Xpos = vr.position(1);
eventData.Ypos = vr.position(2);
eventData.Zpos = vr.position(3);
eventData.ViewAngle = vr.position(4);
eventData.World = vr.currentWorld;
eventData.Dt = vr.dt;
eventData.ForwardVelocity = vr.vrSystem.forwardVelocity;
eventData.RotationalVelocity = vr.vrSystem.rotationalVelocity;
eventData.Velocity = vr.velocity(:);
eventData.RawVelocity = vr.vrSystem.rawVelocity;
eventData.Time = hat;
end
end
end
% NOTE:
% RawVelocity is a 5x4 matrix where each of the 5 rows is taken from each sequential step used to
% calculate the 1x4 "vr.velocity" vector used by Virmen to move through the virtual world.
% Columns are [dx dy dz domega] in vr.velocity, but represent different values, e.g. the raw [dx,dy]
% values from each sensor are in the first row. For what each value corresponds to refer to
% moveBucklin.m