Public Member Functions | |
| OrbitSvc (const std::string &name, ISvcLocator *pSvcLocator) | |
| ctor | |
| virtual StatusCode | initialize () |
| perform initializations for this service. | |
| virtual StatusCode | finalize () |
| perform the finalization, as required for a service. | |
| virtual StatusCode | queryInterface (const InterfaceID &riid, void **ppvUnknown) |
| Query interface. | |
Private Attributes | |
| StringArrayProperty | m_pointingHistory |
| history file name and launch date | |
| DoubleArrayProperty | m_pointingDirection |
| (ra, dec) for pointing | |
| DoubleProperty | m_zenithTheta |
| set for zenith | |
| DoubleProperty | m_rocking_angle |
|
||||||||||||
|
ctor
Definition at line 64 of file OrbitSvc.cxx. References m_pointingDirection, m_pointingHistory, m_rocking_angle, and m_zenithTheta.
00065 : Service(name,svc)
00066 {
00067
00068 declareProperty("PointingHistory", m_pointingHistory); // doublet, filename and launch date
00069 declareProperty("pointingDirection", m_pointingDirection);
00070 declareProperty("zenithTheta", m_zenithTheta=-99);
00071 declareProperty("rocking_angle", m_rocking_angle=0); // set non-zero to enable rocking
00072
00073
00074
00075 }
|
|
|
perform the finalization, as required for a service.
Definition at line 152 of file OrbitSvc.cxx.
00153 {
00154 return StatusCode::SUCCESS;
00155 }
|
|
|
perform initializations for this service.
Definition at line 78 of file OrbitSvc.cxx. References m_pointingDirection, m_pointingHistory, m_rocking_angle, and m_zenithTheta.
00078 {
00079 StatusCode sc = StatusCode::SUCCESS;
00080 MsgStream log(msgSvc(), name());
00081 using astro::GPS;
00082
00083 // Use the Job options service to set the Algorithm's parameters
00084 setProperties();
00085
00086
00087 //set the input file to be used as the pointing database, if used
00088 if(! m_pointingHistory.value().empty()){
00089 std::string filename(m_pointingHistory.value()[0]);
00090 facilities::Util::expandEnvVar(&filename);
00091 double offset = 0;
00092 bool horizontalflag(false);
00093 if( m_pointingHistory.value().size()>1){
00094 std::string field(m_pointingHistory.value()[1]);
00095 if(! field.empty() ) { // allow null string
00096 facilities::Timestamp jt(m_pointingHistory.value()[1]);
00097 offset = (astro::JulianDate(jt.getJulian())-astro::JulianDate::missionStart())*astro::JulianDate::secondsPerDay;
00098 }
00099 }
00100
00101 if( m_pointingHistory.value().size()>2){
00102 std::string field(m_pointingHistory.value()[2]);
00103 horizontalflag =! field.empty();
00104 }
00105 log << MSG::INFO << "Loading Pointing History File : " << filename
00106 << " with MET offset "<< offset << endreq;
00107 if( horizontalflag){
00108 log << MSG::INFO << "Will override x-direction to be horizontal"<<endreq;
00109 }
00110
00111 astro::GPS::instance()->setPointingHistoryFile(filename, offset, horizontalflag);
00112 }
00113 else if( m_pointingDirection.value().size()==2 ) {
00114 // if direction set, ignore everything else!
00115 double ra(m_pointingDirection.value()[0]), dec(m_pointingDirection.value()[1]);
00116 astro::GPS::instance()->setPointingDirection(astro::SkyDir(ra, dec));
00117 log << MSG::INFO << "set to point at ra,dec= " << ra << ", "<<dec << endreq;
00118
00119 }else if( m_zenithTheta>=0) {
00120 // if set from defalt, set to this value
00121 //m_fluxSvc->setRockType(astro::GPS::EXPLICIT, m_zenithTheta);
00122 GPS::instance()->setRockType(GPS::EXPLICIT);
00123 GPS::instance()->rockingDegrees(m_zenithTheta);
00124
00125 log << MSG::INFO << "set to zenith angle " << m_zenithTheta << " degrees" << endreq;
00126 }else if(m_rocking_angle >0 ){
00127 //output to record the pointing settings
00128 //then this line sets the rocking type, as well as the rocking angle.
00129 //m_fluxSvc->setRockType(GPS::ONEPERORBIT ,m_rocking_angle);
00130 GPS::instance()->setRockType(GPS::ONEPERORBIT);
00131 GPS::instance()->rockingDegrees(m_zenithTheta);
00132 log << MSG::INFO << "Once per orbit rocking Angle: " << m_rocking_angle << " degrees" << endreq;
00133
00134 }
00135
00136
00137 return sc;
00138 }
|
|
||||||||||||
|
Query interface.
Definition at line 141 of file OrbitSvc.cxx.
00141 {
00142 if ( IID_IOrbitSvc.versionMatch(riid) ) {
00143 *ppvInterface = (OrbitSvc*)this;
00144 } else {
00145 return Service::queryInterface(riid, ppvInterface);
00146 }
00147
00148 addRef();
00149 return SUCCESS;
00150 }
|
|
|
(ra, dec) for pointing
Definition at line 51 of file OrbitSvc.cxx. Referenced by initialize(), and OrbitSvc(). |
|
|
history file name and launch date
Definition at line 50 of file OrbitSvc.cxx. Referenced by initialize(), and OrbitSvc(). |
|
|
Definition at line 53 of file OrbitSvc.cxx. Referenced by initialize(), and OrbitSvc(). |
|
|
set for zenith
Definition at line 52 of file OrbitSvc.cxx. Referenced by initialize(), and OrbitSvc(). |
1.3.3