Changeset 1757 for trunk/MagicSoft/Cosy
- Timestamp:
- 02/14/03 17:12:58 (22 years ago)
- Location:
- trunk/MagicSoft/Cosy
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/.cosyrc
r1742 r1757 19 19 Zd_ResRE[re/U_mot]: 500 20 20 21 #Az_Min: -90 22 #Az_Max: 318 23 24 #Zd_Min: -90 25 #Zd_Max: 100 26 21 27 Az_Id-MAC1: 1 22 28 Az_Id-MAC2: 3 -
trunk/MagicSoft/Cosy/Changelog
r1742 r1757 1 1 -*-*- END -*-*- 2 2 3 2003/02/14 - Thomas Bretz (La Palma): 4 5 * .cosyrc: 6 - added prototypes for the telescope allowed range 7 8 * Makefile: 9 - changed test to testse 10 11 * candrv/vmodican.cc: 12 - added the possibility to start cosy without the CANbus card 13 installed 14 15 * catalog/SlaPlanets.cc: 16 - fixed the ephemeris configuration 17 18 * catalog/SlaStars.cc: 19 - added some more comments 20 21 * catalog/Slalib.[h,cc]: 22 - changed Wuerzburg location to LaPalma location 23 - added Height to the data members 24 25 * main/MCosy.[h,cc]: 26 - added range checks in positioning and tracking 27 28 * slalib/Makefile: 29 - added rdplan 30 - added pvobs 31 - added dtt 32 - added dat 33 - added rcc 34 35 36 3 37 2003/01/23 - Thomas Bretz: 4 38 5 * .cosyrc:6 - changed maximum time to reach home from 100 to 1507 8 * Makefile:9 - added devdrv10 11 * Makefile.rules, candrv/Makefile, devdrv/Makefile:12 - changed some ordering13 14 * devdrv/shaftencoder.cc:15 - changed Guarding from 2x125 to 2x17516 17 * main/MCosy.cc:18 - fixed StopWaitingForSDO bug (if this was raised once the19 'shutdown' never waited correctly for an SDo anymore)20 - fixed the usage of the bending correction in some places21 22 * testse.cc:23 - added39 * .cosyrc: 40 - changed maximum time to reach home from 100 to 150 41 42 * Makefile: 43 - added devdrv 44 45 * Makefile.rules, candrv/Makefile, devdrv/Makefile: 46 - changed some ordering 47 48 * devdrv/shaftencoder.cc: 49 - changed Guarding from 2x125 to 2x175 50 51 * main/MCosy.cc: 52 - fixed StopWaitingForSDO bug (if this was raised once the 53 'shutdown' never waited correctly for an SDo anymore) 54 - fixed the usage of the bending correction in some places 55 56 * testse.cc: 57 - added 24 58 25 59 -
trunk/MagicSoft/Cosy/Makefile
r1742 r1757 20 20 # 21 21 22 PROGRAMS = test cosy starg22 PROGRAMS = testse cosy starg 23 23 SOLIB = 24 24 CINT = M -
trunk/MagicSoft/Cosy/candrv/vmodican.cc
r1727 r1757 64 64 int VmodIcan::Ioctl(int msg, void *arg) 65 65 { 66 return ioctl(fd, msg, (int)arg) >= 0;66 return fd<0 ? 1 : ioctl(fd, msg, (int)arg) >= 0; 67 67 } 68 68 … … 104 104 void *VmodIcan::Thread() 105 105 { 106 if (fd<0) 107 return NULL; 108 106 109 lout << "- Starting Receiver Loop." << endl; 107 110 … … 946 949 cout << "Cannot open device '" << dev << "'... exit." << endl; 947 950 cout << strerror(errno) << endl; 948 exit(1); // open module951 // exit(1); // open module 949 952 } 950 953 -
trunk/MagicSoft/Cosy/catalog/SlaPlanets.cc
r1109 r1757 29 29 } 30 30 31 #include "SlaStars.h" 32 31 33 void SlaPlanets::UpdatePlanetPos(ePlanets_t planet) 32 34 { 35 /* 33 36 double cp[6] = { 0, 0, 0, 0, 0, 0 }; 34 37 … … 52 55 case kENeptune: 53 56 case kEPluto: 57 case kESun: 54 58 { 55 // 56 // coordinates of planet: heliocentric, equatoril, J2000 57 // 59 */ 60 // 61 // coordinates of planet: heliocentric, equatoril, J2000 62 // 63 double ra,dec,diam; 64 // TDB, planet, elong, phi, *ra, *dec, *diam 58 65 59 int rc;60 slaPlanet(GetMjd(), planet, cp, &rc);66 // One can use TT instead of TDB for all plenets 67 // (except the moon) 61 68 62 if (rc) 63 return; 64 } 65 // !! Fall through! 69 const double tt = GetMjd() + slaDtt(GetMjd())/60./60./24.; 66 70 67 case kESun: 68 coord[0] = cp[0] - fEarth[0]; 69 coord[1] = cp[1] - fEarth[1]; 70 coord[2] = cp[2] - fEarth[2]; 71 break; 72 } 71 // FIXME: Shell be UT1 72 const double ut1 = fmod(GetMjd(), 1); 73 73 74 fZdAz[planet] = XYZ2ZdAz(coord); 74 // tt should be tdb, but tt can be used 75 const double tdb = tt + slaRcc(tt, ut1, GetElong(), 8300*cos(GetPhi()), 8300*sin(GetPhi() ))/60./60./24.; 76 /* 77 cout << "Dt: " << slaDtt(GetMjd()) << endl; 78 cout << "Rc: " << slaRcc(tt, ut1, GetElong(), 8300*cos(GetPhi()), 8300*sin(GetPhi() )) << endl; 79 */ 80 slaRdplan(tt, planet, GetElong(), GetPhi(), 81 &ra, &dec, &diam); 82 /* 83 switch (planet) 84 { 85 case kEMoon: cout << "Moon: "; break; 86 case kEMercury: cout << "Merkur: "; break; 87 case kEVenus: cout << "Venus: "; break; 88 case kEMars: cout << "Mars: "; break; 89 case kEJupiter: cout << "Jupiter: "; break; 90 case kESaturn: cout << "Saturn: "; break; 91 case kEUranus: cout << "Uranus: "; break; 92 case kENeptune: cout << "Neptun: "; break; 93 case kEPluto: cout << "Pluto: "; break; 94 case kESun: cout << "Sonne: "; break; 95 } 96 97 cout << (int)(ra*12/TMath::Pi()) << "h"<< (int)(ra*12/TMath::Pi()*60)%60 <<"min "; 98 cout << (int)(dec*kRad2Deg) << "deg" << (int)(dec*kRad2Deg*60)%60 << "min" << endl; 99 */ 100 /* 101 SlaStars sla; 102 sla.SetMjd(GetMjd()); 103 ZdAz za = sla.CalcZdAz(RaDec(ra,dec)); 104 cout << za.Zd()*kRad2Deg << " " << fmod(za.Az()*kRad2Deg+720,360.) << endl; 105 fZdAz[planet] = za; 106 */ 107 108 double az, el; 109 slaDe2h(GetAlpha()-ra, dec, GetPhi(), &az, &el); 110 111 cout << 90-el*kRad2Deg << " " << fmod(az*kRad2Deg+720,360.) << endl; 112 fZdAz[planet].Set(TMath::Pi()/2-el, az); 113 /* 114 } 115 // !! Fall through! 116 break; 117 case kESun: 118 coord[0] = cp[0] - fEarth[0]; 119 coord[1] = cp[1] - fEarth[1]; 120 coord[2] = cp[2] - fEarth[2]; 121 break; 122 } 123 fZdAz[planet] = XYZ2ZdAz(coord); 124 125 if (planet==kESun) 126 { 127 cout << fZdAz[kESun].Zd()*kRad2Deg << " " << fZdAz[kESun].Az()*kRad2Deg << endl; 128 }*/ 75 129 } -
trunk/MagicSoft/Cosy/catalog/SlaStars.cc
r1691 r1757 38 38 // ----- calculate star independent parameters ---------- 39 39 // 40 slaMappa(2000.0, mjd, fAmprms); 41 slaAoppa(mjd, 0, // mjd, UT1-UTC 40 41 // prepare calculation: Mean Place to geocentric apperent 42 slaMappa(2000.0, mjd, fAmprms); // Epoche, TDB 43 44 // prepare: Apperent to observed place 45 slaAoppa(mjd, 0, // mjd, Delta UT=UT1-UTC 42 46 // GetElong(), GetPhi(), 148, // göttingen long, lat, height 43 GetElong(), GetPhi(), 300, // göttingen long, lat, height44 0, 0, // polar motion x, y-coordinate (radians)47 GetElong(), GetPhi(), GetHeight(), // göttingen long, lat, height 48 0, 0, // polar motion x, y-coordinate (radians) 45 49 // 273.155, 1013.25, 0.5, // temp, pressure, humidity 46 50 273.155+20, 1013.25, 0.5, // temp, pressure, humidity 47 51 // 0.2, 0.0065, // wavelength, tropo lapse rate 48 0.55, 0.0065, // wavelength, tropo lapse rate52 0.55, 0.0065, // wavelength, tropo lapse rate 49 53 fAoprms); 50 54 } -
trunk/MagicSoft/Cosy/catalog/Slalib.cc
r1109 r1757 18 18 // 19 19 int status; 20 slaDaf2r(51, 38, 48.0, &fPhi, &status); 21 slaDaf2r( 9, 56, 36.0, &fElong, &status); 20 //slaDaf2r(51, 38, 48.0, &fPhi, &status); 21 //slaDaf2r( 9, 56, 36.0, &fElong, &status); 22 //fHeight = 300; 23 24 slaDaf2r(28, 45, 30.0, &fPhi, &status); 25 slaDaf2r(17, 52, 48.0, &fElong, &status); 26 27 fElong *= -1; 28 fHeight = 2326; 22 29 23 30 cout << "Latitude: 51\x9c 38'48.0\" = " << kRad2Deg*fPhi << " "; -
trunk/MagicSoft/Cosy/catalog/Slalib.h
r1109 r1757 16 16 double fElong; 17 17 18 double fHeight; 19 18 20 public: 19 21 Slalib(); … … 29 31 virtual void SetMjd(const double mjd); 30 32 31 double GetAlpha() const { return fAlpha; }32 double GetMjd() const { return fMjd; }33 double GetAlpha() const { return fAlpha; } 34 double GetMjd() const { return fMjd; } 33 35 34 double GetPhi() const { return fPhi; } 35 double GetElong() const { return fElong; } 36 double GetPhi() const { return fPhi; } 37 double GetElong() const { return fElong; } 38 39 double GetHeight() const { return fHeight; } 36 40 37 41 ZdAz XYZ2ZdAz(double coord[3]) const; -
trunk/MagicSoft/Cosy/main/MCosy.cc
r1742 r1757 391 391 { 392 392 // FIXME: Correct by fOffset ? 393 394 const ZdAz d = dst*kRad2Deg; 395 if (d.Zd()<fMin.Zd() || d.Zd()>fMax.Zd() || d.Az()<fMin.Az() || d.Az()>fMax.Az()) 396 { 397 lout << "ERROR: Requested Position not inside allowed range." << endl; 398 return kFALSE; 399 } 400 393 401 394 402 /* … … 724 732 ZdAz dummy = fBending(sla.CalcZdAz(fRaDec)); 725 733 dest = CorrectTarget(GetSePos(), dummy); // [se] 734 735 const ZdAz d = dest*360./16384; // [deg] 726 736 dest *= kGearRatio; // [re] 737 738 if (d.Zd()<fMin.Zd() || d.Zd()>fMax.Zd() || d.Az()<fMin.Az() || d.Az()>fMax.Az()) 739 { 740 lout << "ERROR: Calculated position for T+dt not inside allowed range." << endl; 741 break; 742 } 727 743 728 744 ZdAz vcalc = sla.GetApproxVel(fRaDec) * kGearRatio2*4./60.; // [re/min] … … 1070 1086 TEnv env(".cosyrc"); 1071 1087 cout << "done." << endl; 1088 1089 cout << "Reading telescope range..." << flush; 1090 const Double_t amin = env.GetValue("Az_Min", -90.0); 1091 const Double_t zmin = env.GetValue("Zd_Min", -90.0); 1092 fMin.Set(zmin, amin); 1093 1094 cout << " Min: " << zmin << "deg " << amin << "deg" << endl; 1095 1096 const Double_t amax = env.GetValue("Az_Max", 318.0); 1097 const Double_t zmax = env.GetValue("Zd_Max", 100.0); 1098 fMax.Set(zmax, amax); 1099 1100 cout << " Max: " << zmax << "deg " << amax << "deg" << endl; 1072 1101 1073 1102 cout << "Reading gear ratios..." << flush; -
trunk/MagicSoft/Cosy/main/MCosy.h
r1703 r1757 83 83 ZdAz fAccuracy; // Actual accuracy of Tracking 84 84 ZdAz fVelocity; // Actual velocity of Tracking 85 ZdAz fMin; 86 ZdAz fMax; 85 87 86 88 XY kGearRatio; // describing the gear of the system [re/se]
Note:
See TracChangeset
for help on using the changeset viewer.