% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ingest_sensors.R
\name{stack_surveys}
\alias{stack_surveys}
\title{Stack multiple survey runs from the same sensor type}
\usage{
stack_surveys(..., spatial_res = 4L, verbose = TRUE)
}
\arguments{
\item{...}{Two or more dataframes of the same sensor type. Each must contain
\code{lat} and \code{lon} columns.}

\item{spatial_res}{Integer. Decimal places for the common spatial grid
(default \code{4}, approx.11 m at 56degrees N).}

\item{verbose}{Logical. Print a summary (default \code{TRUE}).}
}
\value{
A single spatially averaged dataframe combining all input surveys.
}
\description{
Combines two or more dataframes from the same sensor (e.g. an ADCP run on
Monday and again on Thursday) by row-binding them and re-averaging
overlapping cells onto a common spatial grid. Non-overlapping cells are
kept as-is.

This is the right tool when you have repeated surveys of the same area --
rather than picking one run, overlapping cells are averaged across all runs
which improves noise reduction. Non-overlapping cells (different survey
extents) are preserved.

After stacking, pass the result into \code{\link[=merge_sensor_data]{merge_sensor_data()}} alongside your
other sensor datasets as usual.
}
\examples{
\donttest{
# Stack two ADCP runs before merging with other sensors
adcp_mon <- read_nortek_adcp("survey_monday.csv")
adcp_thu <- read_nortek_adcp("survey_thursday.csv")
adcp_all <- stack_surveys(adcp_mon, adcp_thu)

survey <- merge_sensor_data(adcp = adcp_all, bathy = bathy_df)
}
}
