Provides interactive 3D and 2D plots for exploring GeoPressureR tag object sensor data, including raw and calibrated magnetic data, fitted calibration ellipsoids, and (projected) acceleration data. Color-coding by stationary period or movement state is supported. Also supports time series and histogram error plots against reference paths.
Plot types:
"magnetic": Raw magnetic data in sensor frame, colored by stationary period.
"calib": Calibration points and fitted ellipsoids for selected periods.
"acceleration": Raw acceleration, colored by static/moving classification.
"acceleration_p": Projected acceleration (NED frame), with reference gravity.
"timeseries": Time series of inclination and intensity, with optional reference path overlay.
"histogram": Histogram of errors (sample and mean per stationary period) against reference path.
Arguments
- tag
A GeoPressureR tag object containing magnetic (and optionally calibration) data.
- type
Character, plot type. One of "magnetic", "calib", "acceleration", "acceleration_p", "timeseries", or "histogram".
- stap_id
Integer or vector, stationary period(s) to plot calibration fit for (type="calib").
- path
Optional, a data frame with columns
start
,end
,stap_id
,lon
,lat
for plotting reference paths in "timeseries" or "histogram" types.
Value
A plotly plot_ly
object (interactive 3D/2D plot) or a ggplotly object for time
series/histogram types.
Details
Uses the
scico
orviridisLite
palettes for clear color separation.For type "calib", if
stap_id
is missing, periods with min/max radii are shown.For acceleration plots, static/moving state is estimated if not present.
For "timeseries" and "histogram" types, a reference path is required for error analysis.
Examples
library(GeoPressureR)
withr::with_dir(system.file("extdata", package = "GeoMag"), {
tag <- tag_create("14DM", quiet = TRUE)
tag <- tag_label(tag, quiet = TRUE)
tag <- geomag_calib(tag, quiet = TRUE)
})
#> ℹ Using raw magnetic data for calibrationd data
plot_mag(tag, type = "acceleration")
plot_mag(tag, type = "magnetic")
plot_mag(tag, type = "calib")