mirror of
https://github.com/eddyem/apogee_control.git
synced 2026-01-31 20:35:04 +03:00
histry
This commit is contained in:
parent
7b98fe9a85
commit
2e6b90f2a9
@ -12,13 +12,6 @@ endif()
|
|||||||
if(DEFINED VERBOSE OR DEFINED VERB OR DEFINED V)
|
if(DEFINED VERBOSE OR DEFINED VERB OR DEFINED V)
|
||||||
set(CMAKE_VERBOSE_MAKEFILE ON)
|
set(CMAKE_VERBOSE_MAKEFILE ON)
|
||||||
endif()
|
endif()
|
||||||
if(NOT DEFINED CAMERA_TYPE)
|
|
||||||
message(FATAL_ERROR "You shoul define camera type CAMERA_TYPE: APOGEE_ASCENT, "
|
|
||||||
"APOGEE_ALTA, APOGEE_ALTAF, APOGEE_ASPEN or APOGEE_QUAD\n"
|
|
||||||
"For example, run\n\tcmake .. -DCAMERA_TYPE=APOGEE_ALTAF")
|
|
||||||
else()
|
|
||||||
add_definitions("-D${CAMERA_TYPE}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(APOGEE_VERSION "3.0")
|
set(APOGEE_VERSION "3.0")
|
||||||
set(APOGEE_SOVERSION "3")
|
set(APOGEE_SOVERSION "3")
|
||||||
|
|||||||
@ -168,8 +168,8 @@ static bool IsProperDevice(const std::string & msg){
|
|||||||
static bool assignAlta(const std::string & msg){
|
static bool assignAlta(const std::string & msg){
|
||||||
std::string model = GetItemFromFindStr(msg, "model=");
|
std::string model = GetItemFromFindStr(msg, "model=");
|
||||||
if(model.compare(0,6,"Ascent")==0) alta = (Ascent*) new Ascent();
|
if(model.compare(0,6,"Ascent")==0) alta = (Ascent*) new Ascent();
|
||||||
else if(model.compare(0,4,"Alta")==0) alta = (Alta*) new Alta();
|
|
||||||
else if(model.compare(0,5,"AltaF")==0) alta = (AltaF*) new AltaF();
|
else if(model.compare(0,5,"AltaF")==0) alta = (AltaF*) new AltaF();
|
||||||
|
else if(model.compare(0,4,"Alta")==0) alta = (Alta*) new Alta();
|
||||||
else if(model.compare(0,5,"Aspen")==0) alta = (Aspen*) new Aspen();
|
else if(model.compare(0,5,"Aspen")==0) alta = (Aspen*) new Aspen();
|
||||||
else if(model.compare(0,4,"Quad")==0) alta = (Quad*) new Quad();
|
else if(model.compare(0,4,"Quad")==0) alta = (Quad*) new Quad();
|
||||||
else return false;
|
else return false;
|
||||||
@ -229,7 +229,9 @@ static CamParams *findNET(){
|
|||||||
if(subnet.size() == 0) return NULL; // subnet wasn't defined
|
if(subnet.size() == 0) return NULL; // subnet wasn't defined
|
||||||
FindDeviceEthernet look4cam;
|
FindDeviceEthernet look4cam;
|
||||||
DBG(subnet);
|
DBG(subnet);
|
||||||
clearenv(); // clear all proxy & other data
|
//clearenv(); // clear all proxy & other data
|
||||||
|
setenv("http_proxy", "", 1);
|
||||||
|
setenv("HTTP_PROXY", "", 1);
|
||||||
std::string msg = look4cam.Find(subnet);
|
std::string msg = look4cam.Find(subnet);
|
||||||
// if(!IsProperDevice(msg)) // device not found
|
// if(!IsProperDevice(msg)) // device not found
|
||||||
// return NULL;
|
// return NULL;
|
||||||
|
|||||||
11
bta_print.c
11
bta_print.c
@ -291,17 +291,22 @@ int push_param(){
|
|||||||
void write_bta_queue(fitsfile *fp){
|
void write_bta_queue(fitsfile *fp){
|
||||||
#define HISTRY(...) do{CMNT(__VA_ARGS__); WRITEHIST(fp);}while(0)
|
#define HISTRY(...) do{CMNT(__VA_ARGS__); WRITEHIST(fp);}while(0)
|
||||||
if(!bta_queue) return;
|
if(!bta_queue) return;
|
||||||
BTA_Queue *cur = bta_queue;
|
BTA_Queue *cur = bta_queue, *ptr;
|
||||||
BTA_PARAMS *P;
|
BTA_PARAMS *P;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
do{
|
do{
|
||||||
P = cur->data;
|
P = cur->data;
|
||||||
|
ptr = cur;
|
||||||
HISTRY("Data record # %d", i);
|
HISTRY("Data record # %d", i);
|
||||||
HISTRY("JD = %.8g / Julian date", P->JD);
|
HISTRY("JD = %g / Julian date", P->JD);
|
||||||
HISTRY("T_AZ = %.8g / Telescope Az: %s", P->Azimuth / 3600., angle_asc(P->Azimuth));
|
HISTRY("T_AZ = %.8g / Telescope Az: %s", P->Azimuth / 3600., angle_asc(P->Azimuth));
|
||||||
HISTRY("T_ZD = %.8g / Telescope ZD: %s", P->Zenith / 3600., angle_asc(P->Zenith));
|
HISTRY("T_ZD = %.8g / Telescope ZD: %s", P->Zenith / 3600., angle_asc(P->Zenith));
|
||||||
HISTRY("T_P2 = %.8g / Current P: %s", P->P2 / 3600., angle_asc(P->P2));
|
HISTRY("T_P2 = %.8g / Current P: %s", P->P2 / 3600., angle_asc(P->P2));
|
||||||
HISTRY("WIND = %.2g / Wind speed, m/s", P->Wind);
|
HISTRY("WIND = %.2g / Wind speed, m/s", P->Wind);
|
||||||
i++;
|
i++;
|
||||||
}while((cur = cur->next));
|
cur = cur->next;
|
||||||
|
free(P);
|
||||||
|
free(ptr);
|
||||||
|
bta_queue = cur;
|
||||||
|
}while(cur);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -550,7 +550,7 @@ DBG("open %d", Ncam);
|
|||||||
}
|
}
|
||||||
DBG("Exposing");
|
DBG("Exposing");
|
||||||
#ifdef USE_BTA
|
#ifdef USE_BTA
|
||||||
push_param();
|
if(histry) push_param();
|
||||||
#endif
|
#endif
|
||||||
//exptime = (int)(E*1000.);
|
//exptime = (int)(E*1000.);
|
||||||
printf("\n\n");
|
printf("\n\n");
|
||||||
@ -575,13 +575,13 @@ DBG("open %d", Ncam);
|
|||||||
if(I - tt > time_interval){
|
if(I - tt > time_interval){
|
||||||
sleep(time_interval);
|
sleep(time_interval);
|
||||||
#ifdef USE_BTA
|
#ifdef USE_BTA
|
||||||
push_param();
|
if(histry) push_param();
|
||||||
#endif
|
#endif
|
||||||
}else while(!ApnGlueExpDone()) usleep(100000); // make 100ms error
|
}else while(!ApnGlueExpDone()) usleep(100000); // make 100ms error
|
||||||
}while(!ApnGlueExpDone());
|
}while(!ApnGlueExpDone());
|
||||||
DBG("exp done");
|
DBG("exp done");
|
||||||
#ifdef USE_BTA
|
#ifdef USE_BTA
|
||||||
push_param();
|
if(histry) push_param();
|
||||||
#endif
|
#endif
|
||||||
// "óÞÉÔÙ×ÁÎÉÅ ÉÚÏÂÒÁÖÅÎÉÑ:"
|
// "óÞÉÔÙ×ÁÎÉÅ ÉÚÏÂÒÁÖÅÎÉÑ:"
|
||||||
printf(_("Read image: "));
|
printf(_("Read image: "));
|
||||||
|
|||||||
7
usage.c
7
usage.c
@ -63,6 +63,7 @@ int
|
|||||||
,twelveBit = 0 // 12-bit ADC
|
,twelveBit = 0 // 12-bit ADC
|
||||||
,flipX = 0 // flip image around X axe (vertical flip)
|
,flipX = 0 // flip image around X axe (vertical flip)
|
||||||
,flipY = 0 // flip image around Y axe (horizontal flip)
|
,flipY = 0 // flip image around Y axe (horizontal flip)
|
||||||
|
,histry = 0 // write history at expositions
|
||||||
;
|
;
|
||||||
double temperature = -25.; // setpoint of temperature
|
double temperature = -25.; // setpoint of temperature
|
||||||
|
|
||||||
@ -255,6 +256,9 @@ void usage(char *fmt, ...){
|
|||||||
printf("\t\t--twelve-bit\t\t%s\n",
|
printf("\t\t--twelve-bit\t\t%s\n",
|
||||||
// "ÒÁÂÏÔÁÔØ × 12-ÂÉÔÎÏÍ ÒÅÖÉÍÅ"
|
// "ÒÁÂÏÔÁÔØ × 12-ÂÉÔÎÏÍ ÒÅÖÉÍÅ"
|
||||||
_("work in a 12-bit ADC mode"));
|
_("work in a 12-bit ADC mode"));
|
||||||
|
printf("\t\t--write-history\t\t%s\n",
|
||||||
|
// "ÚÁÐÉÓÙ×ÁÔØ × ÉÓÔÏÒÉÀ ÐÁÒÁÍÅÔÒÙ ÔÅÌÅÓËÏÐÁ"
|
||||||
|
_("write telescope parameters into history"));
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,7 +317,8 @@ void parse_args(int argc, char **argv){
|
|||||||
{"shutter-close", 0, &Shtr, 0},
|
{"shutter-close", 0, &Shtr, 0},
|
||||||
{"test-headers", 0, &test_headers, 1},
|
{"test-headers", 0, &test_headers, 1},
|
||||||
{"twelve-bit", 0, &twelveBit, 1},
|
{"twelve-bit", 0, &twelveBit, 1},
|
||||||
{"pre-exp", 0, &pre_exp, 1},
|
{"pre-exp", 0, &pre_exp, 1},
|
||||||
|
{"write-history", 0, &histry, 1},
|
||||||
{ 0, 0, 0, 0 }
|
{ 0, 0, 0, 0 }
|
||||||
};
|
};
|
||||||
if(argc == 1){
|
if(argc == 1){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user