00001 //$Header: /nfs/slac/g/glast/ground/cvs/flux/src/CrSpectrum.cxx,v 1.1 2001/05/14 16:37:50 burnett Exp $ 00002 00003 // FIX ME!!: 00004 // - computte the geomagnetic coordinates from the input (lon,lat) 00005 #include "CrSpectrum.h" 00006 00007 CrSpectrum::CrSpectrum() 00008 { 00009 setPosition(0., 0., 0.); // (latitude, longitude, time) 00010 } 00011 00012 00013 CrSpectrum::~CrSpectrum() 00014 { 00015 ; 00016 } 00017 00018 00019 void CrSpectrum::setTime(double time) 00020 { 00021 setPosition(m_lat, m_lon, time); 00022 } 00023 00024 00025 void CrSpectrum::setPosition(double latitude, double longitude) 00026 { 00027 setPosition(latitude, longitude, m_time); 00028 } 00029 00030 00031 void CrSpectrum::setPosition(double latitude, double longitude, double time) 00032 { 00033 m_lon = longitude; 00034 m_lat = latitude; 00035 m_time = time; 00036 00037 // compute the geomagnetic coordinates 00038 // temporaly returns geographic latitude and longitude: FIX ME!! 00039 m_geomagneticLongitude = longitude; 00040 m_geomagneticLatitude = latitude; 00041 00042 // compute the Cut-Off-Rigidity (GV) 00043 // temporaly retruns fixed value: FIX ME!! 00044 // ------------------------------ 00045 // For proton incoming vertically to the magnetic field, 00046 // cut off rigidity (Rc) is calculated as 00047 // (Rc/GV) = 14.9 * (1+h/R)^-2 * (cos(theta_M))^4, 00048 // where h gives altitude from earth surface, R means an radius of earth, 00049 // and theta_M is geomagnetic lattitude. 00050 // For a balloon experiment at Palestine, h is about 50km, 00051 // theta_M is about 0.735, and R is about 6380km. 00052 // We thus obtaine Rc=4.44 GV. 00053 // Reference: 00054 // "Handbook of space astronomy and astrophysics" 2nd edition, p225 00055 // Zombeck, 1990, Cambridge University Press 00056 // "High Energy Astrophysics" 2nd edition, p325-330 00057 // M. S. Longair, 1992, Cambridge University Press 00058 // ------------------------------ 00059 m_cutOffRigidity = 4.44; // temporarily fixed to Palestine value. 00060 00061 // compute the force-field approximation potential (MV) 00062 // temporaly returns fized value: FIX ME!! 00063 // m_solarWindPotential = 540.; // temporarily fixed to the typical minimum-activity value. 00064 m_solarWindPotential = 1100.; // temporarily fixed to the typical minimum-activity value. 00065 } 00066 00067 00068 double CrSpectrum::longitude() const 00069 { 00070 return m_lon; 00071 } 00072 00073 00074 double CrSpectrum::latitude() const 00075 { 00076 return m_lat; 00077 } 00078 00079 00080 double CrSpectrum::geomagneticLongitude() const 00081 { 00082 return m_geomagneticLongitude; 00083 } 00084 00085 00086 double CrSpectrum::geomagneticLatitude() const 00087 { 00088 return m_geomagneticLatitude; 00089 } 00090 00091 00092 double CrSpectrum::cutOffRigidity() const 00093 { 00094 return m_cutOffRigidity; 00095 } 00096 00097 00098 double CrSpectrum::solarWindPotential() const 00099 { 00100 return m_solarWindPotential; 00101 } 00102
1.2.3 written by Dimitri van Heesch,
© 1997-2000