Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
elphel-apps-gps
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Elphel
elphel-apps-gps
Commits
9a7461bc
Commit
9a7461bc
authored
Nov 03, 2016
by
Mikhail Karpenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix number conversion error
parent
f9fd4fe2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
read_imu_log.php
src/read_imu_log.php
+2
-1
No files found.
src/read_imu_log.php
View file @
9a7461bc
...
@@ -310,7 +310,8 @@ function parseIMU ($arr32){
...
@@ -310,7 +310,8 @@ function parseIMU ($arr32){
$temperatureScale
=
0.00565
;
// C/LSB
$temperatureScale
=
0.00565
;
// C/LSB
$t
=
(
$arr32
[
15
]
&
0xffff
);
$t
=
(
$arr32
[
15
]
&
0xffff
);
if
(
$t
>=
32768
)
$t
-=
65536
;
if
(
$t
>=
32768
)
$t
-=
65536
;
for
(
$i
=
3
;
$i
<
15
;
$i
++
)
if
((
$arr32
[
$i
]
&
0x80000000
)
!=
0
)
$arr32
[
$i
]
-=
0x100000000
;
for
(
$i
=
3
;
$i
<
15
;
$i
++
)
if
(((
$arr32
[
$i
]
&
0x80000000
)
!=
0
)
&&
(
$arr32
[
$i
]
>
0
))
$arr32
[
$i
]
-=
0x100000000
;
return
array
(
return
array
(
"gyroX"
=>
$arr32
[
3
]
*
$gyroScale
,
"gyroX"
=>
$arr32
[
3
]
*
$gyroScale
,
"gyroY"
=>
$arr32
[
4
]
*
$gyroScale
,
"gyroY"
=>
$arr32
[
4
]
*
$gyroScale
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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