| 327 |
// Here I do: resurs offset + timesync |
// Here I do: resurs offset + timesync |
| 328 |
TDatime offRes = TDatime(offDate, offTime); |
TDatime offRes = TDatime(offDate, offTime); |
| 329 |
TTimeStamp offResTS = TTimeStamp(offRes.GetYear(), offRes.GetMonth(), offRes.GetDay(), offRes.GetHour(), offRes.GetMinute(), offRes.GetSecond(), 0, kTRUE, timesync); |
TTimeStamp offResTS = TTimeStamp(offRes.GetYear(), offRes.GetMonth(), offRes.GetDay(), offRes.GetHour(), offRes.GetMinute(), offRes.GetSecond(), 0, kTRUE, timesync); |
| 330 |
|
// cout<<"timesync="<<timesync<<" obt_timesync="<<obt_timesync<<endl; |
| 331 |
|
// cout<<"offResTS.GetSec()="<<offResTS.GetSec()<<endl; |
| 332 |
|
// cout<<"offResTS.AsString()="<<offResTS.AsString()<<endl<<endl; |
| 333 |
|
|
| 334 |
// Now I need a pointer to a cTle object. The class misses a |
// Now I need a pointer to a cTle object. The class misses a |
| 335 |
// constructor without arguments, so we have to give it a dummy TLE. |
// constructor without arguments, so we have to give it a dummy TLE. |
| 345 |
cout<<"OrbitalRate: Warning!!! No tle file supplied.\n"; |
cout<<"OrbitalRate: Warning!!! No tle file supplied.\n"; |
| 346 |
|
|
| 347 |
// Here I do: resurs offset + timesync - obt of the timesync |
// Here I do: resurs offset + timesync - obt of the timesync |
| 348 |
offResTS.Set(offResTS.GetSec() - obt_timesync, kTRUE, 0, kFALSE); |
// cout<<"here0 "<<offResTS.GetSec()<<endl; |
| 349 |
|
// offResTS.Set(offResTS.GetSec() - obt_timesync, kTRUE, 0, kFALSE); |
| 350 |
|
offResTS.Set(offResTS.GetSec() - obt_timesync, kFALSE, 0, kFALSE); |
| 351 |
|
// cout<<"here1 "<<offResTS.GetSec()<<endl; |
| 352 |
|
|
| 353 |
cOrbit orbit(*tle1); |
cOrbit orbit(*tle1); |
| 354 |
cEci eci; |
cEci eci; |
| 360 |
int pYear, pMon; double pDOM; |
int pYear, pMon; double pDOM; |
| 361 |
jdatetime.getComponent(&pYear, &pMon, &pDOM); |
jdatetime.getComponent(&pYear, &pMon, &pDOM); |
| 362 |
offsetTime = ((Long64_t) offResTS.GetSec() - (Long64_t) tledate.GetSec()); |
offsetTime = ((Long64_t) offResTS.GetSec() - (Long64_t) tledate.GetSec()); |
| 363 |
|
// cerr<<"offsetTime="<<offsetTime<<endl |
| 364 |
|
// <<"offResTS.GetSec()="<<offResTS.GetSec()<<endl |
| 365 |
|
// <<"tledate.GetSec()="<<tledate.GetSec()<<endl<<endl; |
| 366 |
|
|
| 367 |
/********** Magnetic Field **************/ |
/********** Magnetic Field **************/ |
| 368 |
// Check that all this is correct! |
// Check that all this is correct! |
| 371 |
// I can now compute the magnetic dipole moment at the actual date, |
// I can now compute the magnetic dipole moment at the actual date, |
| 372 |
// using the cJulian date. I don't to recompute it for every event |
// using the cJulian date. I don't to recompute it for every event |
| 373 |
// beacause changes are not relevant at all. |
// beacause changes are not relevant at all. |
|
// Int_t y = tledate.GetYear(); |
|
|
// Int_t m = tledate.GetMonth(); |
|
|
// Int_t d = tledate.GetDay(); |
|
| 374 |
UInt_t y, m, d; |
UInt_t y, m, d; |
| 375 |
tledate.GetDate(kTRUE, 0, &y, &m, &d); |
tledate.GetDate(kTRUE, 0, &y, &m, &d); |
| 376 |
float year = (float) y + (m*31+d)/365; |
float year = (float) y + (m*31+d)/365; |
| 430 |
// event and the tle date. I use seconds and not milliseconds |
// event and the tle date. I use seconds and not milliseconds |
| 431 |
// because the indetermination on the timesync is about 1s. |
// because the indetermination on the timesync is about 1s. |
| 432 |
timeElapsedFromTLE = offsetTime + obt/1000; |
timeElapsedFromTLE = offsetTime + obt/1000; |
| 433 |
|
if(!i) cerr<<"1st event: timeElapsedFromTLE="<<timeElapsedFromTLE<<endl; |
| 434 |
|
|
| 435 |
// I also need the abstime in seconds rounded to the lower |
// I also need the abstime in seconds rounded to the lower |
| 436 |
// value. Every second, we set a_second_is_over to true. Only |
// value. Every second, we set a_second_is_over to true. Only |