Skip to contents

A group spotted from the census track is often circled for photographs, identification, and a proper count, and the sighting is logged during that circle rather than at the moment of detection. This ties each such sighting back to the point on the track-line where the aircraft broke off, and measures the distance from there.

Usage

circling_distance(
  dat,
  by = NULL,
  units = c("m", "km", "nmi"),
  position = c("exact", "logged")
)

Arguments

dat

A data frame of NARWC survey data in survey order, with LATITUDE, LONGITUDE, LEGTYPE, and ideally CIRCLE from flag_circling() and S_LAT/S_LONG. Without CIRCLE, LEGTYPE == 4 is used.

by

Grouping columns identifying one occupation of a survey line, as in track_bearing().

units

"m" (default), "km", or "nmi".

position

Which position to treat as the animal's. "exact" (default) uses S_LAT/S_LONG only. "logged" falls back to the record's own LATITUDE/LONGITUDE where no exact position exists. That position is the aircraft orbiting the animal, offset by the radius of the circle (a few hundred metres, the same size as the distances being measured). position_source records which position was used.

Value

A tibble with one row per row of dat, populated only for circling sightings:

distance

Perpendicular distance from the census line.

along

Signed along-track distance from the break-off point to where the animal was abeam; negative means back down the line.

side

"left", "right", "on-track", or NA.

radial

Straight-line distance from the break-off point.

bearing

Inbound track bearing at the anchor.

anchor_event

EVENTNO of the anchor record, or its row number when EVENTNO is absent.

position_source

"exact" or "logged".

Why these detections matter

A circling sighting is usually a genuine on-effort detection: the animal was seen from the track-line, which is why the aircraft left it. Giving it no distance drops it from the detection function. The dropped detections are not a random sample: they are mostly the close, conspicuous, or high-priority groups that were worth breaking off for. Losing them thins the near-zero end of the distance distribution, where a detection function is most sensitive.

The anchor

The reference point is the last census record before the circling began: the LEGSTAGE == 3 break-off record where one exists (handbook 8.A.20), and otherwise the last record still on the line. anchor_event reports which record was used so the choice can be checked.

The bearing is the inbound heading: from the previous distinct census position to the anchor, which is the direction the aircraft was flying when the animal was detected. It is not the centred difference track_bearing() uses. The record after a break-off is the resume record, and a resume point offset from the break-off would swing the bearing by an amount unrelated to the track being flown.

Break-off point, or the line through it

The aircraft usually flies past a group before turning, so the break-off point is beyond the animal rather than abeam of it. radial is the straight-line distance from the break-off point to the animal; distance is that position projected perpendicularly onto the census line, and along is how far back along the line the animal was abeam. distance is the one a detection function needs. radial is generally larger, by the margin along records.

What this cannot fix

The position is recorded some minutes after detection, so the animal has moved, and the distance is an estimate of where it was when detected rather than a measurement of it. That error is not quantified here. Circling distances are a distinct and less reliable source. distance_source marks them, and they should be excluded from a detection function unless their inclusion is a deliberate, stated choice.

References

Kenney, R.D. (2023) The North Atlantic Right Whale Consortium Database: A Guide for Users and Contributors, Version 8, sections 4.2 (event 12), 8.A.20, and 8.A.21. NARWC Reference Document 2023-01.

Examples

path <- system.file("extdata", "narwc-example.csv", package = "distsamp")
dat <- flag_circling(make_leg_id(read_narwc(path)))
#> `read_narwc()` renamed 2 columns:
#>   LAT_DD  -> LATITUDE
#>   LONG_DD -> LONGITUDE
#> All matched an exact entry in the alias table; `narwc_column_mapping()` returns this, and `quiet = TRUE` silences it.
d <- circling_distance(dat)
d[!is.na(d$distance), ]
#> # A tibble: 1 × 7
#>   distance along side  radial bearing anchor_event position_source
#>      <dbl> <dbl> <chr>  <dbl>   <dbl>        <dbl> <chr>          
#> 1     250. -400. right   472.       0           39 exact