Extract utility geographic and maplibre functions

This commit is contained in:
Dan Paulat 2023-07-20 23:12:36 -05:00
parent 1a411af3bc
commit 1c39464228
6 changed files with 83 additions and 21 deletions

View file

@ -1,6 +1,8 @@
#pragma once
#include <GeographicLib/Geodesic.hpp>
#include <boost/units/quantity.hpp>
#include <boost/units/systems/si/length.hpp>
namespace scwx
{
@ -14,10 +16,23 @@ namespace GeographicLib
/**
* Get the default geodesic for the WGS84 ellipsoid.
*
* return WGS84 ellipsoid geodesic
* @return WGS84 ellipsoid geodesic
*/
const ::GeographicLib::Geodesic& DefaultGeodesic();
/**
* Get the distance between two points.
*
* @param [in] lat1 latitude of point 1 (degrees)
* @param [in] lon1 longitude of point 1 (degrees)
* @param [in] lat2 latitude of point 2 (degrees)
* @param [in] lon2 longitude of point 2 (degrees)
*
* @return distance between point 1 and point 2
*/
boost::units::quantity<boost::units::si::length>
GetDistance(double lat1, double lon1, double lat2, double lon2);
} // namespace GeographicLib
} // namespace util
} // namespace qt