classify_magnetometer: Convert magnetometer signal to cardinal direction

Description Usage Arguments Value See Also Examples

View source: R/Read_IMU_Magnetometer_Directions.R

Description

Convert magnetometer signal to cardinal direction

Usage

1
2
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

1
2
3
4
5
6
7
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 Feb. 26, 2020, 5:12 p.m.