-
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #665 from OpenHD/consti-dev
2 functional changes, refactoring otherwise
- Loading branch information
Showing
162 changed files
with
219 additions
and
3,737 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#include "geodesi_helper.h" | ||
|
||
extern "C" { | ||
#include "lib/geographiclib-c-2.0/src/geodesic.h" | ||
//#include "geodesic.h" | ||
} | ||
|
||
double distance_between(double lat1, double lon1, double lat2, double lon2){ | ||
double s12; | ||
//double azi1; | ||
//double azi2; | ||
|
||
geod_geodesic geod{}; | ||
// from https://manpages.ubuntu.com/manpages/bionic/man3/geodesic.3.html | ||
const double a = 6378137, f = 1/298.257223563; // WGS84 | ||
geod_init(&geod,a,f); | ||
geod_inverse(&geod,lat1,lon1,lat2,lon2,&s12,0,0); //&azi1,&azi2 | ||
return s12; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,6 @@ | ||
#ifndef GEODESI_HELPER_H | ||
#define GEODESI_HELPER_H | ||
|
||
//#include <geographiclib-c-2.0/src/geodesic.h> | ||
#include "lib/geographiclib-c-2.0/src/geodesic.h" | ||
|
||
// return: distance in m between 2 points | ||
static double distance_between(double lat1,double lon1,double lat2,double lon2){ | ||
double s12; | ||
//double azi1; | ||
//double azi2; | ||
|
||
geod_geodesic geod{}; | ||
// from https://manpages.ubuntu.com/manpages/bionic/man3/geodesic.3.html | ||
const double a = 6378137, f = 1/298.257223563; // WGS84 | ||
geod_init(&geod,a,f); | ||
geod_inverse(&geod,lat1,lon1,lat2,lon2,&s12,0,0); //&azi1,&azi2 | ||
return s12; | ||
} | ||
|
||
/*static double distance_between(double lat1,double lon1,double lat2,double lon2){ | ||
return 0; | ||
}*/ | ||
double distance_between(double lat1,double lon1,double lat2,double lon2); | ||
|
||
#endif // GEODESI_HELPER_H |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.