Compute, for each twilight of tag, the solar zenith angle at the position of its stationary
period on path, and flag the twilights outside the calibrated zenith range. These are the
twilights that make a stationary period orange in plot_twl_calib(tag, path), and the ones whose
light likelihood is low at that position.
Arguments
- tag
a GeoPressureR
tagobject with twilights and a twilight calibration (seegeolight_map_calibrate()).- path
a GeoPressureR
pathorpressurepathdata.frame withstap_id,latandlon. The first row of eachstap_idis used.- warning_ci
Width of the symmetric confidence interval used to flag staps with twilights outside the calibrated range (e.g.,
0.95for 2.5%/97.5%).
Value
tag$twilight with the columns
include:FALSEfor discarded or incomplete twilights.zenith: solar zenith angle at the position of the stationary period (degrees),NAduring flights or when the stationary period has no position.outside_ci:zenithis outside thewarning_ciinterval of the calibrated density.
The interval (degrees) is returned in the attribute zenith_ci.
Examples
withr::with_dir(system.file("extdata", package = "GeoPressureR"), {
tag <- tag_create("18LX", quiet = TRUE) |>
tag_label(quiet = TRUE) |>
tag_set_map(
extent = c(-16, 23, 0, 50),
scale = 4,
known = data.frame(stap_id = 1, known_lon = 17.05, known_lat = 48.9)
) |>
twilight_create() |>
twilight_label_read() |>
geolight_map_calibrate(quiet = TRUE)
})
path <- data.frame(stap_id = tag$stap$stap_id, lat = 48.9, lon = 17.05)
twl <- twilight_check(tag, path)
twl[which(twl$outside_ci & twl$include), ]
#> twilight rise stap_id label include zenith outside_ci
#> 24 2017-08-05 03:30:00 TRUE 2 2 TRUE 90.52907 TRUE
#> 25 2017-08-06 03:35:00 TRUE 3 3 TRUE 89.82708 TRUE
#> 26 2017-08-07 03:40:00 TRUE 4 4 TRUE 89.36955 TRUE
#> 12 2017-08-07 18:15:00 FALSE 4 4 TRUE 89.46993 TRUE
#> 27 2017-08-08 03:55:00 TRUE 5 5 TRUE 87.50355 TRUE
#> 28 2017-08-09 04:10:00 TRUE 5 5 TRUE 85.49019 TRUE
#> 14 2017-08-09 18:15:00 FALSE 5 5 TRUE 89.88499 TRUE
