GPS Satellite Clock Parameters to Clock Correction Code

04/20/95

Peter H. Dana

Department of Geography, University of Texas at Austin

Send mail to: pdana@mail.utexas.edu

GPS Satellite Clock Correction from Clock Correction Parameters

Please use this code at your own risk. This code is provided for those who are curious about GPS algorithms. Please do not use this code for navigation. Code for a navigation receiver should contain safeguards against out-of-tolerance parameters and arguments and be the result of a careful software development program.

SV Clock and GPS Time stuctures are easy to figure out. GPS Time is kept as Weeks and Seconds (from Jan. 5 midnight/Jan. 6 morning of 1980.)


/* clkcor */

#include "gsinclud.h"

/* sv clock correction in seconds */

/* ************************************ */

/* Peter H. Dana */

/* POB 1297 */

/* Georgetown, TX 78627 */

/* ************************************ */

clkcor(svclock,gpstime,predict)

struct svclock_struct *svclock;

struct gpstime_struct *gpstime;

struct predict_struct *predict;

{

double dt;

double dtsv;

dt=gpstime->seconds-svclock->toc;

dtsv=svclock->af0+svclock->af1*(dt)+svclock->af2*dt*dt-svclock->tgd;

predict->svclk=-dtsv*C;

}/* end of program */