19 #ifndef GNSS_SDR_GEOFUNCTIONS_H 20 #define GNSS_SDR_GEOFUNCTIONS_H 22 #if ARMA_NO_BOUND_CHECKING 23 #define ARMA_NO_DEBUG 1 36 double WGS84_g0(
double Lat_rad);
38 double WGS84_geocentric_radius(
double Lat_geodetic_rad);
54 int topocent(
double *Az,
double *El,
double *D,
const arma::vec &x,
const arma::vec &dx);
77 int togeod(
double *dphi,
double *dlambda,
double *h,
double a,
double finv,
double X,
double Y,
double Z);
92 arma::vec
cart2geo(
const arma::vec &XYZ,
int elipsoid_selection);
94 arma::vec LLH_to_deg(
const arma::vec &LLH);
96 double degtorad(
double angleInDegrees);
98 double radtodeg(
double angleInRadians);
100 double mstoknotsh(
double MetersPerSeconds);
102 double mstokph(
double MetersPerSeconds);
104 arma::vec CTM_to_Euler(
const arma::mat &C);
106 arma::mat Euler_to_CTM(
const arma::vec &eul);
108 void ECEF_to_Geo(
const arma::vec &r_eb_e,
const arma::vec &v_eb_e,
const arma::mat &C_b_e, arma::vec &LLH, arma::vec &v_eb_n, arma::mat &C_b_n);
128 void Geo_to_ECEF(
const arma::vec &LLH,
const arma::vec &v_eb_n,
const arma::mat &C_b_n, arma::vec &r_eb_e, arma::vec &v_eb_e, arma::mat &C_b_e);
149 void pv_Geo_to_ECEF(
double L_b,
double lambda_b,
double h_b,
const arma::vec &v_eb_n, arma::vec &r_eb_e, arma::vec &v_eb_e);
161 void cart2utm(
const arma::vec &r_eb_e,
int zone, arma::vec &r_enu);
167 int findUtmZone(
double latitude_deg,
double longitude_deg);
173 double clsin(
const arma::colvec &ar,
int degree,
double argument);
179 void clksin(
const arma::colvec &ar,
int degree,
double arg_real,
double arg_imag,
double *re,
double *im);
184 #endif // GNSS_SDR_GEOFUNCTIONS_H double great_circle_distance(double lat1, double lon1, double lat2, double lon2)
The Haversine formula determines the great-circle distance between two points on a sphere given their...
void cart2utm(const arma::vec &r_eb_e, int zone, arma::vec &r_enu)
Transformation of ECEF (X,Y,Z) to (E,N,U) in UTM, zone 'zone'.
int findUtmZone(double latitude_deg, double longitude_deg)
Function finds the UTM zone number for given longitude and latitude.
double clsin(const arma::colvec &ar, int degree, double argument)
Clenshaw summation of sinus of argument.
int topocent(double *Az, double *El, double *D, const arma::vec &x, const arma::vec &dx)
Transformation of vector dx into topocentric coordinate system with origin at x Inputs: x - vector or...
arma::vec cart2geo(const arma::vec &XYZ, int elipsoid_selection)
Conversion of Cartesian coordinates (X,Y,Z) to geographical coordinates (latitude, longitude, h) on a selected reference ellipsoid.
arma::mat Skew_symmetric(const arma::vec &a)
Calculates skew-symmetric matrix.
void Geo_to_ECEF(const arma::vec &LLH, const arma::vec &v_eb_n, const arma::mat &C_b_n, arma::vec &r_eb_e, arma::vec &v_eb_e, arma::mat &C_b_e)
From Geographic to ECEF coordinates.
arma::vec Gravity_ECEF(const arma::vec &r_eb_e)
Calculates acceleration due to gravity resolved about ECEF-frame.
void clksin(const arma::colvec &ar, int degree, double arg_real, double arg_imag, double *re, double *im)
Clenshaw summation of sinus with complex argument.
int togeod(double *dphi, double *dlambda, double *h, double a, double finv, double X, double Y, double Z)
Subroutine to calculate geodetic coordinates latitude, longitude, height given Cartesian coordinates ...
void pv_Geo_to_ECEF(double L_b, double lambda_b, double h_b, const arma::vec &v_eb_n, arma::vec &r_eb_e, arma::vec &v_eb_e)
Converts curvilinear to Cartesian position and velocity resolving axes from NED to ECEF This function...