# add_location

echopype.consolidate. add_location ds] None

Add geographical location (latitude/longitude) to the Sv dataset.

This function interpolates the location from the Platform group in the original data file based on the time when the latitude/longitude data are recorded and the time the acoustic data are recorded (ping_time).

Parameters

- ds : xr.Dataset or str or pathlib.Path

  An Sv or MVBS dataset or path to a file containing the Sv or MVBS dataset for which the geographical locations will be added to

- echodata : EchoData or str or pathlib.Path

  An `EchoData` object or path to a file containing the `EchoData` object holding the raw data

- nmea_sentence

  NMEA sentence to select a subset of location data (optional)

Returns

- The input dataset with the location data added