58 #ifndef GNSS_SDR_RTKLIB_RTKCMN_H 59 #define GNSS_SDR_RTKLIB_RTKCMN_H 71 (X)[1] = (X)[2] = (X)[3] = (X)[6] = 0.0; \ 72 (X)[4] = (X)[8] = cos(t); \ 82 (X)[1] = (X)[3] = (X)[5] = (X)[7] = 0.0; \ 83 (X)[0] = (X)[8] = cos(t); \ 93 (X)[2] = (X)[5] = (X)[6] = (X)[7] = 0.0; \ 94 (X)[0] = (X)[4] = cos(t); \ 100 char *strncpy_no_trunc(
char *out,
size_t outsz,
const char *in,
size_t insz);
101 void fatalerr(
const char *format, ...);
102 int satno(
int sys,
int prn);
103 int satsys(
int sat,
int *prn);
104 int satid2no(
const char *
id);
105 void satno2id(
int sat,
char *
id);
106 int satexclude(
int sat,
int svh,
const prcopt_t *opt);
107 int testsnr(
int base,
int freq,
double el,
double snr,
const snrmask_t *mask);
108 unsigned char obs2code(
const char *obs,
int *freq);
109 char *code2obs(
unsigned char code,
int *freq);
110 void setcodepri(
int sys,
int freq,
const char *pri);
111 int getcodepri(
int sys,
unsigned char code,
const char *opt);
112 unsigned int getbitu(
const unsigned char *buff,
int pos,
int len);
113 int getbits(
const unsigned char *buff,
int pos,
int len);
114 void setbitu(
unsigned char *buff,
int pos,
int len,
unsigned int data);
115 void setbits(
unsigned char *buff,
int pos,
int len,
int data);
116 unsigned int rtk_crc32(
const unsigned char *buff,
int len);
117 unsigned int rtk_crc24q(
const unsigned char *buff,
int len);
118 unsigned short rtk_crc16(
const unsigned char *buff,
int len);
119 int decode_word(
unsigned int word,
unsigned char *data);
120 double *mat(
int n,
int m);
121 int *imat(
int n,
int m);
122 double *zeros(
int n,
int m);
124 double dot(
const double *a,
const double *b,
int n);
125 double norm_rtk(
const double *a,
int n);
126 void cross3(
const double *a,
const double *b,
double *c);
127 int normv3(
const double *a,
double *b);
128 void matcpy(
double *A,
const double *B,
int n,
int m);
129 void matmul(
const char *tr,
int n,
int k,
int m,
double alpha,
130 const double *A,
const double *B,
double beta,
double *C);
131 int matinv(
double *A,
int n);
132 int solve(
const char *tr,
const double *A,
const double *Y,
int n,
134 int lsq(
const double *A,
const double *y,
int n,
int m,
double *x,
136 int filter_(
const double *x,
const double *P,
const double *H,
137 const double *v,
const double *R,
int n,
int m,
138 double *xp,
double *Pp);
139 int filter(
double *x,
double *P,
const double *H,
const double *v,
140 const double *R,
int n,
int m);
141 int smoother(
const double *xf,
const double *Qf,
const double *xb,
142 const double *Qb,
int n,
double *xs,
double *Qs);
143 void matfprint(
const double A[],
int n,
int m,
int p,
int q, FILE *fp);
144 void matsprint(
const double A[],
int n,
int m,
int p,
int q, std::string &buffer);
145 void matprint(
const double A[],
int n,
int m,
int p,
int q);
146 double str2num(
const char *s,
int i,
int n);
147 int str2time(
const char *s,
int i,
int n,
gtime_t *t);
148 gtime_t epoch2time(
const double *ep);
149 void time2epoch(
gtime_t t,
double *ep);
150 gtime_t gpst2time(
int week,
double sec);
151 double time2gpst(
gtime_t t,
int *week);
152 gtime_t gst2time(
int week,
double sec);
153 double time2gst(
gtime_t t,
int *week);
154 gtime_t bdt2time(
int week,
double sec);
155 double time2bdt(
gtime_t t,
int *week);
161 int read_leaps_text(FILE *fp);
162 int read_leaps_usno(FILE *fp);
163 int read_leaps(
const char *file);
169 double utc2gmst(
gtime_t t,
double ut1_utc);
170 void time2str(
gtime_t t,
char *s,
int n);
171 char *time_str(
gtime_t t,
int n);
173 int adjgpsweek(
int week,
bool pre_2009_file =
false);
174 unsigned int tickget();
175 void sleepms(
int ms);
176 void deg2dms(
double deg,
double *dms,
int ndec);
177 void deg2dms(
double deg,
double *dms);
178 double dms2deg(
const double *dms);
179 void ecef2pos(
const double *r,
double *pos);
180 void pos2ecef(
const double *pos,
double *r);
181 void xyz2enu(
const double *pos,
double *E);
182 void ecef2enu(
const double *pos,
const double *r,
double *e);
183 void enu2ecef(
const double *pos,
const double *e,
double *r);
184 void covenu(
const double *pos,
const double *P,
double *Q);
185 void covecef(
const double *pos,
const double *Q,
double *P);
186 void ast_args(
double t,
double *f);
187 void nut_iau1980(
double t,
const double *f,
double *dpsi,
double *deps);
188 void eci2ecef(
gtime_t tutc,
const double *erpv,
double *U,
double *gmst);
189 int decodef(
char *p,
int n,
double *v);
191 int readngspcv(
const char *file,
pcvs_t *pcvs);
192 int readantex(
const char *file,
pcvs_t *pcvs);
193 int readpcv(
const char *file,
pcvs_t *pcvs);
194 pcv_t *searchpcv(
int sat,
const char *type,
gtime_t time,
196 void readpos(
const char *file,
const char *rcv,
double *pos);
197 int readblqrecord(FILE *fp,
double *odisp);
198 int readblq(
const char *file,
const char *sta,
double *odisp);
199 int readerp(
const char *file,
erp_t *erp);
200 int geterp(
const erp_t *erp,
gtime_t time,
double *erpv);
201 int cmpeph(
const void *p1,
const void *p2);
202 void uniqeph(
nav_t *nav);
203 int cmpgeph(
const void *p1,
const void *p2);
204 void uniqgeph(
nav_t *nav);
205 int cmpseph(
const void *p1,
const void *p2);
206 void uniqseph(
nav_t *nav);
207 void uniqnav(
nav_t *nav);
208 int cmpobs(
const void *p1,
const void *p2);
209 int sortobs(
obs_t *obs);
211 int readnav(
const char *file,
nav_t *nav);
212 int savenav(
const char *file,
const nav_t *nav);
213 void freeobs(
obs_t *obs);
214 void freenav(
nav_t *nav,
int opt);
216 void traceopen(
const char *file);
218 void tracelevel(
int level);
220 void trace(
int level,
const char *format, ...);
221 void tracet(
int level,
const char *format, ...);
222 void tracemat(
int level,
const double *A,
int n,
int m,
int p,
int q);
223 void traceobs(
int level,
const obsd_t *obs,
int n);
231 int execcmd(
const char *cmd);
232 void createdir(
const char *path);
233 int repstr(
char *str,
const char *pat,
const char *rep);
234 int reppath(
const char *path,
char *rpath,
gtime_t time,
const char *rov,
236 int reppaths(
const char *path,
char *rpath[],
int nmax,
gtime_t ts,
237 gtime_t te,
const char *rov,
const char *base);
238 double satwavelen(
int sat,
int frq,
const nav_t *nav);
239 double geodist(
const double *rs,
const double *rr,
double *e);
240 double satazel(
const double *pos,
const double *e,
double *azel);
242 void dops(
int ns,
const double *azel,
double elmin,
double *dop);
243 double ionmodel(
gtime_t t,
const double *ion,
const double *pos,
245 double ionmapf(
const double *pos,
const double *azel);
246 double ionppp(
const double *pos,
const double *azel,
double re,
247 double hion,
double *posp);
248 double tropmodel(
gtime_t time,
const double *pos,
const double *azel,
250 double interpc(
const double coef[],
double lat);
251 double mapf(
double el,
double a,
double b,
double c);
252 double nmf(
gtime_t time,
const double pos[],
const double azel[],
254 double tropmapf(
gtime_t time,
const double pos[],
const double azel[],
256 double interpvar(
double ang,
const double *var);
258 void antmodel(
const pcv_t *pcv,
const double *del,
const double *azel,
259 int opt,
double *dant);
261 void antmodel_s(
const pcv_t *pcv,
double nadir,
double *dant);
262 void sunmoonpos_eci(
gtime_t tut,
double *rsun,
double *rmoon);
263 void sunmoonpos(
gtime_t tutc,
const double *erpv,
double *rsun,
264 double *rmoon,
double *gmst);
265 void csmooth(
obs_t *obs,
int ns);
266 int rtk_uncompress(
const char *file,
char *uncfile);
267 int expath(
const char *path,
char *paths[],
int nmax);
268 void windupcorr(
gtime_t time,
const double *rs,
const double *rr,
double *phw);
270 #endif // GNSS_SDR_RTKLIB_RTKCMN_H
main header file for the rtklib library