This function calculates the course and speed over ground of a moving platform using the lat/lon. Note,data are resampled to 1 minute in order to provide a better estimate of speed/course compared with 1 second.
Function is set up to use dask for the calculations in order to improve efficiency. Data are then resampled to 1 second to match native format. This assumes that the input data are 1 second. See this example.
ds (xarray.Dataset) – ACT xarray dataset to calculate COG/SOG from. Assumes lat/lon are variables and that it’s 1-second data.
ds (xarray.Dataset) – Returns dataset with course_over_ground and speed_over_ground variables.