18 #include <sys/types.h> 164 const char *
KeyCode[] = {{
"AUTORNG"}, {
"AVGCCD"}, {
"BEGIN"}, {
"CALIBRA"}, {
"DARKC"}, {
"EXPO"},
165 {
"FILTER"}, {
"GETCCD"}, {
"H_FILTER"}, {
"H_GRAT"}, {
"H_MIRROR"}, {
"HG_OFF"},
166 {
"HG_ON"}, {
"LABEL"}, {
"MEASURE"}, {
"MIRROR"}, {
"PLOT"},{
"QJ_OFF"},
167 {
"QJ_ON"}, {
"RADIO"}, {
"REM"}, {
"SAVE"}, {
"WAIT"}, {
"WAVELEN"}, {
"XEND"},
168 {
"MEASHOR"}, {
"ELAMPON"}, {
"ELAMPOFF"}, {
"ESHUTOP"}, {
"ESHUTCL"},
169 {
"H_ZEN"}, {
"H_AZI"}, {
"ZENITH"}, {
"AZIMUTH"}, {
"AAMEASURE"}, {
"AVGCCDHOR"},
170 {
"CHKEXLAMP"}, {
"AAPOSIT"}, {
"IREFSUN"}, {
"MEASHOR2"},{
"SETCCDTEMP"},{
"SETCCDVBIN"},
171 {
"SETCCDPOW"}, {
"NDFILTER"}, {
"H_NDFW"}, {
"DFMEASURE"}, {
"SETCCDOFFS"}, {
"QJSCAN"},
172 {
"H_GRAT_CAL"}, {
"HGSCAN"}, {
"ALMUCANTAR"}, {
"DIRECTSUN"} };
182 int wl[] = { 2823, 3337, 3850, 4358, 4861, 5332, 5814,
183 6282, 6734, 7201, 7677, 8195, 8622, 9023,
184 9405, 9758, 10066, 10358 };
195 long wav[] = { 36803, 24479, 12180, 0, -12238, -24031, -35587,
196 -46808, -57645, -68842, -80254, -92674, -102911, -112526,
197 -121684, -130148, -137532, -144533};
204 char *
Fil_Code8H[] = {{
"NULL"}, {
"UG5"}, {
"UG11"}, {
"BG23"}, {
"NULL"}, {
"NULL"}, {
"LPAS"}, {
"NULL"}};
207 char *
Fil_Code[] = {{
"NULL"}, {
"UG11"}, {
"UG1 "}, {
"BG12"}, {
"BG25"}, {
"H475"}};
210 char *
Fil_CodeTropo[] = {{
"NULL"}, {
"BG28"}, {
"UG11"}, {
"BG12"}, {
"BG23"}, {
"HPas"}};
213 char *
Fil_CodeNG1[] = {{
"NULL"}, {
"B12 "}, {
"S400"}, {
"B39 "}, {
"S500"}, {
"UG5 "}};
216 char *
Fil_CodeNG[] = {{
"NULL"}, {
"B12 "}, {
"B12F"}, {
"B39 "}, {
"B39F"}, {
"UG5 "}};
219 char *
NDFil_Code[] = {{
"NULL"}, {
"ND1"}, {
"ND2"}, {
"ND3"}, {
"ND4"}, {
"H645"}};
227 char *
HomePosition[] = {{
"H_Mir"}, {
"H_Grat"}, {
"H_Filt"}, {
"H_NDFilt"}, {
"H_Zen"}, {
"H_Azi"}, {
"Close"}};
231 const char *
Mir_Code[] = {{
"Zenith "}, {
"HorizDX"}, {
"Calibra"}, {
"HorizSX"}, {
""}, {
""}, {
""}, {
""}};
234 const char *
Mir_CodeTropo[] = {{
"Calibra "}, {
"HorizDX"}, {
"NULL "}, {
"HorizSX"}, {
""}, {
""}, {
""}, {
""}};
247 const char *
DeviceTypeInput[] = {{
"Direct"}, {
"TelesExtLamp"}, {
"Calib Lamps"}, {
"Alt-Az Platf"}, {
"Radiometer"}, {
"TelesIntLamp"}, {
"TelescopeV"}, {
""}};
251 unsigned long *
PLColor[]= {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
268 fs = fopen(buff,
"r");
269 if(fs == NULL)
return 1;
280 fscanf(fs,
"%d", &c);
285 fscanf(fs,
"%d %d", &
wl[i], &
wav[i]);
316 sprintf (buf,
"%s", cmd);
326 for(c = 0; c < NumCommands; c++)
328 if(strcmp(cmd,
KeyCode[c]) == 0)
361 if ((par < 0) | (par > 3))
364 ferr = open(filename, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
365 sprintf(buff,
"Error at line %d: Mirror Position Current value %d. Allowed values 0 to 3\n", record,par);
366 write(ferr, buff, strlen(buff));
387 ferr = open(filename, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
388 sprintf(buff,
"Error at line %d: Grating Position Current value %d. Allowed values 0 to 13\n", record, l);
389 write(ferr, buff, strlen(buff));
398 ferr = open(filename, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
399 sprintf(buff,
"Error at line %d: Wavelength value %d not encounterd in the wlstep.ini file\n", record, par);
400 write(ferr, buff, strlen(buff));
417 int er = 0, eracc = 0;
418 int f, m, a, d, s, g, ferr,
wl;
423 sscanf(&
Program[
PrgCnt],
"%d%d%d%d%lf%d%d%d", &m, &wl, &f, &a, &t, &d, &s, &g);
431 if ((f < 0) | (f > 6))
434 ferr = open(fname, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
435 sprintf(buff,
"Error at line %d: Filter Position Current value %d. Allowed values 0 to 6\n", line,f);
436 write(ferr, buff, strlen(buff));
444 if ((a < 0) | (a > 1))
447 ferr = open(fname, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
448 sprintf(buff,
"Error at line %d: Autoranging Mode, Current value %d. Allowed values 0 to 1\n", line,a);
449 write(ferr, buff, strlen(buff));
457 if ((t < 0) | (t > 45))
460 ferr = open(fname, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
461 sprintf(buff,
"Error at line %d: Exposure Time Current value %f. Allowed values 0 to 45 sec\n", line,t);
462 write(ferr, buff, strlen(buff));
470 if ((d < 0) | (d > 1))
473 ferr = open(fname, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
474 sprintf(buff,
"Error at line %d: type of Measurements Current value %d. Allowed values 0 (Dark) to 1 (Light)\n", line,d);
475 write(ferr, buff, strlen(buff));
483 if ((s < 0) | (s > 1))
486 ferr = open(fname, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
487 sprintf(buff,
"Error at line %d: Saving on file, Current value %d. Allowed values 0 (NO SAVE) to 1 (SAVE)\n", line,s);
488 write(ferr, buff, strlen(buff));
496 if ((g < 0) | (g > 1))
499 ferr = open(fname, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
500 sprintf(buff,
"Error at line %d: Plot Display Current value %d. Allowed values 0 (NO PLOT) to 1 (SHOW PLOT)\n", line,g);
501 write(ferr, buff, strlen(buff));
517 int er = 0, eracc = 0;
533 int er = 0, flin = 0, ls, ferr;
534 int inf = 0, error = 0 ;
550 sprintf(ffnerr,
"\0");
551 strncat(fname, buff, ls-3);
605 while(
Program[PrgCnt++] != 10);
611 case REM:
while(
Program[PrgCnt++] != 10);
break;
615 sscanf(&
Program[PrgCnt],
"%d", &m);
617 while(
Program[PrgCnt++] != 10);
break;
649 while(
Program[PrgCnt++] != 10);
652 ferr = open(ffnerr, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
653 sprintf(buff,
"Error at line %d: Command NOT FOUND\n", flin);
654 write(ferr, buff, strlen(buff));
664 ferr = open(ffnerr, O_WRONLY | O_APPEND | O_TEXT| O_CREAT, S_IWRITE);
665 sprintf(buff,
"Error at line %d: XEND NOT FOUND\n", flin);
666 write(ferr, buff, strlen(buff));
676 tmp = (
PrgCnt + 2) - (accbyte);
677 accbyte= accbyte + tmp;
685 sprintf(str,
"File:%s correctely Compiled",prgname);
698 sprintf(str,
"PRG File:\n%s\ncontains error/s\nYou can:\n Close DAS\nView the errors\n ",prgname);
699 er =
MMessageDialog(
"DAS Inf. - PRG Errors", str,
"Close",
"View err",NULL);
703 er = WinExec(str, SW_SHOW);
705 er = WinExec(str, SW_SHOW);
720 sprintf(buff,
"Problem in opening the PRG file!!!!");
730 if (
MMessageDialog(
"DAS Exit Message",
"Do you really want to quit ?",
" Yes ",
" No ", NULL))
749 fd = fopen(
"MASTER",
"rt");
750 if(fd == NULL)
return -1;
773 fd = fopen(
"MASTERSZA",
"rt");
774 if(fd == NULL)
return -2;
791 fd = fopen(
"SZAPRG",
"rt");
792 if(fd == NULL)
return -3;
809 fd = fopen(
"SZAPRG",
"rt");
810 if(fd == NULL)
return -3;
841 Status(
"PRG Files encountered");
860 int c = (int) a_data;
897 sprintf(buf,
"C:\\WINNT\\hh.exe %s",str);
898 er = WinExec(buf, SW_SHOWMAXIMIZED);
902 sprintf(buf,
"C:\\Windows\\hh.exe %s",str);
903 er = WinExec(buf, SW_SHOWMAXIMIZED);
931 sprintf(buf,
"C:\\WINNT\\hh.exe %s",str);
932 er = WinExec(buf, SW_SHOWMAXIMIZED);
936 sprintf(buf,
"C:\\Windows\\hh.exe %s",str);
937 er = WinExec(buf, SW_SHOWMAXIMIZED);
1019 OMUTHR.
PID_kd = (float) 0.008;
1057 sprintf(buf,
"%s",
"Homing");
1059 Status(
"Home for Mirror...");
1061 st = GetTickCount();
1064 D_VRange(
"Homing Mirror",0, 255, 0, 0);
1079 Status(
"Home for Mirror..DONE");
1083 sprintf(buf,
"%s",
"Homing");
1085 Status(
"Home for Grating...");
1087 st = GetTickCount();
1090 D_VRange(
"Homing Grating",0, 255, 255, 0);
1098 sprintf(buf,
"%d", 4358);
1101 Status(
"Home for Grating..DONE");
1106 sprintf(buf,
"%s",
"Homing");
1108 Status(
"Home for Filter Wheel...");
1110 st = GetTickCount();
1113 D_VRange(
"Homing Filter Wheel",0, 0, 0, 255);
1121 sprintf(buf,
"%s",
"NULL");
1124 Status(
"Home for Filter Wheel..DONE");
1140 sprintf(buf,
"%s",
"Homing");
1142 Status(
"Home for Zenith Axis...");
1144 st = GetTickCount();
1147 D_VRange(
"Homing Zenit Axis",0, 0, 128, 255);
1155 sprintf(buf,
"%s",
"0");
1158 Status(
"Home for Zenith Wheel..DONE");
1163 sprintf(buf,
"%s",
"Homing");
1165 Status(
"Home for Azimuth Axis...");
1167 st = GetTickCount();
1170 D_VRange(
"Homing Azimuth Axis",0, 128, 128, 255);
1178 sprintf(buf,
"%s",
"0");
1181 Status(
"Home for Azimuth..DONE");
1213 fs = fopen(buff,
"r");
1214 if(fs == NULL)
return 1;
1245 fscanf(fs,
"%d", &DAS.
StepM.
step[i][k]);
1279 for(c = 0; c < 9; c++)
1288 for(k = 0; k < 2; k++)
1315 er=
InByte(0x240, &DigIn);
1335 if (hIsmm == INVALID_HANDLE_VALUE)
1342 MMessageDialog(
"I/O Tester",
"Can not open iSMM device",
"OK", NULL);
1397 hndFile = CreateFile(WDT_DEVICE, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE,
1398 NULL, OPEN_EXISTING, 0, NULL);
1401 DeviceIoControl(hndFile, IOCTL_SYS_DIO_WRITE,
1402 &cParam,
sizeof(WDTPARAM), 0, 0, &nReturn, NULL);
1404 CloseHandle(hndFile);
1426 if (hIsmm == INVALID_HANDLE_VALUE)
1434 MMessageDialog(
"I/O Tester",
"Can not open iSMM device",
"OK", NULL);
1479 unsigned long st, et, x;
1482 st = GetTickCount();
1485 et = GetTickCount();
1488 if((x % 10) == 0 && x > 0)
1490 sprintf(buf,
"%.1lf", (
double)fabs((tout-(
double)(labs(et - st) ))/1000.0 ));
1509 int c = (int) ad, er;
1514 er = strcmp(buf,
"Start");
1554 er = strcmp(buf,
"Launch Task");
1596 hndFile = CreateFile(WDT_DEVICE, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE,
1597 NULL, OPEN_EXISTING, 0, NULL);
1600 DeviceIoControl(hndFile, IOCTL_SYS_WDT_SET_TIMEOUT,
1601 &cParam,
sizeof(WDTPARAM), NULL, 0, &nReturn, NULL);
1602 DeviceIoControl(hndFile, IOCTL_SYS_WDT_START,
1603 NULL, 0, NULL, 0, &nReturn, NULL);
1605 CloseHandle(hndFile);
1625 if (hIsmm == INVALID_HANDLE_VALUE)
1627 printf(
"Can not open iSMM device\n");
1656 hndFile = CreateFile(WDT_DEVICE, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE,
1657 NULL, OPEN_EXISTING, 0, NULL);
1659 DeviceIoControl(hndFile, IOCTL_SYS_WDT_STOP,
1660 NULL, 0, NULL, 0, &nReturn, NULL);
1662 CloseHandle(hndFile);
1678 if (hIsmm == INVALID_HANDLE_VALUE)
1680 printf(
"Can not open iSMM device\n");
1726 hndFile = CreateFile(WDT_DEVICE, GENERIC_READ | GENERIC_WRITE, FILE_SHARE_WRITE,
1727 NULL, OPEN_EXISTING, 0, NULL);
1729 DeviceIoControl(hndFile, IOCTL_SYS_WDT_SET_TIMEOUT,
1730 &cParam,
sizeof(WDTPARAM), NULL, 0, &nReturn, NULL);
1731 CloseHandle(hndFile);
1747 if (hIsmm == INVALID_HANDLE_VALUE)
1749 printf(
"Can not open iSMM device\n");
1835 Status (
"Waiting 1 Sec.");
1837 Status(
"Init CCD Camera");
1847 if ((er > 0) & (er < 50))
1853 sprintf(buf,
"Error %d in DB_InitCamera", er);
1861 sprintf(buf,
" Camera found");
1879 Status (
"Waiting 1 Sec.");
1895 if ((er > 0) & (er < 50))
1901 sprintf(buf,
"Error %d in DB_InitCamera", er);
1909 sprintf(buf,
" Camera found");
1985 if ((er > 0) & (er < 50))
1991 sprintf(buf,
"Error %d in DB_InitCamera", er);
1999 sprintf(buf,
" Camera found");
2052 char buff[1024], str[32];
2059 sprintf(str,
"TROPOGAS");
2062 sprintf(str,
"SPATRAM");
2068 sprintf(str,
"SPATRAMPLUS");
2071 sprintf(str,
"GASCODNG1");
2074 sprintf(str,
"GASCODNG2");
2077 sprintf(str,
"GASCODNG3");
2080 sprintf(str,
"GASCODNG4");
2083 sprintf(str,
"SPATRAM3");
2086 sprintf(str,
"SPATRAM2");
2090 sprintf(str,
"UNKNOWN");
2097 das = FindWindow(NULL, buff);
2100 sprintf(buff,
"A copy of DAS is already running\nIn this execution mode \ 2101 you can't execute more than 1 DAS instance at the same time !!!\n\ 2102 Please contact DanBo for more information's \n\n\ 2103 If you are Dr. G. Giovanelli please press the GG button\n\n");
2114 sprintf(buff,
"CAZZO Giorgio ti ho detto N+1 volte che ne puoi \ 2115 avviare uno solo alla volta\n\n\ 2116 Domina il tuo dito indice!!!\n\n ");
2134 sprintf(buff,
"DAS Config");
2137 wconfig = FindWindow(NULL, buff);
2140 sprintf(buff,
"'DAS Config' window is already open!!!!");
2159 wtest = FindWindow(NULL, buff);
2180 char buf[128], str[16];
2185 sprintf(str,
"TROPOGAS");
2188 sprintf(str,
"SPATRAM");
2194 sprintf(str,
"SPATRAMPLUS");
2197 sprintf(str,
"GASCODNG1");
2200 sprintf(str,
"GASCODNG2");
2203 sprintf(str,
"GASCODNG3");
2206 sprintf(str,
"GASCODNG4");
2209 sprintf(str,
"SPATRAM3");
2212 sprintf(str,
"SPATRAM2");
2216 sprintf(str,
"UNKNOWN");
2280 unsigned long st, et, x;
2303 sprintf(buff,
"%s",
"DAS Info");
2310 sprintf(buff,
"%s",
" DAS is setted for automatic execution ");
2315 sprintf(buff,
"%s",
" The program will start in %.1lf seconds ");
2321 sprintf(buff,
"%s",
" You can select the 'Manual mode' or to Quit the DAS with the buttons on the right! ");
2358 st = GetTickCount();
2362 et = GetTickCount();
2368 if((x % 100 == 0) && (x > 0))
2376 sprintf(buf,
"The program will start in %.1lf seconds ", fabs(((
double)(labs(et - st) - tout))/1000.0 ));
2421 unsigned long st, et, x;
2442 sprintf(buff,
"%s",
"DAS Info");
2449 sprintf(buff,
"%s",
" DAS is waiting for the identification of the USB driver for Hires V ");
2454 sprintf(buff,
"%s",
" The program will start in %.1lf seconds ");
2460 sprintf(buff,
"%s",
" You can continue DAS (if the driver is already loaded!!! )selecting \n the button on the right! ");
2483 st = GetTickCount();
2487 et = GetTickCount();
2490 if((x % 100 == 0) && (x > 0))
2495 sprintf(buf,
"The program will start in %.1lf seconds ", fabs(((
double)(labs(et - st) - tout))/1000.0 ));
2500 }
while(labs(et - st) < tout &&
nowait == 1);
2523 sprintf(buf,
"MASTER SZA" );
2525 sprintf(buf,
"MASTER" );
2527 sprintf(buf,
"SZAMODE" );
2529 sprintf(buf,
"TESTSZAMODE" );
2548 sprintf(buf,
"DEMO Use" );
2550 AboutCB(NULL, NULL, (
void *)1);
2553 sprintf(buf,
"TEST AMS Use" );
2557 sprintf(buf,
"TEST CCD Use" );
2561 sprintf(buf,
"TEST AD Use" );
2565 sprintf(buf,
"Man Use" );
2583 sprintf(buf,
"File 'AMS.INI' not found");
2588 MMessageDialog (
"DAS ERROR ",
"Error in reading the AMS Power in file '.\\Config\\AMS.INI',\n\ 2589 The program will be closed.\n ",
"OK",NULL);
2590 sprintf(buf,
"Bad AMS Power read");
2599 int WSc, WSh,HSc, HSh;
2698 sprintf(buf,
" DMM NOT Found");
2711 sprintf(buf,
" DMM Found");
2737 float DecActTime, DecTimeStart, DecTimeStop;
2751 DecTimeStart = ExMast[i].
sora + ((float)ExMast[i].smin / 60) + ((float)ExMast[i].ssec / 3600);
2752 DecTimeStop = ExMast[i].
eora + ((float)ExMast[i].emin / 60) + ((float)ExMast[i].esec / 3600);
2753 if((DecActTime > DecTimeStart) && (DecActTime < DecTimeStop))
2774 if ( ((
int)(
S_zenetr * 100) < (
int)(ExMast[i].ssza * 100))
2775 && ((
int)(
S_zenetr * 100) > (
int)(ExMast[i].esza * 100)) )
2781 if ( ((
int)(
S_zenetr * 100) > (
int)(ExMast[i].ssza * 100))
2782 && ((
int)(
S_zenetr * 100) < (
int)(ExMast[i].esza * 100)) )
2793 if ( ((
int)(
S_zenetr * 100) > (
int)(ExMast[i].minsza * 100))
2794 && ((
int)(
S_zenetr * 100) < (
int)(ExMast[i].maxsza * 100)) )
2820 newtime = localtime( <ime );
2829 newtime ->tm_hour = h;
2830 newtime ->tm_min = m;
2831 newtime ->tm_sec = 0;
2835 newtime -> tm_yday, newtime ->tm_hour, newtime ->tm_min,
2836 newtime ->tm_sec, 0, 1024, 0, 0);
2845 for(h = 0; h< t; h++)
2847 if(SZA[h] < min) min = SZA[h];
2848 if(SZA[h] > max) max = SZA[h];
2903 newtime.tm_year + 1900,
2910 sprintf(str,
"%.01lf", 90 -
S_zenetr);
2913 sprintf(str,
"%.01lf",
S_azim);
2946 sprintf(str,
"Station: %s, Date: %d/%02d/%02d, Time: %02d:%02d:%02d, SolarZenithAngle:%.02lf",
2947 DAS.
DGeo.
s_name, newtime.tm_year + 1900, newtime.tm_mon + 1,newtime.tm_mday,
2948 newtime.tm_hour, newtime.tm_min, newtime.tm_sec,
S_zenetr);
3006 sprintf(str,
"File %s\\Param.ini not found,\nPlease supply a valid 'Param.ini' file in the %s forlder\n\ 3026 sprintf(str,
"File %s\\Param.ini not found,\nPlease supply a valid 'Param.ini' file in the %s forlder\n\ 3143 sprintf(buff,
"%s",
"xxxx");
3146 if( (strcmp(buff,
".dat") == 0) |(strcmp(buff,
".Dat") == 0) )
3151 else if( (strcmp(buff,
".bif") == 0) | (strcmp(buff,
".Bif") == 0) )
3156 else if( (strcmp(buff,
".bhg") == 0) | (strcmp(buff,
".Bhg") == 0) )
3163 MMessageDialog(
"DAS information",
"Unsupported format!!",
" Ok ", NULL);
3185 if((strcmp(p[1],
"MASTER") == 0))
3191 else if ((strcmp(p[1],
"MASTERSZA") == 0))
3198 else if ((strcmp(p[1],
"SZAPRG") == 0))
3203 else if ((strcmp(p[1],
"TESTSZAPRG") == 0))
3209 else if( (strcmp(p[1],
"TESTAMS") == 0) | (strcmp(p[1],
"testams") == 0)| (strcmp(p[1],
"TestAMS") == 0))
3214 else if( (strcmp(p[1],
"OFFLINEPLOT") == 0) | (strcmp(p[1],
"offlineplot") == 0) )
3220 else if( (strcmp(p[1],
"TESTCCD") == 0) | (strcmp(p[1],
"testccd") == 0) | (strcmp(p[1],
"TestCCD") == 0))
3225 else if( (strcmp(p[1],
"TESTAD") == 0) | (strcmp(p[1],
"testad") == 0)| (strcmp(p[1],
"TestAD") == 0))
3230 else if( (strcmp(p[1],
"?") == 0) | (strcmp(p[1],
"help") == 0) | (strcmp(p[1],
"HELP") == 0))
3238 else if( (strcmp(p[1],
"demo") == 0) | (strcmp(p[1],
"DEMO") == 0) | (strcmp(p[1],
"Demo") == 0))
3248 else if( (strcmp(p[1],
"DOAS") == 0) | (strcmp(p[1],
"doas") == 0)| (strcmp(p[1],
"Doas") == 0))
3257 sprintf(str,
"%s",p[1]);
3259 sprintf(buff,
"%s",
"xxxx");
3260 strncpy(buff, str+l-4, 4);
3262 if( (strcmp(buff,
".prg") == 0) |(strcmp(buff,
".PRG") == 0) |(strcmp(buff,
".Prg") == 0) )
3276 sprintf(str,
"PRG file:\n'%s'\n not encountred.\n Please check the name of the file\n Now the program will be terminated", p[1]);
3283 else if( (strcmp(buff,
".log") == 0) |(strcmp(buff,
".LOG") == 0) |(strcmp(buff,
".Log") == 0) )
3292 sprintf(str,
"'%s'\nUnrecognized Argument \n The Program will be terminated", p[1]);
3295 sprintf(str,
"'Allowed Arguments:\n\n\ 3304 9) OFFLINEPLOT Valid *.bif (dat) file\n\ 3305 10) Valid *.LOG file\n\ 3306 11) Valid *.PRG file\n");
3404 sprintf(buf,
"Path '%s' deos not exist,\nDAS will create the requested folder ", BIL.
DFILEM.
LOGDIR);
3424 sprintf(buf,
"Path '%s' deos not exist,\nDAS will create the requested folder ", BIL.
DFILEM.
DATADIRECTORY);
3483 int tiy = OMUTEMP.
dimy = 16;
3488 if (OMUTEMP.
dimx >=5)
3492 lx = (
unsigned long) OMUTEMP.
dimx;
3494 OMUTEMP.
CCDTemp = (
float *) calloc( lx,
sizeof(
float));
3495 OMUTEMP.
CCDPwr = (
float *) calloc( lx,
sizeof(
float));
3496 OMUTEMP.
PltPwr = (
float *) calloc( lx,
sizeof(
float));
3500 sprintf(str,
"'%s'\nUnrecognized Argument \n The Program will be terminated", p);
3506 sprintf(str,
"TEMPERATURE HISTORY - File:%s", p);
3595 sprintf(str,
"File %s\\Equipment.ini not found,\nThe program will be closed.\n ", BIL.
DFILEM.
CONFIGDIRCOMMON);
3601 sprintf(str,
"Equipment with code '%d' not recognized!!!!\nCheck the '%s\\Equipment.ini' file\nor\nConsulte the DAS Help\nThe program will be closed.\n ", er, BIL.
DFILEM.
CONFIGDIRCOMMON);
3643 strftime( DLOG.
odate, 7,
"%y%m%d", &today );
3644 strftime( DLOG.
otime, 9,
"%H:%M:%S", &today );
3646 DAS_StartHour = (int)(((
double)today.tm_hour + 30.0/60.0) * 10);
3647 DAS_StartDOY = (int)(((
double)today.tm_yday + 12.0/24.0) * 10);
3650 sprintf(buff,
"*******************************************************");
3652 sprintf(buff,
"DAS Started on %s at %s", DLOG.
odate, DLOG.
otime );
3663 sprintf(str,
"File %s\\DASSysColor.INI not found,\nThe default DAS colors will be used.\n ", BIL.
DFILEM.
CONFIGDIREQUIPMENT);
3686 sprintf(str,
"File '%s\\GeoCoord.INI' not found,\nPlease supply a valid GeoCoord.INI file for the computation of the SZA and Sun Position", BIL.
DFILEM.
CONFIGDIREQUIPMENT);
3720 MMessageDialog(
"DAS Inf. - Errors in OPTION.INI file", str,
"OK", NULL);
3724 if (er > 1 && er < 40)
3727 sprintf(str,
"Err.: %d - %s\nEdit %s\\Option.INI file and correct or contact Danbo - db@uevora.pt\nNow DAS will quit!!",er,
ERR_Option(er), BIL.
DFILEM.
CONFIGDIREQUIPMENT );
3728 MMessageDialog(
"DAS Inf. - Errors in OPTION.INI file", str,
"OK", NULL);
3737 sprintf(str,
"The %s\\Option.INI file is present but not valid.\nProbably the file is from a previous DAS realise\nPlease supply a valid %s\\Option.INI file or contact Danbo - db@uevora.pt\nDAS can NOT continue the execution and it will quit!!", BIL.
DFILEM.
CONFIGDIREQUIPMENT,BIL.
DFILEM.
CONFIGDIREQUIPMENT );
3738 MMessageDialog(
"DAS Inf. - Errors in OPTION.INI file", str,
"OK", NULL);
3752 sprintf(str,
"The %s\\FTP.INI file not found.\n The Data back-up can not be done!\nPlease supply a valid %s\\FTP.INI file or contact Danbo - db@uevora.pt\nNow DAS will quit!!", BIL.
DFILEM.
CONFIGDIREQUIPMENT,BIL.
DFILEM.
CONFIGDIREQUIPMENT );
3753 MMessageDialog(
"DAS Inf. - Errors in FTP.INI file", str,
"OK", NULL);
stepm StepM
Stepper motors parameters structure.
#define ELAMPOFF
External Lamp OFF.
#define SPATRAM
SPectrometer for Atmospheric TRAcers Measurements - CGE-UE Portugal.
#define H_NDFW
Home for ND FilterWheel.
NDFilterWheelSt NDFWS
ND Filter Wheel.
char prg[16]
PRG Filename.
void MObjectSetBackgroundRGB(MOBJECT obj, int r, int g, int b)
gui Gui
Graphic User Interface Structure.
int AUTOEX
Automatic Execution ID.
MOBJECT LedSM[AMSMAX][2]
Leds for stepper motors status.
char env[_MAX_PATH]
Environment path.
void MRefreshTimeout(TIMEOUT_ID *pid, CARD32 msec, TIMEOUT_CB cb, void *ud)
int IDX
Number of sensible horizontal pixels.
shells Shells
Shells structure.
int DB_InitMotor(int mod)
Initialize AMS. Procedure that initialize the parameters for the AMS's devices.
MOBJECT Albl_LS[8]
Active Control Panel Labels for LIS status.
MOBJECT MCreatePixmapFromFile(MOBJECT parent, const char *fname)
unsigned int keycode
Code for the pressed key.
void ManualModeCB(MOBJECT p, void *od, void *ad)
void InitDefaultOptions(void)
unsigned long * PLColor[]
#define LABEL
text after this command is displayed in the status label
int DB_InitCamera(int mod)
Initialize Camera Parameters. Procedure that initialize the CCD Camera.
C_DEF int DI_FindDrive(char *fullname)
short DB_FG_Plbl[3]
Foreground PASSIVE Label Colors.
void MLoopWhileEvents(int discard)
optionini DOption
Options for DAS execution.
int extlamp
0 = external lamp OFF; 1 = external lamp ON
Status of the ND Filter wheel .
int savingmode
Flag to set saving mode: 0=ASCII, 1=Binary.
#define AMS2
AMS2 address.
void MObjectSetShadow(MOBJECT obj, int type, int in, int out)
const char * Mir_Code[]
const char array for the realisation of the Mirrors buttons in the Mirror shell
#define TESTCCD
execution for testing CCD Camera
#define SETCCDVBIN
SET the CCD vertical Binning.
ptf DC_HP
Platform settings.
void MShellRealize(MOBJECT obj)
void D_VRange(char *str, int val, int, int g, int b)
Create and display the status bar.
void ChkDASInstance(int etype)
int InitCCD_AMS(int mod, int emode)
#define H_GRAT_CAL
Perform home for the grating and executa a calibration.
#define H_ZEN
Home for zenith Axis.
int LoadWlstep(void)
load the file of the wavelength vs steps
tools TOOLS
tools structure
MOBJECT KeyB[28]
Keyboard Buttons.
int NAMS
Number of AMSs Devices.
MOBJECT Albl_sunr
Active Control Panel Labels for Sunrise.
double Dailymaxsza
Daily maximum SZA.
PREFUNCTION int MIDFUNCTION OutByte(unsigned short Port, int Data)
void WDT_CB(MOBJECT p, void *od, void *ad)
Stepper motors parameters structure .
double S_azim
O: Solar azimuth angle: N=0, E=90, S=180, W=270.
int ContFP
Counter for File position.
int Wl
Flag for the units on the X scale plot.
int SM_A
Motor A (su Y11) respectively: ID=0->InputMirror,ID=1->FilterWheel,ID=2->Zenith.
char * HomePosition[]
const char array for the realisation of the Filters buttons in the ND Filter shell ...
#define AAMEASURE
Measuremets with Alt Azimut platform (stepper motors positioning simoultaneously) ...
#define AAPOSIT
Position the Alt Azimuth Platform.
int plotW
Flag for the plot display.
int sza
= 1 -> perform measurements; = 0 -> waiting mode
void MPixmapSetImageFile(MOBJECT pixmap, const char *fname)
das structure (contain all the previous structures) .
int PrgNumExe
number of PRG file in execution
#define DASREV
DAS Revision Number.
d_geo DGEO
geographical coordinates structure
int VMRsf
ViewModifyReloadsystemfile: 0 = ViewModify, 1 = Reload.
int MObjectGetHeight(MOBJECT obj)
#define TESTSZAMODE
execution driven by SZAPRG file
MOBJECT MCreateLabel(MOBJECT parent, const char *text, MTFont font)
Control Panel and push buttons colors .
double latitude
Station latitude.
#define PRGMAXNUM
Maximum number of PRG File in MASTER or MASTERSZA File.
void MObjectSetResize(MOBJECT obj, int resize_w, int resize_h)
#define WAIT
stop the program execution for xx millisec
void ChkExeMode(int mod, char **p)
#define DOASMODE
execution for DOAS Processing
const char * DeviceTypeInput[]
const char array for the Device type <-> Input association
short OMU_TempReached
OMU presetted temperature reached -> = 1.
int ReadLogFile(int mod, char *dir, char *filename, int nx, int ny, struct omutemp datatemp)
Read DAS LOG File. .
int Pos
Mirror Current Position.
flag Flag
Structure for different flags.
#define AUTOEX_TASK_TIME
Autoexecution.
MOBJECT Sh_Main
Main shell for control panel.
int D_Timing(int id, long tout)
int darkremove
Flag to set Dark Removal from measurements; motors0 = No Dark Removal, 1 = Dark Removal.
void LoadDefaultDPAL(void)
Load Default system colors. Procedure that load the DAS colors if the file {homedir}/config/DASSysCol...
char HOMEDIRECTORY[_MAX_PATH]
short DB_BG_Albl[3]
Background ACTIVE Label Colors.
#define DBDEMO
execution in demo mode
void NoWaitCB(MOBJECT p, void *od, void *ad)
void MObjectAlign(MOBJECT obj, int h_align, int v_align)
int Offset[16]
Offset of the hardware devices (Input Mirror (5), Grating, Filter Wheel...)
int PRG_Check(int mod, char *prgname)
MOBJECT WDT_edt
edit Mobject for Watch-Dog elapsed time
unsigned short DigOut
Digital Output.
#define NOVA945GSE
NOVA945GSE (SPATRAM2, GASCODNG1, GASCODNG4)
int slope[AMSMAX][2]
Stepper Motors Slope.
LOG file and time structure.
#define NOVA6612G2
NOVA6612G2 (not used in TROPOGAS, LIS, GASCODNG2/3)
#define QJSCAN
Scan spectral range with QJ on.
char DATADIRECTORY[_MAX_PATH]
int Fetch()
Reads the key-word in PRG Files .
int LoadGeoCoord(void)
Load Geographic Coordinate of the station. Procedure that load the Geographic Coordinate of the stati...
PREFUNCTION int MIDFUNCTION InByte(unsigned short Port, int *Data)
char * MObjectGetText(MOBJECT obj, char *text)
void Task_LOG(TIMEOUT_ID id, void *data)
LOG Task. Write on the LOG file during DAS execution.
geographical coordinate structure .
spectrumheader SPH
Spectrum Header Structure.
void BuildMainShell(void)
structure for deltaSZA Measurements .
#define CHKEXLAMP
Check External lamp status.
int WlSet
Wavelength position definition - for SD_Grating.
void TaskWDT(TIMEOUT_ID id, void *data)
char * Fil_Code8H[]
const char array for the realisation of the Filters buttons in the Filter shell
#define TEMPORIZED
execution driven by MASTER file
int PrgNumInM
Actual number of PRG File in current MASTER or MASTERSZA File.
void PeltierPS(int mod)
Peltier Power Supply ON/OFF .
float multiplier[AMSMAX][2]
multiplier, > 0 multiplier, < 0 demultiplier
void DAS_Message(char *str, int er)
#define SZAMASTERM
execution driven by MASTERSZA file ( there is the possibility to distinguish between AM and PM measur...
void MShellUnrealize(MOBJECT obj)
struct das das
das structure (contain all the previous structures) .
long REL_FILE_POS[51]
relative File position
#define GETCCD
Performs a LIGHT Measurement (shutter opened)
int LoadDB_Options(void)
Load Options. Procedure that load the Options in the file {homedir}/config/Options.INI.
void MObjectSetText(MOBJECT obj, const char *text)
#define IREFSUN
Io Measurement with AA Platform near the Sun.
CTYPE const char *PROC_CALL DC_ErrorMessage(int ErrorCode)
Convert an error code into an error message (string). DC_Status returns an error code of the previous...
void MEnableCustomizing(void)
int SZAMax
Maximum SZA for performing measurements.
int LoadTruePalette(void)
Load the palette map. Procedure that load the palette map from file {homedir}/Palettes/Danbomap1.map.
float CoolPT
Previous Temperature (DTA -> DC_CoolPT)
void WDT_Task_CB(MOBJECT o, void *od, void *ad)
void Task_REFRESH_Temp(TIMEOUT_ID id, void *data)
Temperatures Task. Refresh the temperatures during DAS execution.
MOBJECT Albl_suns
Active Control Panel Labels for Sunset.
int Pos
Filter Wheel current Position.
int AssignParam(int mod)
Assign parameters to the CP labels. .
int GRATHOME
Home for Grating ID.
int FlgSM_Stop
Steppers Motor Activity: 0 = Motors moving; 1 = Motors stopped.
d_geo DGeo
struct for Station location
void Task_HomeGrat(TIMEOUT_ID id, void *data)
Home grating Task. 5) Check for reached end-run of the stepper motor for the grating ...
MOBJECT Albl_Azim
Active Control Panel Labels for Sun Azimuth.
int MObjectGetWidth(MOBJECT obj)
void Task_Timer(TIMEOUT_ID id, void *data)
Timer Task. Very useful procedure that: 1) Provide to refresh the clock display 2) Check if daylight ...
void MShellDestroy(MOBJECT obj)
config Cfg
Camera controls & Options.
#define LIS_
Lampedusa Island Spectrometer - ENEA.
int exec
= 0 -> PRG Execution Paused; = 1 -> PRG Execution Resumed
int Wl
Grating Wavelength.
long PrgSiz
Size of the PRG file.
#define TROPOGAS
TROPOspheric Gas Analyzer Spectrometer.
#define MEASHOR
horizontal measurements with external lamp (lamp,
void Task_LIS_Temp(TIMEOUT_ID id, void *data)
OMU Thermoregulation Task. Provide the thermoregulation of the Optical Mechanical Unit In addition al...
long AbsFilePos
Absolute File position.
int hlinebefore
Number of HiddenLines before the central line in Plot.
char * Fil_CodeNG[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG2 and NG3...
tools Tools
Push buttons for various tools.
char * Program
buffer for the PRG file
MOBJECT lbl_Time
Control Panel Labels for Time.
int timezone
Station timezone.
void LaunchBackTask(void)
Launch the DAS Background tasks Common Tasks launched when the DAS MAIN Graphic User Interface is loa...
char s_name[4]
Station name.
long dp
Grating backslash recovery steps.
#define DASREVDATE
DAS Revision Date.
unsigned long countsopsh
counting the number of opening shutter
unsigned int data[576]
Conversion data buffer 64 samples * 8 channels * 2 bytes.
MOBJECT MCreatePButton(MOBJECT parent, const char *text, MTFont font)
#define H_FILTER
Home for filter wheel.
#define WAVELEN
set the grating position
unsigned int * mattempbuff
int ADTempTest
= 0 -> AD Converter results on the Control Panel; = 1 -> AD Converter Testing Phase(results on the co...
#define LOGMODE
execution for LOG View
int CCDTEMP
CCD Temperature ID.
C_DEF void DI_SplitName(char *fullname, char *fpath, char *fname)
int avgmode
Flag to set Averaging mode: 0 = Repeat measurements for fixed number, 1 = Repeat measurements for fix...
#define OFFLINEPLOT
execution for archived data visualisation
#define GASCODNG2
GASCODNG 2 (with ATX power supply & HiresIV)
#define AUTORNG
Autoranging for optimal exposure time.
double Dailyminsza
Daily minimum SZA.
void ReadLine(char *buf, int nc, FILE *f)
Read Line on a file Read one record of nc character on the file f.
#define ESHUTCL
External Shutter CLOSED.
#define AZIMUTH
Positioning of Azimut Axis.
long PrgCnt
Counter for the position in the PRG file.
#define WDT_TASK_TIME
Watch Dog Timer.
#define AVGCCDHOR
horizontal AVERAGED measurements with external lamp
int REFRTEMP
REFRESH Temperature ID.
void MObjectSetCompositeHeight(MOBJECT obj, int h)
int PRG_ChkMirror(int mod, char *filename, int record, int par)
int PRG_ChkMeasAvg(int line, char *fname)
MOBJECT Albl_Script
Active Control Panel Labels for Script in execution.
void AboutCB(MOBJECT o, void *s, void *v)
Create the About information shell. .
int ReachTemp
CCD Temperature Reached.
PREFUNCTION int MIDFUNCTION InByteR(unsigned short Port)
int PRG_ChkGrating(int mod, char *filename, int record, int par)
#define EXPO
Set the exposure time.
int PID_On
PID activation.
C_DEF void DI_FindDirName(char *fullname, char *fdir)
#define SPATRAM2
SPATRAM2 (with ATX power supply & HiresV)
int Addr[AMSMAX]
address of AMs
int ChkConfigInstance(void)
int ViewPlot(int mod)
Create the plot shell. Procedure that build the plot shell for the data visualization.
float * Temptemp
Buffer for lis temperature.
#define SPATRAMPLUS
As SPATRAM plus AltAzimuth platform.
int UPS_Battery
flag for UPS Battery: = 0 Normal Operation, 1 = working on UPS battery
id's for different tasks .
#define QJ_OFF
QJ lamp off.
char CONFIGDIREQUIPMENT[_MAX_PATH]
const char * MGetCurrentDirectory(void)
void Status(char *tit)
Writes information's on the Status label .
void RunFULL(void)
DAS Main LOOP for Equipment management This Procedure is called by the MGUIMain function when the exe...
int NOVA_Out(int novatype, unsigned int out)
Write the NOVA Output port.
char * ERR_Option(int ercode)
Alerts for OPTION.INI errors Creates a message window reporting the reasons for the error...
ISMM_API BOOL WDT_SetTimeout(HANDLE hIsmm, WORD wTimeout, WORD wTimeOption)
void delay(unsigned long d)
Pauses for a specified number of milliseconds. .
int ChkWinInstance(char *buff, MOBJECT obj)
MTColor MAllocColor(int r, int g, int b)
int DeltaSZA
= 1 Delta SZA measurements activated, = 0 Continous measurements
void(* OBJ_EVENT_CB)(MOBJECT obj, MEvent *e, void *ad)
char DBFILENAME[_MAX_PATH]
#define LISTEMP_TASK_TIME
spectrometer termoregulation
#define GRAT_TASK_TIME
Grating Home.
#define GASCODNG3
GASCODNG 3 (with ATX power supply & HiresIV)
#define DARKC
Perform a DARK Measurement (shutter closed)
ISMM_API BOOL ISMM_Close(HANDLE hIsmm)
int plotYRange
0 –> full range; 1 –> min/max
int resetFreq
frequency of DAS/Windows Reset
ISMM_API BOOL DIO_GetInput(HANDLE hIsmm, PWORD pwDioData)
#define PRGFILE
execution driven by *.prg file
MOBJECT MCreateColForm(MOBJECT parent)
void SetScriptUseLabel(int master, char *prgf, int emode, MOBJECT lbl)
void HiresPS(int mod)
Hires Power Supply ON/OFF .
void MObjectAddEventNotifyCallback(MOBJECT obj, OBJ_EVENT_CB cb, CARD32 event_mask, void *a_data)
void WriteInit(const char *sname, char *dateffn, char *timebuff)
Init the daily LOG file .
#define SAVE
save the measurement in the predefined file
#define ELAMPON
External Lamp ON.
int ADPC104
0 –> Device PC104 exist, 1 –> PC104 DOESN'T exist
pushbutt PushButt
Push buttons.
int IDY
Number of sensible vertical pixels.
#define GASCODNG1
GASCODNG 1 (with ATX power supply & HiresIV)
void MShellRealizeXY(MOBJECT obj, int x, int y)
#define GASCODNG4
GASCODNG 4.
int LoadDasSysCol(void)
Load system colors. Procedure that load the DAS colors in the file {homedir}/config/DASSysColor.INI.
#define FILTER
Set the filter position (0 - 6)
char * Fil_CodeNG1[]
const char array for the realisation of the Filters buttons in the Filter shell for GASCODNG1 instrum...
#define ZENITH
Positioning of zenith Axis.
#define MEASHOR2
Perform horizontal measurement.
int TOTTEXP
Total Exposure time in Averaging mode.
int amsprogbar
display/hide prograssion bar, 0 = Hide, 1 = display
int WindowsReboot
Flag that became 1 when Windows reboot is setted (SetWinowsReset)
int FFTFilter
Fast Fourier Trasform Filter windows.
MOBJECT MCreateShell(const char *title, int flags)
ISMM_API BOOL DIO_GetConfig(HANDLE hIsmm, PWORD pwDioConfig)
int hlineafter
Number of HiddenLines after the central line in Plot.
void Task_AutoEx(TIMEOUT_ID id, void *data)
Automatic Execution Task. .
int MMessageDialog(const char *t, const char *msg, const char *btn1, const char *btn2,...)
structure for OMU temperatures .
int PRG_ChkKeyW(int line, char *fname)
int LoadFTPSetting(void)
Load FTP Setting for daily back-up.
int LoadEquipment(void)
Load the type of Equipment. {homedir}/config/param.ini.
void SZA_FindMin()
computation of daily minimum SZA
int ExMaster(int m, int mode)
#define SPATRAM3
SPATRAM3.
short DB_BG[3]
Default Background Color.
#define H_AZI
Home for Azimut Axis.
double TExp
CCD Exposure time.
void DB_SelButt_CB(MOBJECT obj, MKeyEvent *pe, void *a_data)
#define SETCCDOFFS
CCD Offset for HiresV.
void MShellRaise(MOBJECT obj)
int ftpstatus
0 = FTP Back-UP Not executed; 1 = FTP Back-UP executed;
int DB_HelpCB(MOBJECT o, void *od, void *ad)
Help Callback Create the help in the predefined WEB Browser.
configpanel ConfigPanel
Configuration panel structure.
int D_InitPC104(void)
Starting function that calls the driver functions used NOTE: By convention, you should capture the BY...
ISMM_API BOOL WDT_Start(HANDLE hIsmm, BOOL bControlState)
#define SZAMODE
execution driven by SZAPRG file
int SM_B
Motor B (su Y12) respectively: ID=0->Grating,ID=1->Not Connected,ID=2->Azimuth.
int MainCommand
Command switch in main loop.
int SetWorkDirMGUIenv(char *buff)
set DAS and MGUI enviroment when the program is launched undirectly (for offlineplot or log or auto o...
char * Fil_Code[]
const char array for the realisation of the Filters buttons in the Filter shell
#define DFMEASURE
Measurement procedure using the double ND FilterWheel (when Installed)
int LISTEMP
Lis Temperature ID.
#define CALIBRA
Auto calibration with HG Lamp (hg line at 4358A on pix 512)
#define TIMER_TASK_TIME
timer
char PrgFile[_MAX_PATH]
Name of the PRG file.
int LoadDB_DispCoeff(void)
Load dispersion parameters. Procedure that load the dispersion parameters from file {homedir}/DOAS/Di...
void GetDateTime(struct date *dp, struct time *tp, struct tm *when)
int wl[]
WaveLength definition - for SD_Grating.
int MGetScreenWidth(void)
#define REFRESHTEMP_TASK_TIME
refresh of the spectrometer's temperatures.
void MGUIMain(int argc, char **argv)
MAIN PROGRAM starting point Actions: .
int pixcorr
Flag to set defective pixel correction: 0=NOT Corrected, 1=Corrected.
int PRG_ChKBegin(int line, char *fname)
#define SETCCDPOW
SET the CCD Power.
int fileprg
Flag indicating the execution of a PRG file: = 0 –> No PRG File; = 1 –> PRG file in execution...
controlpanel ContrPanel
Control Panel Structure.
int ftpbackup
Flag to set back up: 0 = NO FTP Back-UP; 1 = Perform FTP Back-UP.
#define MEASURE
Performs a measurement setting mirror, filter, grating, TExp...
Bortul Image Library Structure .
int LoadParam(void)
Load the exe parameters. Procedure that load the parameters for CCD, Stepper Motors and Peltier from ...
int D_WriteInitLog(char *str)
writes devices errors(AMS, CCD...) on the Devices.log file.
int imgtype
Flag to set Image type: 0=MONOINT, 1=RGB.
#define H_MIRROR
Home for Mirror.
double longitude
Station longitude.
void MPButtonSetCallback(MOBJECT button, MGUI_CB cb, void *data)
#define AMS1
AMS1 address.
void MObjectSetCompositeWidth(MOBJECT obj, int w)
int LoadExec(char *fname)
Load file for automatic execution. Procedure that load the file for automatic execution.
int Visualizza(int mod, char *nomefile)
void FlushLine(char *buf, int nc, FILE *f)
Flush line of file f read a maximum of nc character since when the read char is different from ch(10)...
void D_Positioning(MOBJECT p, int id, long tout)
Callback for the void D_VRange and display also the status in the corresponding CP labels...
void MDCreateWaitShell(void)
Create a waiting window .
int speed[AMSMAX][2]
Stepper Motors Speed.
MOBJECT MDCreateDOAS_MainSh(struct doas *pdoas)
DOAS shell. Procedure that build the shell for the DOAS main panels.
#define BEGIN
re-start the execution of the PRG file
void MShellSetTitle(MOBJECT obj, const char *title)
int manhormeas
1 = horizontal measurements in manual mode
int step[AMSMAX][2]
Stepper Motors Step.
unsigned char WDT_Timeout
int ExeDSZA
= 1 the measurements are performed, = 0 waiting for the next deltasza.
#define H_GRAT
Home for Grating.
float * AllocFloatMat(int hp, int vp)
omutemp OMUTEMP
structure for OMU temperatures
int NOVA_In(int novatype, unsigned int DigIn)
Read the NOVA Input port.
#define CCDTEMP_TASK_TIME
CCD temperature.
#define XEND
stop the execution of the PRG file
char * Fil_CodeTropo[]
const char array for the realisation of the Filters buttons in the Filter shell for TROPOGAS instrume...
void CCD_Error(char *str)
Alerts for CCD errors Creates a message window reporting the number of the error. ...
C_DEF int DI_PathExist(char *path)
int DB_InfCB(MOBJECT o, void *od, void *ad)
Inf Callback Create the Inf shell.
char * NDFil_Code[]
const char array for the realisation of the Filters buttons in the ND Filter shell ...
int filename
Flag to set file name mode 0=Free choice, 1 = Automatic.
int MGetScreenHeight(void)
MOBJECT Albl_Elev
Active Control Panel Labels for Sun Elevation.
#define LOG_TASK_TIME
LOG files.
int EqType
Spectrometer Type.
int N_RM
Number of measurements for Averaging mode in fixed exposure time mode.
#define TESTAD
execution for testing PC 104 AD converter
#define NOVA7892
NOVA7892 monoboard (old)
char CONFIGDIRCOMMON[_MAX_PATH]
void MGUIQuitCB(MOBJECT shell, void *od, void *ad)
Exit MGUI Library. Procedure that close MGUI .
unsigned char DigIn
Digital Input.
#define HG_OFF
HG lamp off.
void MObjectSetTransparency(MOBJECT obj, CARD8 level)
void MObjectSetForegroundRGB(MOBJECT obj, int r, int g, int b)
void BuildShell(int emode, char **argum)
#define SETCCDTEMP
SET the CCD working Temperature.
double Pos
Azimuth Current Position.
int BlindPix
Number of blind pixels (usefull for Dark Current)
int N_AVG
Number of measurements for Averaging mode in fixed number of meas. mode.
#define HGSCAN
Scan spectral range with HG on.
int darksource
Flag to set Dark source: 0 = Blind Pixels, 1 = Full Frame.
int resetEnabled
DAS/Windows reset option (1 = Enabled; 0 = disabled)
long wav[]
Step Number definition - for SD_Grating.
#define DASREL
DAS Release Number.
void MShellSetWMCloseCallback(MOBJECT p, WM_CLOSE_CB cb, void *a_data)
C_DEF int DI_FileExist(char *tit)
void MObjectSetSensitive(MOBJECT obj)
int type
type of NOVA monoboard used (7892 or 945GSE)
int resetType
type of period for DAS Reset: 0=Hours, 1=Days
int on
PRG execution control variabile.
double Pos
Zenith Current Position.
stepm STEPM
Stepper Motors.
MOBJECT MCreateRowForm(MOBJECT parent)
Status of the Filter wheel .
int extshutter
0 = external shutter open; 1 = external shutter closed
System password structure .
void ShutterOpening(int mod)
unsigned short WDT_TOUT
WDT timeout.
ISMM_API HANDLE ISMM_Open(void)
void NoWaitSplashCB(MOBJECT p, void *od, void *ad)
int AMSPres
AMS Presence: 0 = AMS FOUND; 1 = AMS NOT FOUND.
ISMM_API BOOL DIO_SetOutput(HANDLE hIsmm, WORD wDioData)
int exemode
Set the Execution MODE (Execution modes)
double TPelt
OMU Target Temperature.
void DB_2DPlot(char *title, int x, int y, int dx, int dy, int mode)
2D_Plot panel callback.
FilterWheelSt FWS
Filter Wheel.
void WriteShellTitle(MOBJECT o, int eqt)
#define AMS3
AMS3 address.
OMU Thermoregulation structure .
#define ESHUTOP
External Shutter OPEN.
MOBJECT lbltelap
label elapsed time (for WDT)
#define TESTAMS
execution for testing AMS's devices
void RunLogMode(int mod, char *p)
int SZACalc(double d_lat, double d_long, double d_tzone, int d_year, int d_daynum, int d_hour, int d_minute, int d_second, float d_temp, float d_press, float d_tilt, float d_aspect)
Calc. Solar angles and radiatives quantities. .
#define MANUAL
execution in manual mode (for lab use)
ISMM_API BOOL DIO_GetOutput(HANDLE hIsmm, PWORD pwDioData)
#define MIRROR
set mirror position (0-3)
#define NDFILTER
SET the ND FilterWheel Position.
int power[AMSMAX][2]
Stepper Motors Power.
#define AVGCCD
Averaged measurement.
marconi Marconi
CCD Sensor struct.
void Task_CCD_Temp(TIMEOUT_ID id, void *data)
CCD Temperature Task. Provide the thermoregulation of the CCD sensor during DAS execution.
const char * Mir_CodeTropo[]
const char array for the realisation of the Mirrors buttons in the Mirror shell for TROPOGAS ...
paramini Paramini
structure for the parameters defined in param.ini configuration file
#define REM
text after this is a comment