cgv
Loading...
Searching...
No Matches
geo_transform.h
1#pragma once
2
3#include <cgv/math/fvec.h>
4#include "lib_begin.h"
5
6namespace cgv {
7 namespace math {
8
10 static const double WGS84_a = 6378137.0;
12 static const double WGS84_e = 0.081819191;
13
14 // converts from geodetic [latitude phi:deg N, longitude lambda:deg E, height h:meters]
15 // based on reference ellipsoid [semi major axis a, eccentricity e] to
16 // global orthonormal earth centered fixed earth (ECFE) coordinates in meters
17 extern CGV_API fvec<double, 3> ECFE_from_geodetic(const fvec<double, 3>& geodetic, double a = WGS84_a, double e = WGS84_e);
18 // converts from global orthonormal earth centered fixed earth (ECFE) coordinates in meters
19 // based on reference ellipsoid [semi major axis a, eccentricity e] to
20 // geodetic [latitude phi:deg N, longitude lambda:deg E, height h:meters]
21 extern CGV_API fvec<double, 3> geodetic_from_ECFE(const fvec<double, 3>& ECFE, double a = WGS84_a, double e = WGS84_e);
22 // converts from global orthonormal earth centered fixed earth (ECFE) coordinates in meters
23 // based on reference ellipsoid [semi major axis a, eccentricity e] to
24 // geodetic [latitude phi:deg N, longitude lambda:deg E, height h:meters] with non iterative and faster but less accurate approach
25 extern CGV_API fvec<double, 3> geodetic_from_ECFE_approx(const fvec<double, 3>& ECFE, double a = WGS84_a, double e = WGS84_e);
26 // converts from geodetic [latitude phi:deg N, longitude lambda:deg E, height h:meters]
27 // based on reference ellipsoid [semi major axis a, eccentricity e] to
28 // local East North (ENU) coordinates in meters
29 extern CGV_API fvec<double, 3> ENU_from_geodetic(const fvec<double, 3>& position_geodetic, const fvec<double, 3>& origin_geodetic, double a = WGS84_a, double e = WGS84_e);
30 }
31}
32
33#include <cgv/config/lib_end.h>
the cgv namespace
Definition print.h:11