00001 /* 00002 * Copyright (C) 2007 David Chin, Jolien Creighton 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU General Public License 00015 * along with with program; see the file COPYING. If not, write to the 00016 * Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 00017 * MA 02111-1307 USA 00018 */ 00019 00020 #include <stdio.h> 00021 #include <math.h> 00022 #include <stdlib.h> 00023 #include <time.h> 00024 00025 #include <lal/LALStdlib.h> 00026 #include <lal/Date.h> 00027 #include <lal/AVFactories.h> 00028 00029 INT4 lalDebugLevel = 0; 00030 00031 NRCSID (TESTGPSTOGMST1C, "$Id: TestGPStoGMST1.c,v 1.4 2007/06/08 14:41:43 bema Exp $"); 00032 00033 int main(void) 00034 { 00035 static LALStatus status; 00036 LALMSTUnitsAndAcc mstUnitsAndAcc; 00037 LIGOTimeGPS gps = {0., 0.}; 00038 REAL8 gmst; 00039 00040 gps.gpsSeconds = 61094; 00041 mstUnitsAndAcc.units = MST_RAD; 00042 mstUnitsAndAcc.accuracy = LALLEAPSEC_LOOSE; 00043 00044 for (gps.gpsNanoSeconds =99999999; gps.gpsNanoSeconds < 1000000000; 00045 gps.gpsNanoSeconds+=10000000) 00046 { 00047 LALGPStoGMST1(&status, &gmst, &gps, &mstUnitsAndAcc); 00048 printf("nSec = %d\tgmst = %g\n", gps.gpsNanoSeconds, gmst); 00049 } 00050 00051 return 0; 00052 } 00053
1.5.2