airbornegeo.ground_speed#
- ground_speed(data, *, time_column='unixtime', easting_column='easting', northing_column='northing', groupby_column=None)[source]#
TODO: do calculation forward for 1st points so they aren’t 0 Calculate the ground speed in meters per second. This is change in distance divided by the change in time between each successive row in the dataframe. This assumes the data have been sorted by time, and that there are not flights which overlap in time. If there are, you can first sort by flight, then by time. For example, if you have columns ‘flight’ and ‘unixtime’, you can accomplish this with data = data.sort_values([“flight”, “unixtime”]). If groupby_column is provided, the dataframe will first be grouped by this.
- Parameters:
data (
DataFrame) – Dataframe containing the data points to calculate the ground speed for, must have columns ‘unixtime’ and ‘relative_distance’.time_column (
str) – name of the column containing the time in secondseasting_column (
str) – name of the column containing the easting coordinates in metersnorthing_column (
str) – name of the column containing the northing coordinates in metersgroupby_column (
str|None) – Column name to group by before calculation, by default None
- Returns:
The groundspeed in units of meters per second
- Return type: