Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Unknown
LICENSE.note
NotificationsYou must be signed in to change notification settings

gitboosting/imuf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

R-CMD-check

‘imuf’ uses complementary filtering to estimate the orientation of aninertial measurement unit (IMU) with a 3-axis accelerometer and a 3-axisgyroscope. It takes the IMU’s accelerometer and gyroscope readings, timeduration, its initial orientation, and a ‘gain’ factor as inputs, andprovides an estimate of the final orientation as outputs.

‘imuf’ adopts the north-east-down (NED) coordinate system. The initialand final orientations are expressed as quaternions in (w, x, y, z)convention.

Installation

install.packages("imuf")

You can install the development version of imuf fromGitHub with:

# install.packages("pak")pak::pak("gitboosting/imuf")

Example

This is a basic example which shows you how to solve a common problem:

library(imuf)#acc<- c(0,0,-1)# accelerometer NED readings in g (~ 9.81 m/s^2)gyr<- c(1,0,0)# gyroscope NED readings in radians per seconddeltat<-0.1# time duration in secondsinitq<- c(1,0,0,0)# initial orientation expressed as a quaterniongain<-0.1# a weight (0-1) given to the accelerometer readings## final orientation expressed as a quaternion(final<- compUpdate(acc,gyr,deltat,initq,gain))#> [1] 0.99898767 0.04498481 0.00000000 0.00000000### rotate a vector pointing east by 90 deg about northq<- c(cos(pi/4), sin(pi/4),0,0)# quaternion to rotate 90 deg about northvin<- c(0,1,0)# vector in east direction(vout<- rotV(q,vin))# after rotation, vector is in down direction#> [1] 0.000000e+00 2.220446e-16 1.000000e+00

About

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
MIT
LICENSE.md
Unknown
LICENSE.note

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp