comparison FXAnalyse.c @ 86:9daa5e2e4b11

Julian day is never used. Remove it
author Daniele Nicolodi <daniele.nicolodi@obspm.fr>
date Thu, 21 Mar 2013 12:02:06 +0100
parents 6ac1d3de1ae2
children 0950d4b3a45c
comparison
equal deleted inserted replaced
85:6ac1d3de1ae2 86:9daa5e2e4b11
28 static int LoggingPanel; 28 static int LoggingPanel;
29 29
30 char LogFileName[MAX_PATHNAME_LEN]; 30 char LogFileName[MAX_PATHNAME_LEN];
31 31
32 double utc = 0; 32 double utc = 0;
33 double mjd = 0;
34 33
35 double Ch1, Ch2, Ch3, Ch4; 34 double Ch1, Ch2, Ch3, Ch4;
36 double Math1, Math2, Math3, Math4, Math5; 35 double Math1, Math2, Math3, Math4, Math5;
37 double N1, N2, N3, N4; 36 double N1, N2, N3, N4;
38 37
200 muParserHandle_t parser = mupCreate(); 199 muParserHandle_t parser = mupCreate();
201 mupDefineOprtChars(parser, "abcdefghijklmnopqrstuvwxyzµ" 200 mupDefineOprtChars(parser, "abcdefghijklmnopqrstuvwxyzµ"
202 "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 201 "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
203 "+-*^/?<>=#!$%&|~'_"); 202 "+-*^/?<>=#!$%&|~'_");
204 mupDefineVar(parser, "UTC", &utc); 203 mupDefineVar(parser, "UTC", &utc);
205 mupDefineVar(parser, "MJD", &mjd);
206 mupDefineVar(parser, "Ch1", &Ch1); 204 mupDefineVar(parser, "Ch1", &Ch1);
207 mupDefineVar(parser, "Ch2", &Ch2); 205 mupDefineVar(parser, "Ch2", &Ch2);
208 mupDefineVar(parser, "Ch3", &Ch3); 206 mupDefineVar(parser, "Ch3", &Ch3);
209 mupDefineVar(parser, "Ch4", &Ch4); 207 mupDefineVar(parser, "Ch4", &Ch4);
210 mupDefineVar(parser, "DDS1", &(DDS4xAD9912.Frequency1)); 208 mupDefineVar(parser, "DDS1", &(DDS4xAD9912.Frequency1));
604 LocalTime.tm_mon -= 1; // january is month 0 for tm struct 602 LocalTime.tm_mon -= 1; // january is month 0 for tm struct
605 LocalTime.tm_year -= 1900; // year is number of years since 1900 for tm struct 603 LocalTime.tm_year -= 1900; // year is number of years since 1900 for tm struct
606 LocalTime.tm_isdst = -1; // daylight saving flag MUST be set to -1 (unallocated is bugging and +1 is making 1 hour error in summer) 604 LocalTime.tm_isdst = -1; // daylight saving flag MUST be set to -1 (unallocated is bugging and +1 is making 1 hour error in summer)
607 utcTime = mktime (&LocalTime); 605 utcTime = mktime (&LocalTime);
608 utc = (double) utcTime + strtod(Sec,NULL); 606 utc = (double) utcTime + strtod(Sec,NULL);
609 mjd=utc/86400.; //nb de jours depuis l'origine d'UTC (01/01/1900 à 00h00 GMT)
610 mjd+=15020; //date MJD de la date origine d'UTC
611 SetCtrlVal(MainPanel, PANEL_UTC, utc); 607 SetCtrlVal(MainPanel, PANEL_UTC, utc);
612 SetCtrlVal(MainPanel, PANEL_MJD, mjd);
613 608
614 // scan the line for counters's channels information 609 // scan the line for counters's channels information
615 610
616 ReadLine(LogFile, LineBuffer, FXLINELENGTH+9); 611 ReadLine(LogFile, LineBuffer, FXLINELENGTH+9);
617 CloseFile(LogFile); 612 CloseFile(LogFile);