|
MRTKLIB 0.7.14
Modernized GNSS Positioning Library
|
MRTKLIB Coordinates Module — Coordinate transformations and geometry. More...
Go to the source code of this file.
Functions | |
| void | deg2dms (double deg, double *dms, int ndec) |
| Convert degree to degree-minute-second. | |
| double | dms2deg (const double *dms) |
| Convert degree-minute-second to degree. | |
| void | ecef2pos (const double *r, double *pos) |
| Transform ECEF position to geodetic position. | |
| void | pos2ecef (const double *pos, double *r) |
| Transform geodetic position to ECEF position. | |
| void | xyz2enu (const double *pos, double *E) |
| Compute ECEF to local coordinate transformation matrix. | |
| void | ecef2enu (const double *pos, const double *r, double *e) |
| Transform ECEF vector to local tangential coordinate. | |
| void | enu2ecef (const double *pos, const double *e, double *r) |
| Transform local tangential coordinate vector to ECEF. | |
| void | covenu (const double *pos, const double *P, double *Q) |
| Transform ECEF covariance to local tangential coordinate. | |
| void | covecef (const double *pos, const double *Q, double *P) |
| Transform local ENU covariance to ECEF coordinate. | |
| void | eci2ecef (gtime_t tutc, const double *erpv, double *U, double *gmst) |
| Compute ECI to ECEF transformation matrix. | |
| double | geodist (const double *rs, const double *rr, double *e) |
| Compute geometric distance and receiver-to-satellite unit vector. | |
| double | satazel (const double *pos, const double *e, double *azel) |
| Compute satellite azimuth/elevation angle. | |
| void | dops (int ns, const double *azel, double elmin, double *dop) |
| Compute DOP (dilution of precision). | |
MRTKLIB Coordinates Module — Coordinate transformations and geometry.
This header provides coordinate transformation functions (ECEF, geodetic, ENU), rotation matrices, degree/DMS conversions, ECI-to-ECEF transformation, and positioning geometry functions (geometric distance, satellite azimuth/ elevation, DOP computation).
Definition in file mrtk_coords.h.
| void covecef | ( | const double * | pos, |
| const double * | Q, | ||
| double * | P ) |
Transform local ENU covariance to ECEF coordinate.
| [in] | pos | Geodetic position {lat, lon} (rad) |
| [in] | Q | Covariance in local ENU coordinate |
| [out] | P | Covariance in ECEF coordinate |
Definition at line 202 of file mrtk_coords.c.
References matmul(), and xyz2enu().
Referenced by udpos(), udpos(), and udpos_ppp().
| void covenu | ( | const double * | pos, |
| const double * | P, | ||
| double * | Q ) |
Transform ECEF covariance to local tangential coordinate.
| [in] | pos | Geodetic position {lat, lon} (rad) |
| [in] | P | Covariance in ECEF coordinate |
| [out] | Q | Covariance in local tangential coordinate |
Definition at line 188 of file mrtk_coords.c.
References matmul(), and xyz2enu().
Referenced by outenu(), and outpos().
| void deg2dms | ( | double | deg, |
| double * | dms, | ||
| int | ndec ) |
Convert degree to degree-minute-second.
| [in] | deg | Degree |
| [out] | dms | Degree-minute-second {deg, min, sec} |
| [in] | ndec | Number of decimals of second |
Definition at line 63 of file mrtk_coords.c.
Referenced by outrpos().
| double dms2deg | ( | const double * | dms | ) |
Convert degree-minute-second to degree.
| [in] | dms | Degree-minute-second {deg, min, sec} |
Definition at line 86 of file mrtk_coords.c.
| void dops | ( | int | ns, |
| const double * | azel, | ||
| double | elmin, | ||
| double * | dop ) |
Compute DOP (dilution of precision).
| [in] | ns | Number of satellites |
| [in] | azel | Satellite azimuth/elevation angle (rad) |
| [in] | elmin | Elevation cutoff angle (rad) |
| [out] | dop | DOPs {GDOP, PDOP, HDOP, VDOP} |
Definition at line 545 of file mrtk_coords.c.
References matinv(), matmul(), MAXSAT, and SQRT.
Referenced by outnmea_gsa(), valsol(), zddop(), and zddop().
| void ecef2enu | ( | const double * | pos, |
| const double * | r, | ||
| double * | e ) |
Transform ECEF vector to local tangential coordinate.
| [in] | pos | Geodetic position {lat, lon} (rad) |
| [in] | r | Vector in ECEF coordinate {x, y, z} |
| [out] | e | Vector in local tangential coordinate {e, n, u} |
Definition at line 162 of file mrtk_coords.c.
References matmul(), and xyz2enu().
Referenced by outenu(), outnmea_rmc(), outpos(), outrnxevent(), ppprtk_outstat(), rtkoutstat(), satazel(), setopt_sta(), and setpcv().
| void ecef2pos | ( | const double * | r, |
| double * | pos ) |
Transform ECEF position to geodetic position.
| [in] | r | ECEF position {x, y, z} (m) |
| [out] | pos | Geodetic position {lat, lon, h} (rad, m) |
Definition at line 102 of file mrtk_coords.c.
References dot(), FE_WGS84, PI, and RE_WGS84.
Referenced by antpos(), clas_osr_zdres(), clas_ssr2osr(), corr_iono_plane(), corr_trop_plane(), ddres(), ddres(), ddres(), decode_type1005(), decode_type1006(), dump_stas(), get_site(), gettriangledd(), outenu(), outnmea_gga(), outnmea_rmc(), outpos(), outrnxevent(), outrpos(), ppp_rtk_pos(), ppprtk_outstat(), rescode(), resdop(), rtkoutstat(), rtksvrmark(), selpersta(), setopt_sta(), setpcv(), sta_sel_iono(), sta_sel_trop(), sysopts2buff(), udpos(), udpos(), udpos_ppp(), update_antpos(), windupcorr(), zdres(), and zdres().
| void eci2ecef | ( | gtime_t | tutc, |
| const double * | erpv, | ||
| double * | U, | ||
| double * | gmst ) |
Compute ECI to ECEF transformation matrix.
| [in] | tutc | Time in UTC |
| [in] | erpv | ERP values {xp, yp, ut1_utc, lod} (rad, rad, s, s/d) |
| [out] | U | ECI to ECEF transformation matrix (3x3) |
| [in,out] | gmst | Greenwich mean sidereal time (rad) (NULL: no output) |
Definition at line 399 of file mrtk_coords.c.
References AS2R, ast_args(), epoch2time(), matmul(), NP, nut_iau1980(), Rx, Ry, Rz, time_str(), timediff(), trace(), tracemat(), utc2gmst(), and utc2gpst().
Referenced by sunmoonpos().
| void enu2ecef | ( | const double * | pos, |
| const double * | e, | ||
| double * | r ) |
Transform local tangential coordinate vector to ECEF.
| [in] | pos | Geodetic position {lat, lon} (rad) |
| [in] | e | Vector in local tangential coordinate {e, n, u} |
| [out] | r | Vector in ECEF coordinate {x, y, z} |
Definition at line 175 of file mrtk_coords.c.
References matmul(), and xyz2enu().
Referenced by antpos(), and update_antpos().
| double geodist | ( | const double * | rs, |
| const double * | rr, | ||
| double * | e ) |
Compute geometric distance and receiver-to-satellite unit vector.
| [in] | rs | Satellite position (ECEF at transmission) (m) |
| [in] | rr | Receiver position (ECEF at reception) (m) |
| [out] | e | Line-of-sight vector (ECEF) |
Definition at line 493 of file mrtk_coords.c.
References CLIGHT, norm(), OMGE, and RE_WGS84.
Referenced by clas_osr_adjust_r_dts(), clas_osr_zdres(), rescode(), zdres(), and zdres().
| void pos2ecef | ( | const double * | pos, |
| double * | r ) |
Transform geodetic position to ECEF position.
| [in] | pos | Geodetic position {lat, lon, h} (rad, m) |
| [out] | r | ECEF position {x, y, z} (m) |
Definition at line 122 of file mrtk_coords.c.
References FE_WGS84, and RE_WGS84.
Referenced by buff2sysopts(), decode_bnx_00(), decode_lcliono(), decode_lcltrop(), decode_nmeagga(), decode_nmearmc(), decode_pvtgeodetic(), decode_refpos(), decode_solllh(), get_site(), getstapos(), miono_sel_area(), and selpersta().
| double satazel | ( | const double * | pos, |
| const double * | e, | ||
| double * | azel ) |
Compute satellite azimuth/elevation angle.
| [in] | pos | Geodetic position {lat, lon, h} (rad, m) |
| [in] | e | Receiver-to-satellite unit vector (ECEF) |
| [in,out] | azel | Azimuth/elevation {az, el} (rad) (NULL: no output) (0.0<=azel[0]<2*pi, -pi/2<=azel[1]<=pi/2) |
Definition at line 517 of file mrtk_coords.c.
References dot(), ecef2enu(), PI, and RE_WGS84.
Referenced by clas_osr_zdres(), rescode(), zdres(), and zdres().
| void xyz2enu | ( | const double * | pos, |
| double * | E ) |
Compute ECEF to local coordinate transformation matrix.
| [in] | pos | Geodetic position {lat, lon} (rad) |
| [out] | E | ECEF to local coord transformation matrix (3x3) |
Definition at line 142 of file mrtk_coords.c.
Referenced by clas_osr_zdres(), covecef(), covenu(), ecef2enu(), enu2ecef(), resdop(), tidedisp(), and windupcorr().