Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Monado
Monado
Commits
d3eb48ad
Commit
d3eb48ad
authored
Sep 16, 2019
by
Jakob Bornecrantz
Browse files
d/psmv: Normalize acceleration to gravity
parent
1bcf5377
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/xrt/drivers/psmv/psmv_driver.c
View file @
d3eb48ad
...
...
@@ -602,11 +602,14 @@ update_fusion(struct psmv_device *psmv,
struct
xrt_vec3_i32
*
rg
=
&
sample
->
gyro
;
psmv
->
read
.
accel
.
x
=
(
ra
->
x
-
psmv
->
calibration
.
accel
.
bias
.
x
)
/
psmv
->
calibration
.
accel
.
factor
.
x
;
psmv
->
calibration
.
accel
.
factor
.
x
*
MATH_GRAVITY_M_S2
;
psmv
->
read
.
accel
.
y
=
(
ra
->
y
-
psmv
->
calibration
.
accel
.
bias
.
y
)
/
psmv
->
calibration
.
accel
.
factor
.
y
;
psmv
->
calibration
.
accel
.
factor
.
y
*
MATH_GRAVITY_M_S2
;
psmv
->
read
.
accel
.
z
=
(
ra
->
z
-
psmv
->
calibration
.
accel
.
bias
.
z
)
/
psmv
->
calibration
.
accel
.
factor
.
z
;
psmv
->
calibration
.
accel
.
factor
.
z
*
MATH_GRAVITY_M_S2
;
psmv
->
read
.
gyro
.
x
=
(
rg
->
x
-
psmv
->
calibration
.
gyro
.
bias
.
x
)
/
psmv
->
calibration
.
gyro
.
factor
.
x
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment