how to convert heliocentric Lat/heliocetric long values to planetocentric solar coor

ncc1701d

Member
Joined
Aug 9, 2009
Messages
204
Reaction score
6
Points
18
Does anyone know the way to convert heliocentric Latitide and heliocentric longitude like those outputed from vsop87 for any particular planet into planetocentric solar coordinates?
I was hoping to find the math formulas for doing that with various planets.
Any assistance would be helpful.
 

perseus

Addon Developer
Addon Developer
Joined
May 31, 2008
Messages
316
Reaction score
1
Points
18
Program in GWBASIC
10 CLS:KEY OFF:GOSUB 760:GOSUB 860
20 PRINT "Longitud 6.5 - Latitud 37":pRINT
30 IF N2=0 THEN INPUT"Longitud este (grados)";LONG:RLONG=LONG*PI/180
40 IF N2=0 THEN INPUT"Latitud Norte(grados)";LAT:RLAT=LAT*PI/180
50 IF N1=0 THEN INPUT"Fecha";F$:Q3=LEN(F$)
60 G$="-":Q1=INSTR(1,F$,G$):IF Q1>0 THEN D$=LEFT$(F$,Q1-1):Q2=INSTR(Q1+1,F$,G$):D=VAL(D$) ELSE GOTO 240
70 M$=MID$(F$,Q1+1,N2+Q1-1):M=VAL(M$):A$=RIGHT$(F$,Q3-Q2):A=VAL(A$)
80 IF D<1 OR D>31 OR M<1 OR M>12 OR A$>"9999999999" THEN LOCATE 6,35 :pRINT " ":GOTO 50
90 CLS
100 GOSUB 490:GOSUB 540:GOSUB 600
110 LOCATE 2,1:pRINT USING"&+###.#&";"Longitud (Este)=";LONG;"Grados"
120 LOCATE 3,1:pRINT USING"&+###.#&";"Latitud (Norte)=";LAT;"Grados"
130 LOCATE 4,1:pRINT ;"Fecha:";D;"-";M;"-";A
140 LOCATE 9,1:pRINT " POSICION TIEMPO UNIVERSAL"
150 LOCATE 10,1:pRINT " A. R. DEC SALIDA PUESTA"
160 FOR IP=0 TO 7
170 IF IP=0 THEN GOSUB 330 ELSE GOSUB 380
180 LOCATE 12+IP,1:pRINT NOM$(IP)
190 GOSUB 440
200 ANG=AR*12/PI:GOSUB 800:LOCATE 12+IP,10:pRINT USING"##!##!";GG;"h";MM;"m "
210 ANG=DEC*180/PI:GOSUB 800:LOCATE 12+IP,19:pRINT USING"!##!##!";S$;GG;"o";MM;"'"
220 GOSUB 660:IF SALPOS=0 THEN PRINT:GOTO 250
230 ANG=TSOR*12/PI:GOSUB 800:LOCATE 12+IP,30:pRINT USING"##!##!";GG;"h";MM;"m "
240 ANG=TPOS*12/PI:GOSUB 800:LOCATE 12+IP,39:pRINT USING"##!##!";GG;"h";MM;"m"
250 NEXT IP
260 PRINT :INPUT "Otra fecha S/N";N$
270 IF N$="" OR N$="s" OR N$="S" THEN N1=0 ELSE N1=1
280 INPUT "Otras Coordenadas (S/N)";N$
290 IF N$="" OR N$="S" OR N$="s" THEN N2=0 ELSE N2=1
300 IF N1*N2=1 THEN END
310 GOTO 30
320 STOP
330 REM"Sol"
340 LSOL=PI2*(DD+.5)/365.2422+4.866563
350 SINL=SIN(LSOL):COSL=COS(LSOL)
360 L=LSOL+2*.016718*SIN(LSOL-4.932238)
370 RETURN
380 REM"Planetas"
390 LP=PI2*DD/(365.2422*E(IP,1))+E(IP,2)
400 SLP=E(IP,3)*SIN(LP)+SINL
410 CLP=E(IP,3)*COS(LP)+COSL
420 L=FNA(SLP,CLP)
430 RETURN
440 REM"Coordenadas Ecuatoriales
450 SL=SIN(L)
460 AR=FNA(SL*.9175234,COS(L))
470 S=SL*.3976818:DEC=ATN(S/SQR(1-S*S))
480 RETURN
490 REM"Dia del a¤o"
500 BIS=0:IF 4*INT(A/4) = A THEN BIS=1
510 IF M>2 THEN 530
520 DIANY=INT(((M-1)*(62+BIS))/2)+D:RETURN
530 DIANY=INT((M+1)*30.6)-63+BIS+D:RETURN
540 REM"Dias desde 1980"
550 NA=A-1980:IF NA<0 THEN GOTO 580
560 N4=-INT(NA/4):NR=NA-4*N4
570 DD=N4*(4*365+1)+365*NR-(NR>0)+DIANY:RETURN
580 N4=-INT(NA/4):NR=NA-4*N4
590 DD=N4*(4*365+1)+365*NR+DIANY:RETURN
600 REM"tiempo sid‚reo local 0 h TU"
610 TSL=.01720279299#*DD
620 IF TSL>PI2 THEN TSL=TSL-PI2:GOTO 620
630 IF TSL<0 THEN TSL=TSL+PI2:GOTO 630
640 TSL=TSL-4.558313+RLONG
650 RETURN
660 REM" Hora de Salida y Puesta"
670 COSH=-TAN(DEC)*TAN(RLAT)
680 SALPOS =1: IF ABS(COSH)>1 THEN SALPOS=0:RETURN
690 H=FNA(SQR(1-COSH*COSH),COSH):HP=H:HS=-HP
700 TSOR=(HS+AR-TSL)/1.002738:TPOS=(HP+AR-TSL)/1.002738
710 IF TSOR>=PI2 THEN TSOR=TSOR-PI2:GOTO 710
720 IF TSOR<0 THEN TSOR=TSOR+PI2:GOTO 720
730 IF TPOS>=0 THEN TPOS=TPOS-PI2:GOTO 730
740 IF TPOS<0 THEN TPOS=TPOS+PI2:GOTO 740
750 RETURN
760 REM"INICIALIZACION"
770 PI=3.141593#:pI2=2*PI
780 DEF FNA(S,C)=ATN(S/C)-PI*(C<0)-PI2*(C>=0 AND S<0)
790 RETURN
800 REM"Grados fraccion a grados y minutos"
810 PANG=ABS(ANG)
820 GG=INT(PANG):MM=INT(60*(PANG-GG)+.5)
830 IF MM=60 THEN MM=0:GG=GG+1
840 S$="+":IF ANG<0 THEN S$="-"
850 RETURN
860 REM"Elementos orbitales de los planetas para 1980,0"
870 DIM E(7,3),NOM$(7):NOM$(0)="Sol "
880 FOR I=1 TO 7:READ NOM$(I):FOR J=1 TO 3:READ E(I,J):NEXT J:NEXT I
890 REM"Periodo, Longitud Epoca,Distancia media"
900 DATA "Mercurio",0.24085,4.036899,0.3870986
910 DATA "Venus ",0.61521,6.208721,0.7233316
920 DATA "Marte ",1.88089,2.204488,1.5236883
930 DATA "Ceres ",4.669445,0.7108979,2.76
940 DATA "Jupiter ",11.86224,2.565047,5.202561
950 DATA "Saturno ",29.45771,2.850511,9.554747
960 DATA "Urano ",84.01247,3.980587,19.21814
970 RETURN

