/*************************************************************************************************************************************/
/*                                                                                                                                   */
/*        C O O R D O N N E E S   E T   V I T E S S E S   D E S   9   P L A N E T E S   D U   S Y S T E M E   S O L A I R E  :       */
/*                                                                                                                                   */
/*                                                                                                                                   */
/*        Author of '$xtc/S_solaire.01$c' :                                                                                          */
/*                                                                                                                                   */
/*                    Jean-Francois COLONNA (LACTAMME, AAAAMMJJhhmmss).                                                              */
/*                                                                                                                                   */
/*************************************************************************************************************************************/

#define   UA(valeur)                                                                                                                    \
                    (((double)(valeur))*14959787.0e4)                                                                                   \
                                        /* Conversion d'une distance exprimee en 'Unites Astronomiques' ('1' correspondant au        */ \
                                        /* rayon moyen de l'orbite terrestre) en unites 'MKSA'.                                      */
#define   JOUR(duree)                                                                                                                   \
                    (((double)(duree))*(24.0*60.0*60.0))                                                                                \
                                        /* Conversion d'une duree exprimee en jours en unites 'MKSA'.                                */

#define   COORDONNEE(coordonnee)                                                                                                        \
                    UA(coordonnee)                                                                                                      \
                                        /* Conversion d'une coordonnee exprimee en 'UA' en unites 'MKSA'.                            */
#define   VITESSE(vitesse)                                                                                                              \
                    (UA(vitesse)/JOUR(1))                                                                                               \
                                        /* Conversion d'une vitesse exprimee en 'UA/jour' en unites 'MKSA'.                          */

#define   EDITE(planete,x,y,z,vx,vy,vz)                                                                                                 \
                    {                                                                                                                   \
                    printf("\n%-27s : ",planete);                                                                                       \
                    printf("coordonnees={%+e,%+e,%+e}",COORDONNEE(x),COORDONNEE(y),COORDONNEE(z));                                      \
                    printf("   vitesse={%+e,%+e,%+e}",VITESSE(vx),VITESSE(vy),VITESSE(vz));                                             \
                    }                                                                                                                   \
                                        /* Edition des coordonnees et de la vitesse d'une planete converties en unites 'MKSA'.       */

main()
          {
          EDITE("Mercure"
               ,+00.343926450169642000,+00.045615479953313500,-00.010924037211932500
               ,-00.008466532045009860,+00.025614605307281800,+00.014586845336239600
                );
          EDITE("Venus"
               ,+00.142965184343246000,+00.647005066033887000,+00.282482400660380000
               ,-00.019893812279342500,+00.003113119466118590,+00.002659445805745800
                );
          EDITE("Barycentre(Terre,Lune)"
               ,-00.136364695954795000,+00.893397922857000000,+00.387458344639337000
               ,-00.017319998848529600,-00.002244304731767560,-00.000973361115758044
                );
          EDITE("Mars"
               ,-01.369833976183420000,+00.843135248017904000,+00.423832906611430000
               ,-00.007384563831271170,-00.009477358639274200,-00.004151655136662130
                );
          EDITE("Jupiter"
               ,+03.349364223696010000,-03.473761449012580000,-01.572149686393800000
               ,+00.005585643149582310,+00.004962261137222510,+00.001992276926739370
                );
          EDITE("Saturne"
               ,-08.972505068282110000,+02.279682008132860000,+01.330338609711460000
               ,-00.001858251956996710,-00.004983858581417440,-00.001980257412807250
                );
          EDITE("Uranus"
               ,-01.003003995327320000,+17.323508473271800000,+07.604825046415910000
               ,-00.003955254163017720,-00.000375913785112941,-00.000108849991287794
                );
          EDITE("Neptune"
               ,-29.194580738611200000,-07.719285191998470000,-02.427245378288770000
               ,+00.000820748057818085,-00.002772098259580230,-00.001156116030435920
                );
          EDITE("Pluton"
               ,-26.233650782015500000,+20.561975420055900000,+14.444557127780700000
               ,-00.001315888698281160,-00.002620128205493520,-00.000427083355026298
                );

          printf("\n");
          }



Copyright © Jean-François COLONNA, 2021-2024.
Copyright © CMAP (Centre de Mathématiques APpliquées) UMR CNRS 7641 / École polytechnique, Institut Polytechnique de Paris, 2021-2024.