Changeset 7788 for trunk/MagicSoft/Cosy/gui
- Timestamp:
- 07/12/06 03:00:16 (18 years ago)
- Location:
- trunk/MagicSoft/Cosy/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/gui/MGAccuracy.cc
r4076 r7788 20 20 #include "coord.h" 21 21 #include "MTime.h" 22 #include "MAstro.h" 22 23 23 24 ClassImp(MGAccuracy); … … 238 239 void MGAccuracy::Update(Float_t pzd, Float_t azd, Float_t aaz) 239 240 { 240 const Float_t d2r = TMath::Pi()/180.; 241 242 pzd *= d2r; 243 azd *= d2r; 244 aaz *= d2r; 245 246 const double el = TMath::Pi()/2-pzd; 247 248 const double dphi2 = aaz/2.; 249 const double cos2 = cos(dphi2)*cos(dphi2); 250 const double sin2 = sin(dphi2)*sin(dphi2); 251 const double d = cos(azd)*cos2 - cos(2*el)*sin2; 252 253 // 254 // Original: 255 // cos(Zd1)*cos(Zd2)+sin(Zd1)*sin(Zd2)*cos(dAz) 256 // 257 // Correct: 258 // const double d = cos(azd)*cos2 - cos(el1+el2)*sin2; 259 // 260 // Estimated: 261 // const double d = cos(azd)*cos2 - cos(2*el)*sin2; 262 // 263 264 double dist = acos(d)*TMath::RadToDeg(); 241 const double dist = MAstro::GetDevAbs(pzd, azd, aaz); 265 242 266 243 UpdateText(dist); … … 303 280 } 304 281 305 void MGAccuracy::Update(ZdAz &pos, ZdAz &acc) 306 { 307 UpdateCross(acc.Az()*3600., acc.Zd()*3600.); 308 Update(pos.Zd(), acc.Zd(), acc.Az()); 282 void MGAccuracy::Update(ZdAz &pos, ZdAz &dev) 283 { 284 // Estimate the distance in az direction on the camera plane 285 const double daz = MAstro::GetDevAbs(pos.Zd(), 0, dev.Az())*3600.; 286 287 //cout << "--> T: " << dev.Az()*60 << " " << dev.Zd()*60. << endl; 288 289 UpdateCross(TMath::Sign(daz, dev.Az()), dev.Zd()*3600.); 290 Update(pos.Zd(), dev.Zd(), dev.Az()); 309 291 310 292 UpdateCanvas(); -
trunk/MagicSoft/Cosy/gui/MGStarg.cc
r4865 r7788 16 16 #include "coord.h" 17 17 #include "MTime.h" 18 #include "MAstro.h" 18 19 19 20 ClassImp(MGStarg); … … 36 37 text.SetTextAlign(11); // left, bottom (s.TAttText) 37 38 text.SetTextColor(3); 38 text.DrawText( 160, -220, "0.0125 deg");39 text.DrawText(220, -220, "0.75'"); 39 40 40 41 text.SetTextColor(5); 41 text.DrawText( 160, -250, "0.025 deg");42 text.DrawText(220, -250, "1.50'"); 42 43 43 44 text.SetTextColor(2); 44 text.DrawText( 160, -280, "0.05 deg");45 text.DrawText(220, -280, "3.00'"); 45 46 46 47 … … 218 219 void MGStarg::Update(Float_t pzd, Float_t azd, Float_t aaz) 219 220 { 220 const Float_t d2r = TMath::Pi()/180.; 221 222 pzd *= d2r; 223 azd *= d2r; 224 aaz *= d2r; 225 226 const double el = TMath::Pi()/2-pzd; 227 228 const double dphi2 = aaz/2.; 229 const double cos2 = cos(dphi2)*cos(dphi2); 230 const double sin2 = sin(dphi2)*sin(dphi2); 231 const double d = cos(azd)*cos2 - cos(2*el)*sin2; 232 233 double dist = acos(d)*TMath::RadToDeg(); 221 const double dist = MAstro::GetDevAbs(pzd, azd, aaz); 234 222 235 223 UpdateText(dist); … … 269 257 } 270 258 271 void MGStarg::Update(ZdAz &pos, ZdAz &acc) 272 { 273 274 UpdateCross(acc.Az()*3600., acc.Zd()*3600.); 275 Update(pos.Zd(), acc.Zd(), acc.Az()); 259 void MGStarg::Update(ZdAz &pos, ZdAz &dev) 260 { 261 // Estimate the distance in az direction on the camera plane 262 const double daz = MAstro::GetDevAbs(pos.Zd(), 0, dev.Az())*3600.; 263 264 //cout << "--> S: " << dev.Az()*60 << " " << dev.Zd()*60. << endl; 265 266 UpdateCross(TMath::Sign(daz, dev.Az()), dev.Zd()*3600.); 267 Update(pos.Zd(), dev.Zd(), dev.Az()); 276 268 277 269 UpdateCanvas(); 278 270 } 279 280 281 282 283 284 285 286 287 288
Note:
See TracChangeset
for help on using the changeset viewer.