platypus.util package

Submodules

platypus.util.conversions module

Module containing utility conversion functions. Copyright 2015. Platypus LLC. All rights reserved.

platypus.util.conversions.add_ll_to_pose_dataframe(df)[source]

Converts a UTM position dataframe to also include Lat/Long.

Parameters:df (pandas.DataFrame) – a UTM dataframe with a time index and columns [easting, northing, altitude, zone, hemi]
Returns:the original dataframe with the additional columns [longitude, latitude], added in-place
Return type:pandas.DataFrame
platypus.util.conversions.region_from_points(df)[source]

Computes a convex-hull region boundary from the provided ‘pose’ dataframe.

Parameters:df (pandas.DataFrame) – A dataframe containing longitude and latitude as columns
Returns:convex hull of positions in pose
Return type:GeoJSON polyline defining region boundary
platypus.util.conversions.remove_outliers_from_pose_dataframe(df, tolerance=10000)[source]

Remove poses more than a certain number of meters from the median pose.

These poses are usually due to GPS initialization error, and typically should be excluded from interpolations. The default tolerance is 10km.

Parameters:
  • df (pandas.DataFrame) – a UTM dataframe with time index and [easting, northing] columns
  • tolerance (float) – maximum distance in meters from median of dataset
Returns:

A dataframe with rows exceeding the specified tolerance removed

Return type:

pandas.DataFrame

Module contents

General purpose utility functions.