00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #include "drms.h"
00013
00014 int obstime2maskid(TIME tobs)
00015 {
00016 char ttemp[64];
00017 TIME ChangeTime1, ChangeTime2, ChangeTime3, ChangeTime4, ChangeTime5, ChangeTime6, ChangeTime7, ChangeTime8, ChangeTime9;
00018 int MaskIndex = 0;
00019
00020 strcpy(ttemp, "2010.12.13_19:47:00_TAI");
00021 ChangeTime1 = sscan_time(ttemp);
00022
00023 strcpy(ttemp, "2011.07.13_18:35:00_TAI");
00024 ChangeTime2 = sscan_time(ttemp);
00025
00026 strcpy(ttemp, "2012.01.18_18:15:00_TAI");
00027 ChangeTime3 = sscan_time(ttemp);
00028
00029 strcpy(ttemp, "2013.03.14_06:40:00_TAI");
00030 ChangeTime4 = sscan_time(ttemp);
00031
00032 strcpy(ttemp, "2014.01.15_19:18:00_TAI");
00033 ChangeTime5 = sscan_time(ttemp);
00034
00035 if (tobs<ChangeTime1) MaskIndex = 0;
00036 if (tobs>ChangeTime1 && tobs<ChangeTime2) MaskIndex = 1;
00037 if (tobs>ChangeTime2 && tobs<ChangeTime3) MaskIndex = 2;
00038 if (tobs>ChangeTime3 && tobs<ChangeTime4) MaskIndex = 3;
00039 if (tobs>ChangeTime4 && tobs<ChangeTime5) MaskIndex = 4;
00040 if (tobs>ChangeTime5) MaskIndex = 5;
00041
00042 return MaskIndex;
00043 }
00044