navStateCodes | R Documentation |
This function provides names for the numerical navState
codes
used by various gliders, with the aim of making it easier to
write self-explanatory code (see “Examples”).
navStateCodes(g)
g |
Either a character string or glider object. If it is a string,
then it is the type of glider, which in the present version of the
function must be |
The numerical values for seaexplorer
are as follows.
Name | Value | Description |
not_navigating | 105 | glider is being set up |
surfacing | 115 | nearing the surface |
at_surface | 116 | at the surface, acquiring GPS and transmitting data |
inflecting_downwards | 110 | ballast being adjusted to cause descent |
descending | 100 | ballast causing descent |
inflecting_upwards | 118 | ballast being adjusted to cause ascent |
ascending | 117 | ballast causing ascent |
Note that the downward portions of profiles are roughly signalled by several
inflecting_downwards
codes followed by descending
codes, while the upward portions have inflecting_upwards
codes
The numerical values for type slocum
are as follows. (These
are(defined as m_depth_state
in the slocum
documentation;
see pages 1-24 of reference 1.)
Name | Value | Description |
ignore | 99 | - |
hover | 3 | - |
climbing | 2 | - |
diving | 1 | - |
surface | 0 | - |
none | -1 | - |
A list of integers defining the navigation state, each given a brief name as indicated in the “Details” section.
Dan Kelley
1.Teledyne Webb Research. Slocum G2 Glider Operators Manual, January 2012. https://gliderfs2.coas.oregonstate.edu/gliderweb/docs/slocum_manuals/Slocum_G2_Glider_Operators_Manual.pdf.
# Use codes to identify upcasts, at least roughly (note the stray points)
directory <- system.file("extdata/sea_explorer/delayed_raw", package = "oceglider")
g <- read.glider.seaexplorer.raw(directory, "pld1.raw", progressBar = FALSE)
ns <- navStateCodes(g)
plot(g, which = "p")
gd <- subset(g, navState == ns$descending)
points(gd[["time"]], gd[["pressure"]], col = 2)
ga <- subset(g, navState == ns$asscending)
points(ga[["time"]], ga[["pressure"]], col = 3)
mtext(" red=descending; green=ascending", side = 3, line = -1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.