#include <stdio.h>#include <stdlib.h>#include <string.h>#include <math.h>#include <time.h>#include "tle.h"
Go to the source code of this file.
Macros | |
| #define | AE 1.0 |
| #define | CK2 5.413080E-4 /* = 0.5*XJ2*AE*AE */ |
| #define | CK4 0.62098875E-6 /* = -0.375*XJ4*AE*AE*AE*AE */ |
| #define | DE2RA 0.174532925E-1 |
| #define | E6A 1.E-6 |
| #define | MAXLEAPS 64 /* max number of leap seconds table */ |
| #define | MAXPRNCMP 62 /* max satellite sat number of BeiDou */ |
| #define | MAXPRNGAL 36 /* max satellite PRN number of Galileo */ |
| #define | MAXPRNGLO 25 /* max satellite slot number of GLONASS */ |
| #define | MAXPRNGPS 32 /* max satellite PRN number of GPS */ |
| #define | MAXPRNLEO 10 /* max satellite sat number of LEO */ |
| #define | MAXPRNQZS 199 /* max satellite PRN number of QZSS */ |
| #define | MAXPRNSBS 142 /* max satellite PRN number of SBAS */ |
| #define | MAXSAT (NSATGPS+NSATGLO+NSATGAL+NSATQZS+NSATCMP+NSATSBS+NSATLEO) |
| #define | MINPRNCMP 1 /* min satellite sat number of BeiDou */ |
| #define | MINPRNGAL 1 /* min satellite PRN number of Galileo */ |
| #define | MINPRNGLO 1 /* min satellite slot number of GLONASS */ |
| #define | MINPRNGPS 1 /* min satellite PRN number of GPS */ |
| #define | MINPRNLEO 1 /* min satellite sat number of LEO */ |
| #define | MINPRNQZS 193 /* min satellite PRN number of QZSS */ |
| #define | MINPRNSBS 120 /* min satellite PRN number of SBAS */ |
| #define | NSATCMP (MAXPRNCMP-MINPRNCMP+1) /* number of BeiDou satellites */ |
| #define | NSATGAL (MAXPRNGAL-MINPRNGAL+1) /* number of Galileo satellites */ |
| #define | NSATGLO (MAXPRNGLO-MINPRNGLO+1) /* number of GLONASS satellites */ |
| #define | NSATGPS (MAXPRNGPS-MINPRNGPS+1) /* number of GPS satellites */ |
| #define | NSATLEO (MAXPRNLEO-MINPRNLEO+1) /* number of LEO satellites */ |
| #define | NSATQZS (MAXPRNQZS-MINPRNQZS+1) /* number of QZSS satellites */ |
| #define | NSATSBS (MAXPRNSBS-MINPRNSBS+1) /* number of SBAS satellites */ |
| #define | OMGE 7.2921151467E-5 /* earth angular velocity (IS-GPS) (rad/s) */ |
| #define | PI 3.1415926535897932 /* pi */ |
| #define | QOMS2T 1.88027916E-9 /* = pow((QO-SO)*AE/XKMPER,4.0) */ |
| #define | S 1.01222928 /* = AE*(1.0+SO/XKMPER) */ |
| #define | TOTHRD 0.66666667 |
| #define | TWOPI 6.2831853 |
| #define | XJ3 -0.253881E-5 |
| #define | XKE 0.743669161E-1 |
| #define | XKMPER 6378.135 |
| #define | XMNPDA 1440.0 |
Functions | |
| static int | add_data (tle_t *tle, const tled_t *data) |
| static int | checksum (const char *buff) |
| static void | chop (char *buff) |
| static int | cmp_tle_data (const void *p1, const void *p2) |
| static int | decode_line1 (const char *buff, tled_t *data) |
| static int | decode_line2 (const char *buff, tled_t *data) |
| gtime_t | epoch2time (const double *ep) |
| int | geterp (const erp_t *erp, gtime_t time, double *erpv) |
| gtime_t | gpst2utc (gtime_t t) |
| void | matmul (const char *tr, int n, int k, int m, double alpha, const double *A, const double *B, double beta, double *C) |
| static void | SGP4_STR3 (double tsince, const tled_t *data, double *rs) |
| double | str2num (const char *s, int i, int n) |
| void | time2epoch (gtime_t t, double *ep) |
| static double | time2sec (gtime_t time, gtime_t *day) |
| gtime_t | timeadd (gtime_t t, double sec) |
| double | timediff (gtime_t t1, gtime_t t2) |
| int | tle_pos (gtime_t time, const char *name, const char *satno, const char *desig, const tle_t *tle, const erp_t *erp, double *rs) |
| int | tle_read (const char *file, tle_t *tle) |
| void | trace (int level, const char *format,...) |
| double | utc2gmst (gtime_t t, double ut1_utc) |
| gtime_t | utc2gpst (gtime_t t) |
Variables | |
| static double | leaps [MAXLEAPS+1][7] |
| #define MAXPRNGLO 25 /* max satellite slot number of GLONASS */ |
| #define OMGE 7.2921151467E-5 /* earth angular velocity (IS-GPS) (rad/s) */ |
|
static |