Changeset 3897 for trunk/MagicSoft/Cosy
- Timestamp:
- 04/29/04 19:48:18 (21 years ago)
- Location:
- trunk/MagicSoft/Cosy
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/Makefile
r2615 r3897 157 157 @gzip -9 ../cosy.tar 158 158 159 install: 160 @echo Installing cosy to ~stesy/Cosy 161 @echo Copy 'cosy' 162 @chmod u+w /home/stesy/Cosy/cosy 163 @cp cosy /home/stesy/Cosy/ 164 @chmod a-w /home/stesy/Cosy/cosy 165 @echo Copy cosy resources '.cosyrc' 166 @chmod u+w /home/stesy/Cosy/.cosyrc 167 @cp .cosyrc /home/stesy/Cosy/ 168 @chmod a-w /home/stesy/Cosy/.cosyrc 169 @echo Copy bending model 'bending.txt' 170 @chmod u+w /home/stesy/Cosy/bending.txt 171 @cp bending.txt /home/stesy/Cosy 172 @chmod a-w /home/stesy/Cosy/bending.txt 173 @echo Copy LED offsets 'leds.txt' 174 @chmod u+w /home/stesy/Cosy/leds.txt 175 @cp leds.txt /home/stesy/Cosy/ 176 @chmod a-w /home/stesy/Cosy/leds.txt 177 @echo Copy predefined positions 'prepos.txt' 178 @chmod u+w /home/stesy/Cosy/prepos.txt 179 @cp prepos.txt /home/stesy/Cosy/ 180 @chmod a-w /home/stesy/Cosy/prepos.txt 181 @echo Copy star catalog 'stars.txt' 182 @chmod u+w /home/stesy/Cosy/stars.txt 183 @cp stars.txt /home/stesy/Cosy/ 184 @chmod a-w /home/stesy/Cosy/stars.txt 185 @echo Copy SAO catalog 186 @chmod u+w /home/stesy/Cosy/sao/sao-* 187 @cp sao/sao-* /home/stesy/Cosy/sao/ 188 @chmod a-w /home/stesy/Cosy/sao/sao-* 189 @echo finished... 190 159 191 # @endcode -
trunk/MagicSoft/Cosy/catalog/SlaPlanets.cc
r1758 r3897 19 19 Slalib::SetMjd(mjd); 20 20 21 fTt = mjd + slaDtt(mjd)/60./60./24.;21 fTt = GetMjd() + slaDtt(GetMjd())/60./60./24.; 22 22 23 23 // … … 28 28 double veh[3]; // heliocentric velocity 29 29 30 slaEvp( mjd+ fDt, 2000.0, veb, ceb, veh, fEarth);30 slaEvp(GetMjd() + fDt, 2000.0, veb, ceb, veh, fEarth); 31 31 } 32 32 -
trunk/MagicSoft/Cosy/catalog/SlaStars.cc
r2615 r3897 40 40 41 41 // prepare calculation: Mean Place to geocentric apperent 42 slaMappa(2000.0, mjd, fAmprms);// Epoche, TDB42 slaMappa(2000.0, GetMjd(), fAmprms); // Epoche, TDB 43 43 44 44 // prepare: Apperent to observed place 45 slaAoppa(mjd, 0, // mjd, Delta UT=UT1-UTC 46 // GetElong(), GetPhi(), 148, // göttingen long, lat, height 47 GetElong(), GetPhi(), GetHeight(), // göttingen long, lat, height 45 slaAoppa(GetMjd(), 0, // mjd, Delta UT=UT1-UTC 46 GetElong(), GetPhi(), GetHeight(), // long, lat, height 48 47 0, 0, // polar motion x, y-coordinate (radians) 49 48 // 273.155, 1013.25, 0.5, // temp, pressure, humidity -
trunk/MagicSoft/Cosy/catalog/Slalib.cc
r2615 r3897 29 29 { 30 30 fTime.SetMjd(mjd); 31 fAlpha = slaGmst(mjd) + GetElong(); 32 } 31 32 fAlpha = slaGmst(GetMjd()) + GetElong(); 33 } 34 35 void Slalib::Now(double offset) 36 { 37 fTime.Now(); 38 SetMjd(fTime.GetMjd()+offset/(24*60*60)); 39 } 40 33 41 34 42 ZdAz Slalib::XYZ2ZdAz(double coord[3]) const -
trunk/MagicSoft/Cosy/catalog/Slalib.h
r2615 r3897 23 23 virtual void SetMjd(double mjd); 24 24 Double_t GetMjd() const { return fTime.GetMjd(); } 25 void Now( ) { fTime.Now(); }25 void Now(double offset=0); 26 26 const MTime &GetTime() const { return fTime; } 27 27 -
trunk/MagicSoft/Cosy/main/MCosy.cc
r2615 r3897 712 712 // velocities are limited to the maximum velocity. 713 713 // 714 void MCosy::LimitSpeed(ZdAz *vt, const ZdAz &vcalc) const 715 { 714 Bool_t MCosy::LimitSpeed(ZdAz *vt, const ZdAz &vcalc) const 715 { 716 Bool_t rc = kFALSE; 717 716 718 // 717 719 // How to limit the speed. If the wind comes and blowes … … 768 770 if (fabs(vt->Az()) > maxtrack*vraz) 769 771 { 770 lout << "Warning: Azimuth speed limit (" << maxtrack*100 << "%) exceeded ... limited." << endl;772 lout << "Warning: Azimuth speed limit (" << maxtrack*100 << "%) exceeded (" << fabs(vt->Az()) << " > " << maxtrack*vraz << ")... limited." << endl; 771 773 vt->Az(maxtrack*vraz*sgn(vcalc.Az())); 774 rc=kTRUE; 772 775 } 773 776 /* … … 782 785 */ if (fabs(vt->Zd()) > maxtrack*vrzd) 783 786 { 784 lout << "Warning: Altitude speed limit (" << maxtrack*100 << "%) exceeded ... limited." << endl;787 lout << "Warning: Altitude speed limit (" << maxtrack*100 << "%) exceeded (" << fabs(vt->Zd()) <<" > " << maxtrack*vrzd << ")... limited." << endl; 785 788 vt->Zd(maxtrack*vrzd*sgn(vcalc.Zd())); 786 } 789 rc=kTRUE; 790 } 791 return rc; 787 792 } 788 793 /* … … 829 834 pointing.Zd(-pointing.Zd()); 830 835 pointing.Az(pointing.Az()+180); 836 //lout << "ZD=-ZD Az+=180" << endl; 831 837 } 832 838 833 839 const ZdAz se = GetSePos()*2*TMath::Pi()/16384; // [rad] 834 840 const ZdAz unbendedse = fBending.CorrectBack(se)*kRad2Deg; // ist pointing 841 842 //lout << "Unbended: " << unbendedse.Zd() << " " << unbendedse.Az() << endl; 835 843 836 844 do … … 839 847 if (d>-180 && d<=180) 840 848 break; 849 850 //lout << "AZ += " << TMath::Sign(360., d) << endl; 841 851 842 852 pointing.Az(pointing.Az()+TMath::Sign(360., d)); … … 897 907 void MCosy::TrackPosition(const RaDec &dst) // ra, dec [rad] 898 908 { 899 lout << "Track Position: " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg << "deg (Ra/Dec)" << endl;900 901 909 SlaStars sla(fObservatory); 902 910 … … 906 914 sla.Now(); 907 915 ZdAz dest = sla.CalcZdAz(dst); 916 917 lout << sla.GetTime() << ": Track Position " << dst.Ra()*kRad2Deg/15 << "h, " << dst.Dec()*kRad2Deg <<"deg" << endl; 908 918 909 919 // FIXME: Determin tracking start point by star culmination … … 958 968 959 969 sla.Now(); 960 lout << sla.GetTime() << " - Start tracking:"; 961 lout << " Ra: " << xy.X() << "h " << "Dec: " << xy.Y() << "\xb0" << endl; 970 // lout << sla.GetTime() << " - Start tracking:"; 971 // lout << " Ra: " << xy.X() << "h " << "Dec: " << xy.Y() << "\xb0" << endl; 972 962 973 /*#ifdef EXPERT 963 974 ofstream fout("coordinates.txt"); … … 971 982 fBackground = kBgdTracking; 972 983 984 ZdAz pos = sla.CalcZdAz(fRaDec); 985 986 lout << sla.GetTime() << " - Start Tracking: Ra=" <<xy.X() << "h Dec="; 987 lout << xy.Y() << "\xb0 @ Zd=" << pos.Zd()*kRad2Deg <<"deg Az=" << pos.Az()*kRad2Deg <<"deg" << endl; 988 973 989 //--- ofstream fout("log/cosy.pos"); 974 990 //--- fout << "Tracking:"; … … 987 1003 // Request Target position for this moment 988 1004 // 989 sla.Now( );1005 sla.Now(dt); 990 1006 991 1007 // 992 1008 // Request theoretical Position for a time in the future (To+dt) from CPU 993 1009 // 994 const Double_t mjd = sla.GetMjd()+dt/(60*60*24);995 const ZdAz pointing = sla.CalcZdAz(fRaDec, mjd); // soll pointing [deg] 996 1010 const ZdAz pointing = sla.CalcZdAz(fRaDec); // soll pointing [rad] 1011 1012 //lout << sla.GetTime() << pointing.Zd()*kRad2Deg << " " << pointing.Az()*kRad2Deg << endl; 997 1013 /* 998 1014 ZdAz dest; … … 1002 1018 ZdAz dest = AlignTrackingPos(pointing); 1003 1019 1004 ZdAz vcalc = sla.GetApproxVel(fRaDec) * kGearRatio2*4./60.; // [re/min] 1020 // lout << "DEST: " << dest.Zd()*kRad2Deg << " " <<dest.Az()*kRad2Deg << endl; 1021 1022 ZdAz vcalc = sla.GetApproxVel(fRaDec) * kGearRatio2*4./60.; 1023 //lout << "Vcalc: " << dest.Zd() << " " << dest.Az() << endl; 1024 vcalc *= kGearRatio2*4./60.; // [re/min] 1005 1025 1006 1026 float dtime = -1; 1007 1027 if (kFALSE /*fUseStarguider*/) 1008 dtime = Starguider( mjd, dest);1028 dtime = Starguider(sla.GetMjd(), dest); 1009 1029 1010 1030 if (dtime<0) … … 1012 1032 dest = fBending(dest); // [rad] 1013 1033 1034 //lout << "DEST-BEND: " << dest.Zd()*kRad2Deg << " " <<dest.Az()*kRad2Deg << endl; 1035 1014 1036 if (!CheckRange(dest)) 1015 1037 break; … … 1032 1054 1033 1055 dtime = dt; 1056 1057 ZdAz repos = GetRePos(); 1058 // lout << "Repos: " << repos.Zd()/kGearRatio.X() << " " << repos.Az()*kGearRatio.Y() << endl; 1059 // repos /= kGearRatio; 1060 repos /= 16384/TMath::Pi()/2; 1061 repos *= kRad2Deg; 1034 1062 } 1035 1063 … … 1045 1073 // 1046 1074 ZdAz vt = v/4; 1047 LimitSpeed(&vt, vcalc); 1075 if (LimitSpeed(&vt, vcalc)) 1076 { 1077 lout << "Vcalc: " << vcalc.Zd() << " " << vcalc.Az() << "re/min" <<endl; 1078 lout << "vt: " << vt.Zd() << " " << vt.Az() << "re/min" << endl; 1079 lout << "Dest: " << dest.Zd() << " " << dest.Az() << endl; 1080 } 1048 1081 vt.Round(); 1049 1082 -
trunk/MagicSoft/Cosy/main/MCosy.h
r2615 r3897 143 143 void InitSync(); 144 144 bool InitTracking(); 145 voidLimitSpeed(ZdAz *vt, const ZdAz &vcalc) const;145 Bool_t LimitSpeed(ZdAz *vt, const ZdAz &vcalc) const; 146 146 147 147 void TalkThread();
Note:
See TracChangeset
for help on using the changeset viewer.