PC-BASIC is a free, cross-platform interpreter for GW-BASIC, BASICA, PCjr Cartridge Basic and Tandy 1000 GWBASIC. PC-BASIC is free and open source software released under the GPLv3.
 
Last edited:

perseus

Addon Developer
Addon Developer
Joined
May 31, 2008
Messages
316
Reaction score
1
Points
18
To determine the position of a planet, comet, spacecraft ... is required:

     1. Set the plane of the orbit compared to the ecliptic and orient that orbit within its orbital plane; that is to say:

                     Inclination = i
                     Node length ascending = n
                     Perihelion argument = 
  
  
2. The size and shape of the orbit:

                     Semimajor axis a = a
                     Eccentricity = e

 These data have some variations due to the movement of Precession of the equinoxes and nutation

                       

3. Place the star on the orbit at a certain moment; This position is determined by the True Anomaly Radio Av and vector r, which are the elliptic coordinate system of the star.

    To calculate these positions data are needed:

                  Time of perihelion passage = t0
                  v = average speed (either in ° / day well in rad / day ...)
                           or their average period (in ua and T in years)

   Other data path or ellipse are usually:

          Sol-Astro maximum distance (aphelion) Q = a. (1 + e)
                                      
         Sol-Astro minimum distance (perihelion) q = a. (1-e)
                                     

The average Anomaly "Am" is defined as the arc that describe the star at time t from t0, if it moved along a circular path radio "to" half speed "v" uniform.

                                   Am = v. (T T0)

From this mean anomaly Eccentric Anomaly Ae is calculated by Kepler's equation:

                                  Ae = Am + e. Sen (Ae)

         in elliptical paths it is solved by successive approximations.

And the eccentric anomaly known, elliptical coordinates are calculated: Av True Anomaly and the radius vector r by the equations:
                        


     4. Convert the elliptic coordinate system in heliocentric coordinates and later in Geocentric.

First the heliocentric Ecliptic coordinates (Xe, Ye, Ze) that are referred to the plane of the ecliptic and the Sun center are obtained:

                 Xe = r. (Cos (n) .Cos ( + Av) - Cos (i) .Sen (n) .Sen ( + Av))
                 Ye = r. (Sen (n) .Cos ( + Av) + Cos (i) .Cos (n) .Sen ( + Av))
                 Ze = r. Sen (i) .Sen ( + Av)

       From here, you can pass heliocentric spherical coordinates (longitude, latitude and radius)
     
DISTURBED TO THE PLANETS (Jupiter, Saturn and Uranus) have to correct these heliocentric ecliptic coordinates (See endnote)
 
These become Equator heliocentric (by rotating the axes an angle -  around the equinoxes line) to turn to Ecuador (angle of the ecliptic and celestial Ecuador):

                Xh = Xe
                H = Ye. Cos () - Ze. Sen ()
                 Zh = Ye. Sen () + Ze. Cos ()

By a translation to the origin of the Earth, become Geocentric Equatorial (center on Earth):

                 Xg = Hh + Xsol
                 G = Yh + Ysol
                 Zg = Zh + zSOL

                          Where (Xsol, Ysol, zSOL) are the heliocentric coordinates of the Earth and changed sign

And finally the Polar Geocentric:

                                  
        which give the right ascension, declination and distance Planet Earth
These coordinates are the same for any observer on Earth at all times as they are referred to the center of it.

Obviously from them will have to determine the coordinates of observation by location, ie the topocentric coordinates (only for the Moon and artificial satellites near Earth give some important changes
 

Attachments

  • cordenadastierra.jpg
    cordenadastierra.jpg
    67.4 KB · Views: 14
Top