| 199 |
Int_t uno = 1; |
Int_t uno = 1; |
| 200 |
char *niente = " "; |
char *niente = " "; |
| 201 |
GL_PARAM *glparam = new GL_PARAM(); |
GL_PARAM *glparam = new GL_PARAM(); |
| 202 |
|
GL_PARAM *glparam2 = new GL_PARAM(); |
| 203 |
Int_t parerror=glparam->Query_GL_PARAM(1,301,dbc); // parameters stored in DB in GL_PRAM table |
Int_t parerror=glparam->Query_GL_PARAM(1,301,dbc); // parameters stored in DB in GL_PRAM table |
| 204 |
if ( parerror<0 ) { |
if ( parerror<0 ) { |
| 205 |
code = parerror; |
code = parerror; |
| 208 |
ltp2 = (Int_t)(glparam->PATH+glparam->NAME).Length(); |
ltp2 = (Int_t)(glparam->PATH+glparam->NAME).Length(); |
| 209 |
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam->PATH+glparam->NAME).Data()); |
if ( verbose ) printf(" Reading Earth's Magnetic Field parameter file: %s \n",(glparam->PATH+glparam->NAME).Data()); |
| 210 |
// |
// |
|
GL_PARAM *glparam2 = new GL_PARAM(); |
|
| 211 |
parerror=glparam2->Query_GL_PARAM(1,302,dbc); // parameters stored in DB in GL_PRAM table |
parerror=glparam2->Query_GL_PARAM(1,302,dbc); // parameters stored in DB in GL_PRAM table |
| 212 |
if ( parerror<0 ) { |
if ( parerror<0 ) { |
| 213 |
code = parerror; |
code = parerror; |
| 525 |
float jyear=0; |
float jyear=0; |
| 526 |
|
|
| 527 |
if(atime >= gltle->GetToTime()) { |
if(atime >= gltle->GetToTime()) { |
| 528 |
gltle->Query(atime, dbc); |
if ( !gltle->Query(atime, dbc) ){ |
| 529 |
|
|
| 530 |
// Compute the magnetic dipole moment. |
// Compute the magnetic dipole moment. |
| 531 |
UInt_t year, month, day, hour, min, sec; |
UInt_t year, month, day, hour, min, sec; |
| 532 |
|
|
| 533 |
TTimeStamp t = TTimeStamp(atime, kTRUE); |
TTimeStamp t = TTimeStamp(atime, kTRUE); |
| 534 |
t.GetDate(kTRUE, 0, &year, &month, &day); |
t.GetDate(kTRUE, 0, &year, &month, &day); |
| 535 |
t.GetTime(kTRUE, 0, &hour, &min, &sec); |
t.GetTime(kTRUE, 0, &hour, &min, &sec); |
| 536 |
jyear = (float) year |
jyear = (float) year |
| 537 |
+ (month*31.+ (float) day)/365. |
+ (month*31.+ (float) day)/365. |
| 538 |
+ (hour*3600.+min*60.+(float)sec)/(24*3600*365.); |
+ (hour*3600.+min*60.+(float)sec)/(24*3600*365.); |
| 539 |
|
|
| 540 |
feldcof_(&jyear, &dimo); // get dipole moment for year |
feldcof_(&jyear, &dimo); // get dipole moment for year |
| 541 |
|
} else { |
| 542 |
|
code = -56; |
| 543 |
|
goto closeandexit; |
| 544 |
|
}; |
| 545 |
} |
} |
| 546 |
|
|
| 547 |
// Propagate the orbit from the tle time to atime, using SGP(D)4. |
// Propagate the orbit from the tle time to atime, using SGP(D)4. |