View source: R/Read_IMU_Magnetometer_Directions.R
classify_magnetometer | R Documentation |
Convert magnetometer signal to cardinal direction
classify_magnetometer( x = "Magnetometer X", y = "Magnetometer Y", z = "Magnetometer Z", orientation = c("vertical", "horizontal") )
x |
x-axis magnetometer data |
y |
y-axis magnetometer data |
z |
z-axis magnetometer data |
orientation |
the conversion scheme to use, from c("vertical", "horizontal") |
A vector of cardinal directions assigned from the set N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, SW, WSW, W, WNW, NW, NNW, where N, E, S, and W are north, east, south, and west, respectively.
data(imu_to_collapse) X <- mean(imu_to_collapse$Magnetometer.X) Y <- mean(imu_to_collapse$Magnetometer.Y) Z <- mean(imu_to_collapse$Magnetometer.Z) classify_magnetometer(X, Y, Z)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.