1 | subroutine orbite(pls,pdist_star,pdecli,pright_ascenc) |
---|
2 | |
---|
3 | use planete_mod, only: p_elips, e_elips, timeperi, obliquit |
---|
4 | use comcstfi_mod, only: pi |
---|
5 | implicit none |
---|
6 | !================================================================== |
---|
7 | ! |
---|
8 | ! Purpose |
---|
9 | ! ------- |
---|
10 | ! Distance from star and declination as a function of the stellar |
---|
11 | ! longitude Ls |
---|
12 | ! |
---|
13 | ! Inputs |
---|
14 | ! ------ |
---|
15 | ! pls Ls |
---|
16 | ! |
---|
17 | ! Outputs |
---|
18 | ! ------- |
---|
19 | ! pdist_star Distance Star-Planet in UA |
---|
20 | ! pdecli declinaison ( in radians ) |
---|
21 | ! pright_ascenc right ascension ( in radians ) |
---|
22 | ! |
---|
23 | !======================================================================= |
---|
24 | |
---|
25 | c Declarations: |
---|
26 | c ------------- |
---|
27 | |
---|
28 | c arguments: |
---|
29 | c ---------- |
---|
30 | |
---|
31 | REAL pday,pdist_star,pdecli,pright_ascenc,pls,i |
---|
32 | |
---|
33 | c----------------------------------------------------------------------- |
---|
34 | |
---|
35 | c Star-Planet Distance |
---|
36 | |
---|
37 | pdist_star = p_elips/(1.+e_elips*cos(pls+timeperi)) |
---|
38 | |
---|
39 | c Stellar declination |
---|
40 | |
---|
41 | c ********************* version before 01/01/2000 ******* |
---|
42 | |
---|
43 | pdecli = asin (sin(pls)*sin(obliquit*pi/180.)) |
---|
44 | |
---|
45 | c********************* version after 01/01/2000 ******* |
---|
46 | c i=obliquit*pi/180. |
---|
47 | c pdecli=asin(sin(pls)*sin(i)/sqrt(sin(pls)**2+ |
---|
48 | c & cos(pls)**2*cos(i)**2)) |
---|
49 | c ****************************************************** |
---|
50 | |
---|
51 | c right ascencion |
---|
52 | If((pls.lt.pi/2.d0)) then |
---|
53 | pright_ascenc= atan(tan(pls)*cos(obliquit*pi/180.)) |
---|
54 | else if((pls.gt.pi/2.d0).and.(pls.lt.3.d0*pi/2.d0)) then |
---|
55 | pright_ascenc= pi+atan(tan(pls)*cos(obliquit*pi/180.)) |
---|
56 | else if((pls.gt.3.d0*pi/2.d0)) then |
---|
57 | pright_ascenc= 2.d0*pi+atan(tan(pls)*cos(obliquit*pi/180.)) |
---|
58 | else if (Abs(pls-pi/2.d0).le.1.d-10) then |
---|
59 | pright_ascenc= pi/2.d0 |
---|
60 | else |
---|
61 | pright_ascenc=-pi/2.d0 |
---|
62 | end if |
---|
63 | |
---|
64 | RETURN |
---|
65 | END |
---|