45 #if defined( USE_SPRINTF ) 46 #error USE_SPRINTF was obsoleted by USE_SNPRINTF. Please update project settings. 49 #if !defined( USE_SNPRINTF ) 50 #define USE_SNPRINTF 0 53 #if !defined( _USE_GPSUTILS_FULL ) 54 #if defined( MBG_TGT_WIN32 ) && defined( __BORLANDC__ ) 55 #define _USE_GPSUTILS_FULL 1 57 #define _USE_GPSUTILS_FULL 0 67 #if _USE_GPSUTILS_FULL 76 #if USE_SNPRINTF || _USE_GPSUTILS_FULL 78 static const char str_na[] =
"N/A";
111 for ( i = 0; i < 2; i++ )
269 for ( i = 0; i <
N_XYZ; i++ )
272 for ( i = 0; i <
N_LLA; i++ )
300 size_t snprint_dms(
char *s,
size_t max_len,
const DMS *p,
int prec )
326 size_t snprint_alt(
char *s,
size_t max_len,
double alt )
371 #endif // USE_SNPRINTF 375 #if _USE_GPSUTILS_FULL 418 static const char *fmt_str[] =
441 static const char *unit_str[] =
453 freq = ( double ) p_ff->
khz_val * pow( 10, ( p_ff->
range + 3 ) );
456 range = ( ( int ) log10( freq ) );
460 if ( ( range >= -3 ) && ( range <= 8 ) )
463 format = ( ( ( range % 3 ) + 3 ) % 3 );
466 unit = (
ushort )( range + 3 ) / 3;
469 freq = freq / pow( 10, ( ( 3 * unit ) - 3 ) );
470 n =
snprintf_safe( s, max_len, fmt_str[format], freq, unit_str[unit] );
485 #endif // _USE_GPSUTILS_FULL double deltan
+- Mean Motion Diff. from computed value [rad/sec]
DMS longitude
Longitude broken down to degrees, minutes, seconds.
size_t snprint_alt(char *s, size_t max_len, double alt)
Print the altitude part of a geo position into a string buffer.
double A1
+- Clock Correction Coefficient 1 [sec/sec]
Ephemeris parameters of one specific satellite.
A structure used to hold a fixed frequency value.
GPS UTC correction parameters.
int16_t range
an optional base 10 exponent
double beta_0
Ionosph. Corr. Coeff. Beta 0 [sec].
double af2
+- Clock Correction Coefficient 2 [sec/sec^2]
double e
Eccentricity [—].
double af1
+- Clock Correction Coefficient 1 [sec/sec]
double alpha_2
Ionosph. Corr. Coeff. Alpha 2 [sec/deg^2].
double alpha_1
Ionosph. Corr. Coeff. Alpha 1 [sec/deg].
int sn_cpy_str_safe(char *dst, size_t max_len, const char *src)
A function to copy a string safely, returning the number of characters copied.
double crs
+- Sine Corr. Term to Orbit Radius [m]
DMS latitude
Latitude broken down to degrees, minutes, seconds.
void swap_iono_doubles(IONO *p)
Swap the "double" fields in a IONO structure.
void swap_eph_doubles(EPH *p)
Swap the "double" fields in an EPH structure.
double af0
+- Clock Correction Coefficient 0 [sec]
double OMEGA0
+- Longit. of Asc. Node of orbit plane [rad]
double tgd
+- estimated group delay differential [sec]
double cuc
+- Cosine Corr. Term to Arg. of Latitude [rad]
double beta_2
Ionosph. Corr. Coeff. Beta 2 [sec/deg^2].
double beta_1
Ionosph. Corr. Coeff. Beta 1 [sec/deg].
double alpha_3
Ionosph. Corr. Coeff. Alpha 3 [sec/deg^3].
double A0
+- Clock Correction Coefficient 0 [sec]
double idot
+- Rate of Inclination Angle [rad/sec]
Geographic longitude or latitude in [degrees, minutes, seconds].
double sqrt_A
Square Root of semi-major Axis [sqrt(m)].
void swap_alm_doubles(ALM *p)
Swap the "double" fields in an ALM structure.
size_t snprint_dms(char *s, size_t max_len, const DMS *p, int prec)
Print the DMS part of a geo position into a string buffer.
uint16_t prefix
'N', 'E', 'S' or 'W'
Ionospheric correction parameters.
double alpha_0
Ionosph. Corr. Coeff. Alpha 0 [sec].
double OMEGADOT
+- Rate of Right Ascension [rad/sec]
uint16_t deg
[0...90 (lat) or 0...180 (lon)]
double af0
+- Clock Correction Coefficient 0 [sec]
double OMEGA0
+- Longit. of Asc. Node of orbit plane [rad]
void swap_utc_doubles(UTC *p)
Swap the "double" fields in a UTC structure.
double M0
+- Mean Anomaly at Ref. Time [rad]
size_t snprint_pos_geo(char *s, size_t max_len, const POS *p, char sep, int prec)
Print a geo position in POS format into a string buffer.
Almanac parameters of one specific satellite.
double crc
+- Cosine Corr. Term to Orbit Radius [m]
double e
Eccentricity [—].
A geographic position represented in different formats.
XYZ xyz
Always WGS84 ECEF coordinates.
double beta_3
Ionosph. Corr. Coeff. Beta 3 [sec/deg^3].
void swap_double(double *p)
Swap the bytes of a single variable of type "double".
double af1
+- Clock Correction Coefficient 1 [sec/sec]
double sqrt_A
Square Root of semi-major Axis [sqrt(m)].
size_t snprint_fixed_freq(char *s, size_t max_len, FIXED_FREQ_INFO *p_ff)
Print a formatted FIXED_FREQ_INFO into a string buffer.
double OMEGADOT
+- Rate of Right Ascension [rad/sec]
double M0
+- Mean Anomaly at Ref. Time [rad]
LLA lla
Longitude, latitude and altitude, depending on the ellipsoid used for reference.
int snprintf_safe(char *s, size_t max_len, const char *fmt,...)
A portable, safe implementation of snprintf()
double omega
+- Argument of Perigee [rad]
double sec
[0...59.99999...]
void swap_pos_doubles(POS *p)
Swap the "double" fields in a POS structure.
double cis
+- Sine Corr. Term to Inclination Angle [rad]
double cus
+- Sine Corr. Term to Arg. of Latitude [rad]
double cic
+- Cosine Corr. Term to Inclination Angle [rad]
uint16_t khz_val
the base frequency in [kHz]
double omega
+- Argument of Perigee [rad]
double i0
+- Inclination Angle [rad]