GreatFitCircle Module

Module contents

void tracktable::great_circle_fit_and_project_in_place(tracktable::domain::terrestrial::trajectory_type &_trajectory, std::string _altitude_string = "altitude", tracktable::domain::terrestrial::AltitudeUnits _unit = tracktable::domain::terrestrial::AltitudeUnits::FEET)

Find the best fit plane and project onto it The purpose is to do a linear fit on a globe. Thus it only works with terrestrial trajectories.

Note

in place version is a destructive the process, the trajectory is modified.

Parameters:
  • _trajectory – The trajectory to be ‘linearized’

  • _altitude_string – Label of point property that contains altitude

  • _unit – Units of the altitude property

tracktable::domain::terrestrial::trajectory_type tracktable::great_circle_fit_and_project(tracktable::domain::terrestrial::trajectory_type const &_trajectory, std::string _altitude_string = "altitude", tracktable::domain::terrestrial::AltitudeUnits _unit = tracktable::domain::terrestrial::AltitudeUnits::FEET)

Find the best fit plane and project onto it The purpose is to do a linear fit on a globe. Thus it only works with terrestrial trajectories.

Note

non destructive version.

Parameters:
  • _trajectory – The trajectory to be ‘linearized’

  • _altitude_string – Label of point property that contains altitude

  • _unit – Units of the altitude property

tracktable::domain::cartesian3d::base_point_type tracktable::find_best_fit_plane(const tracktable::domain::terrestrial::trajectory_type &_trajectory, std::string _altitude_string = "altitude", tracktable::domain::terrestrial::AltitudeUnits _unit = tracktable::domain::terrestrial::AltitudeUnits::FEET)

We find the vector representing the normal to the plane where the total squared distance of points in the trajectory to that plane is minimized.

Parameters:
  • _trajectory – The trajectory to fit

  • _altitude_string – Label of point property that contains altitude

  • _unit – Units of the altitude property

Returns:

The normal (in ECEF space) representing the best fit plane.

void tracktable::project_trajectory_onto_plane(tracktable::domain::terrestrial::trajectory_type &_trajectory, const tracktable::domain::cartesian3d::base_point_type &_normal, std::string _altitude_string = "altitude", tracktable::domain::terrestrial::AltitudeUnits _unit = tracktable::domain::terrestrial::AltitudeUnits::FEET)

Project a trajectory onto a plane defined by it’s normal in ECEF space.

Parameters:
  • _trajectory – the trajectory to project

  • _normal – The normal that defines the plane to project on to

  • _altitude_string – Label of point property that contains altitude

  • _unit – Units of the altitude property