classify_magnetometer: Convert magnetometer signal to cardinal direction

View source: R/Read_IMU_Magnetometer_Directions.R

classify_magnetometerR Documentation

Convert magnetometer signal to cardinal direction

Description

Convert magnetometer signal to cardinal direction

Usage

classify_magnetometer(
  x = "Magnetometer X",
  y = "Magnetometer Y",
  z = "Magnetometer Z",
  orientation = c("vertical", "horizontal")
)

Arguments

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")

Value

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.

See Also

http://s3.amazonaws.com/actigraphcorp.com/wp-content/uploads/2017/11/26205750/ActiGraph_IMU_White_Paper.pdf

Examples

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)


AGread documentation built on Sept. 13, 2022, 5:06 p.m.