Changeset 1515 in Sophya for trunk/SophyaExt/XAstroPack/xastropack.cc
- Timestamp:
- Jun 12, 2001, 5:36:47 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/XAstroPack/xastropack.cc
r1465 r1515 7 7 // mois [1,12] (mn) 8 8 // annee (yr) 9 // universal time [0,2 3[ (utc)10 // Greenwich mean siderial [0,2 3[ (gst)11 // Greenwich mean siderial at 0h UT [0,2 3[ (gst0)9 // universal time [0,24[ (utc) 10 // Greenwich mean siderial [0,24[ (gst) 11 // Greenwich mean siderial at 0h UT [0,24[ (gst0) 12 12 // EQUATORIALE: ascension droite en heures [0,24[ (ra) 13 13 // declinaison en degres [-90,90] (dec) … … 15 15 // GALACTIQUE: longitude en degres [0,360[ (glng) 16 16 // latitude en degres [-90,90] (glat) 17 // HORIZONTAL: a ltitude en degres [-90,90] (alt)18 // azimuth en degres [0,360[ (az)19 // (angle round to the east from north+)20 // ECLIPTIQUE: l atitude ecliptique en degres [-90,90] (eclat)21 // lontitude ecliptique en degres [0,360[ (eclng)22 // (angle round counter clockwise from the vernal equinoxe)23 // GEOGRAPHIE: l atitude en degres [-90,90] (north>0) (geolat)24 // longitude en degres ]-180,180] (geolng)25 // (angle + vers l'ouest, - vers l'est)17 // HORIZONTAL: azimuth en degres [0,360[ (az) 18 // (angle round to the east from north+) 19 // altitude en degres [-90,90] (alt) 20 // ECLIPTIQUE: lontitude ecliptique en degres [0,360[ (eclng) 21 // (angle round counter clockwise from the vernal equinoxe) 22 // latitude ecliptique en degres [-90,90] (eclat) 23 // GEOGRAPHIE: longitude en degres ]-180,180] (geolng) 24 // (angle + vers l'ouest, - vers l'est) 25 // latitude en degres [-90,90] (north>0) (geolat) 26 26 27 27 double TrueJDfrMJD(double mjd) … … 309 309 PlanetPos(mjd,SATURN,ecl,ecb,diamang); 310 310 } 311 312 /* Given a coordinate type "typ", convert to standard for astropack */ 313 int CoordConvertToStd(TypAstroCoord typ,double& coord1,double& coord2) 314 // Return : 0 = OK 315 // 1 = Type de coordonnees non connu 316 // 2 = Mauvais range pour coord1 317 // 4 = Mauvais range pour coord2 318 // 6 = Mauvais range pour coord1 et coord2 319 { 320 int rc = 0; 321 322 // ---- Equatoriales alpha,delta 323 // - standard = [0,24[ , [-90,90] 324 if(typ&TypCoordEq) { 325 if(typ&TypCoordDD) { 326 coord1 = coord1 / 180. * 12.; 327 } else if(typ&TypCoordRR) { 328 coord1 = coord1 / PI * 12.; 329 coord2 = coord2 / PI * 180.; 330 } 331 if(coord1==24.) coord1 = 0.; 332 if(coord1<0. || coord1>=24.) rc+= 2; 333 if(coord2<-90. || coord2>90. ) rc+= 4; 334 335 // ---- Galactiques gLong, gLat 336 // ---- Horizontales azimuth,altitude 337 // ---- Ecliptiques EclLong,EclLat 338 // - standard = [0,360[ , [-90,90] 339 } else if( typ&TypCoordGal || typ&TypCoordHor || typ&TypCoordEcl) { 340 if(typ&TypCoordHD) { 341 coord1 = coord1 / 12. * 180.; 342 } else if(typ&TypCoordRR) { 343 coord1 = coord1 / PI * 180.; 344 coord2 = coord2 / PI * 180.; 345 } 346 if(coord1==360.) coord1 = 0.; 347 if(coord1<0. || coord1>=360.) rc+= 2; 348 if(coord2<-90. || coord2>90. ) rc+= 4; 349 350 } else { // Coordonnees non-connues 351 rc= 1; 352 } 353 354 return rc; 355 }
Note:
See TracChangeset
for help on using the changeset viewer.