Changeset 1690 for trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc
- Timestamp:
- 12/18/02 17:48:44 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/gui/MGSkyPosition.cc
r1275 r1690 172 172 : MGEmbeddedCanvas("SkyPosition", p, w, 110) 173 173 { 174 cout << "MGSkyPosition: Initilizing." << endl;175 174 DrawCoordinateSystem(); 176 175 InitPlanets(); … … 178 177 InitText(); 179 178 InitCanvas(); 180 cout << "MGSkyPosition: Initilizing done." << endl;181 179 } 182 180 … … 278 276 static int Y = ~0; 279 277 280 int xd = (int) floor(x);281 int yd = (int) floor(y);278 int xd = (int)/*floor*/(x); 279 int yd = (int)/*floor*/(y); 282 280 x *= 60.; 283 281 y *= 60.; 284 282 285 int fx = (int) floor(x*10.);286 int fy = (int) floor(y*10.);283 int fx = (int)/*floor*/(x*10.); 284 int fy = (int)/*floor*/(y*10.); 287 285 288 286 if (X==fx && Y==fy) … … 296 294 297 295 char txt[100]; 298 sprintf(txt, "Zd=% d\xb0%02.1f'\nAz=%d\xb0%02.1f'",299 x d, xm, yd, ym);296 sprintf(txt, "Zd=%s%d\xb0%02.1f'\nAz=%s%d\xb0%02.1f'", 297 x<0?"-":"", abs(xd), xm, y<0?"-":"", abs(yd), ym); 300 298 301 299 fText->SetText(fText->GetX(), fText->GetY(), txt); … … 305 303 306 304 307 void MGSkyPosition::Update(ZdAz &pos )305 void MGSkyPosition::Update(ZdAz &pos, double mjd) 308 306 { 309 307 // 310 308 // calculate actual time for planet positions 311 309 // 312 fSlaPlanet->SetMjd 2Now();313 fSlaStar->SetMjd 2Now();310 fSlaPlanet->SetMjd(mjd); 311 fSlaStar->SetMjd(mjd); 314 312 315 313 UpdatePlanet(kESun, fSun);
Note:
See TracChangeset
for help on using the changeset viewer.