home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
nisttime.carsoncity.k12.mi.us
/
nisttime.carsoncity.k12.mi.us.tar
/
nisttime.carsoncity.k12.mi.us
/
pub
/
lockclock
/
lock.h
< prev
next >
Wrap
C/C++ Source or Header
|
1996-11-18
|
2KB
|
54 lines
/*
include file lock.h defines structure of each
lock record
*/
#include "sizint.h"
struct lockst /*structure for lock state*/
{
LONG day; /*MJD of data*/
LONG fday; /*time in seconds after midnight*/
int mode; /*current mode -- see comments*/
double x; /*time difference measured in s*/
double y; /*rate difference estimated in s/s*/
double d; /*drift of local rate in s/s**2 */
int flags; /*state flags -- see comments*/
int waitn; /*nominal delay until next time in sec*/
int waitx; /*actual delay since last time in sec*/
double errx; /*error in time prediction */
double ybar; /*average of rate difference y */
double sumerr; /*integral of errx */
} ;
struct lockpm
{
float xsigma; /*measurement noise in s*/
int flags; /*flag word*/
int wait0; /*initial delay between cycles*/
int iavgt; /*time constant for freq avg. */
float xoffst; /*offset bias for time data */
} ;
/*
the flags word is treated as a series of bits with the
following meanings:
bit 0 (least sig. bit) = 0 do not advance to mode 4
= 1 advance to mode 4 and lock clock
bit 1 = 0 do not copy lock file when full
= 1 copy lock file when almost full
bit 2 = 0 clock is to be set using adjtime
= 1 clock is set in 1 step using
settimeofday()
bit 3 = 0 stay in mode 6 and use acts
= 1 advance to mode 7 and use CTS
pulses.
bit 4 = 0 leap seconds via slew
= 1 leap second via call to David
Mills kernel entry point
*/
/*
parameter NUMSTATES sets the size of the push-down stack
of state vectors that are saved
*/
#define NUMSTATES 750