032a5c75a4
convert from body coordinate system to right-hand coordinate system. Example: Compared to the standard coordinate system, the x-axis and y-axis are interchanged and have opposite directions, the z-axis remains normal. body coordinate ----> right-hand coordinate +x +y | | | | | | | | -y<-------. .------>+x / / / / / / / / +z +z So for the above conversion, using "P3" to represent transformation relationships The front is 1 0 2, which represents the y x z axis. The standard order is 0 1 2, so y and x are interchanged. The following -1 1 1 indicates the direction of the axis. The standard is 1 1 1. Because the current y-axis is opposite to the standard x-axis, it is -1. static const struct sensor_axis_map_s g_remap_tbl[] = { { 0, 1, 2, 1, 1, 1 }, /* P0 */ { 1, 0, 2, 1, -1, 1 }, /* P1 */ { 0, 1, 2, -1, -1, 1 }, /* P2 */ { 1, 0, 2, -1, 1, 1 }, /* P3 */ { 0, 1, 2, -1, 1, -1 }, /* P4 */ { 1, 0, 2, -1, -1, -1 }, /* P5 */ { 0, 1, 2, 1, -1, -1 }, /* P6 */ { 1, 0, 2, 1, 1, -1 }, /* P7 */ }; you can call the function sensor_remap_vector_raw16 and pass P3 parameters to perform the conversion. Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com> |
||
---|---|---|
.. | ||
android | ||
arpa | ||
crypto | ||
cxx | ||
net | ||
netinet | ||
netpacket | ||
nuttx | ||
ssp | ||
sys | ||
.gitignore | ||
aio.h | ||
alloca.h | ||
assert.h | ||
byteswap.h | ||
ctype.h | ||
debug.h | ||
dirent.h | ||
dlfcn.h | ||
dsp.h | ||
dspb16.h | ||
elf32.h | ||
elf64.h | ||
elf.h | ||
endian.h | ||
err.h | ||
errno.h | ||
execinfo.h | ||
fcntl.h | ||
fixedmath.h | ||
fnmatch.h | ||
ftw.h | ||
getopt.h | ||
glob.h | ||
grp.h | ||
hex2bin.h | ||
iconv.h | ||
ifaddrs.h | ||
inttypes.h | ||
iso646.h | ||
langinfo.h | ||
libgen.h | ||
libintl.h | ||
limits.h | ||
locale.h | ||
lzf.h | ||
malloc.h | ||
mqueue.h | ||
netdb.h | ||
nl_types.h | ||
nxflat.h | ||
obstack.h | ||
poll.h | ||
pthread.h | ||
pty.h | ||
pwd.h | ||
regex.h | ||
resolv.h | ||
sched.h | ||
semaphore.h | ||
signal.h | ||
spawn.h | ||
stdbool.h | ||
stddef.h | ||
stdint.h | ||
stdio.h | ||
stdlib.h | ||
stdnoreturn.h | ||
string.h | ||
strings.h | ||
syscall.h | ||
syslog.h | ||
termios.h | ||
threads.h | ||
time.h | ||
unistd.h | ||
utime.h | ||
uuid.h | ||
wchar.h | ||
wctype.h |