airbornegeo.relative_distance

airbornegeo.relative_distance#

relative_distance(data)[source]#

Calculate distance between successive points in a 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 df = df.sort_values([“flight”, “unixtime”]).

Parameters:

data (DataFrame) – Dataframe containing columns ‘easting’ and ‘northing in meters.

Returns:

Returns a pandas Series of the relative distances which can be assigned to a new column.

Return type:

Series