3.6. cpforager.processing.add_step_heading

cpforager.processing.add_step_heading(df)

Add to the dataframe an additional step_heading column that gives step heading in degrees.

Parameters:

df (pandas.DataFrame) – dataframe with longitude and latitude columns.

Returns:

the dataframe with an additional step_heading column that gives step heading in degrees.

Return type:

pandas.DataFrame

Step heading is computed as the angle in degrees between the North and the direction formed by two consecutive measures of position (N=0°, E=90°, S=180°, W=270°).

Warning

First step heading value is NaN.