uwacan.Track#

class Track(data, calculate_course=False, calculate_speed=False)[source]#

Bases: Positions

A class representing a GPS track, which is a sequence of coordinates over time.

Typically instances of this class are created by reading a data file, using the implemented classmethods.

Parameters:
dataxarray.Dataset

The dataset containing the track data.

calculate_coursebool, optional

Whether to calculate the course of the track, by default False.

calculate_speedbool, optional

Whether to calculate the speed of the track, by default False.

Methods

aspect_segments(reference, angles[, ...])

Get time segments corresponding to specific aspect angles.

average_course([resolution])

Calculate the average course in the track.

calculate_course()

Calculate the course of the track.

calculate_speed()

Calculate the speed of the track.

closest_point(other)

Get the point in this track closest to a position.

correct_gps_offset([forwards, portwards, ...])

Correct positions with respect to ship heading and particulars.

read_blueflow(filepath[, renames])

Read a track from a BlueFlow file (Excel or CSV).

read_gpx(filepath, **kwargs)

Read a GPS track from a GPX file.

read_nmea_gps(filepath, **kwargs)

Read a GPS track from an NMEA file.

resample(time, /, **kwargs)

Resample the Track at specific times or rate.

subwindow([time, start, stop, center, ...])

Select a subset of the data over time.

Inherited methods

bearing_to(other)

Calculate the bearing to another coordinate.

distance_to(other)

Calculate the distance to another coordinate.

from_dataset(dataset, **kwargs)

Instantiate the class from a dataset.

groupby(group)

isel([indexers, drop, missing_dims, drop_allnan])

Select a subset of the data from the coordinate indices.

load(path[, lookup_class])

Load data from a Zarr file and optionally restore the original class.

local_length_scale()

How many nautical miles one longitude minute is.

make_figure([lat, lon, extent])

Create a plotly figure, styled for this data.

plot([use_minutes, include_time, name, ...])

Create a plotly trace for the coordinates.

save(path[, append_dim])

Save the data to a Zarr file at the specified path.

sel([indexers, method, tolerance, drop, ...])

Select a subset of the data from the coordinate labels.

shift_position(distance, bearing)

Shift this coordinate by a distance in a certain bearing.

where(cond[, other, drop])

Filter elements from this object according to a condition.

Attributes

attrs

Attributes stored in the data.

bounding_box

A BoundingBox for these coordinates.

coordinates

The latitude and longitude for this coordinate, as Dataset.

coords

The coordinate (dimension) arrays for this data.

data

The contained data.

dims

The dimensions of this data.

latitude

The latitude for coordinate, as DataArray.

longitude

The longitude for coordinate, as DataArray.

sizes

Mapping from dimension names to lengths.

time

The time coordinates for the track.

time_window

A TimeWindow describing when the data start and stops.