2011/09/06

Programa en Basic. Cuspides, Ascendente y Medio Cielo


   'casa10.bas  

'     Hora Sid   Casa X   CASAXI     CASA XII   Casa I     CASA II    CASA III
data "00:00:00"," 0( 1)"," 8.6( 2)","22.0( 3)","26( 4)10","12.4( 5)"," 2.4( 6)"
data "00:03:40"," 1( 1)"," 9.6( 2)","22.9( 3)","26( 4)51","13.1( 5)"," 3.4( 6)"
data "02:03:08"," 3( 2)","12.4( 3)","19.2( 4)","18( 5)12"," 6.6( 6)"," 0.7( 7)"
data "04:16:27"," 6( 3)","13.4( 4)","15.6( 5)","11( 6)39"," 3.3( 7)"," 1.3( 8)"
data "05:55:38","29( 3)"," 5.0( 5)"," 5.1( 6)","29( 6)13","23.9( 7)","23.2( 8)"
data "06:00:00"," 0( 4)"," 5.9( 5)"," 6.0( 6)"," 0( 7)00","24.0( 7)","24.1( 8)"
data "06:04:22"," 1( 4)"," 6.8( 5)"," 6.9( 6)"," 0( 7)47","24.9( 7)","25.0( 8)"
data "08:12:54"," 1( 5)"," 5.4( 6)"," 2.6( 7)","23( 7)31","20.1( 8)","23.2( 9)"
data "10:23:35"," 4( 6)"," 5.4( 7)","28.6( 7)","16( 8)30","16.3( 9)","24.4(10)"
data "11:56:20","29( 6)","26.8( 7)","16.9( 8)"," 3( 9)09"," 7.1(10)","20.4(11)"
data "12:00:00"," 0( 7)","27.6( 7)","17.6( 8)"," 3( 9)50"," 8.0(10)","21.4(11)"
data "12:03:40"," 1( 7)","28.3( 7)","18.3( 8)"," 4( 9)30"," 8.9(10)","22.6(11)"
data "14:30:21","10( 8)"," 0.7( 9)","17.7( 9)"," 4(10)55","23.6(11)","10.0( 1)"
data "16:46:16","13( 9)"," 0.7(10)","12.9(10)","20(11)09","19.4( 1)","22.0( 2)"
data "17:55:38","29( 9)","17.2(10)","11.2(11)","27(12)27","15.8( 2)","10.5( 3)"
data "18:00:00"," 0(10)","18.3(10)","12.7(11)"," 0( 1)00","17.3( 2)","11.7( 3)"
data "18:04:22"," 1(10)","19.5(10)","14.2(11)"," 2( 1)33","18.8( 2)","12.8( 3)"
data "20:41:41"," 8(11)"," 4.4(12)","17.5( 1)","12( 3)18"," 1.8( 4)","19.0( 4)"
data "22:49:53","11(12)","16.4( 1)"," 3.1( 3)","12( 4)43","28.7( 4)","16.8( 5)"
data "23:56:20","29(12)"," 7.4( 2)","21.1( 3)","25( 4)30","11.7( 5)"," 1.7( 6)"
data "24:00:00"," 0( 1)"," 8.6( 2)","22.0( 3)","26( 4)10","12.4( 5)"," 2.4( 6)"
'..................
for nn=1 to 21:read hs$,h10$,h11$,h12$,h1$,h2$,h3$: next
la$="51N00"
'..................
cls

e$="23:27:15"
pi#=4*atn(1)
ra#=2*pi#/360
'......................
hs#=val(left$(hs$,2))+val(mid$(hs$,4,2))/60+val(right$(hs$,2))/3600
if hs#=24 then hs#=0
la=val(left$(la$,2))+val(right$(la$,2))/60
la.c=la-11/60-29/(60*60)   'correccion de la latitud geografica

e#=val(left$(e$,2))+val(mid$(e$,4,2))/60+val(right$(e$,2))/3600

' ................

'Ascension Recta del Medio Cielo
armc=hs#*360/24

'Longitud del Medio Cielo
MC=atn(tan((armc)*ra#)/cos(e#*ra#))/ra#

    if MC<0    then MC=MC+360
                    MC=MC+180
    if MC>=360 then MC=MC-360

    if hs#>=0 and hs#=<6  then MC=MC-180
    if hs#>18 and hs#=<24 then MC=MC+180
'................
' polos
senx#=tan(e#*ra#)*tan(la.c*ra#)
tanx#=senx#/sqr(1-senx#^2)
ax#=atn(tanx#)  ' ax en radianes
if ax#<0 then ax#=ax#+2*pi#

for n=1 to 5

  if n=1 then casa$="Casa XI" :h$(n)=h11$
  if n=2 then casa$="Casa XII":h$(n)=h12$
  if n=3 then casa$="Casa I"  :h$(n)=h1$
  if n=4 then casa$="Casa II" :h$(n)=h2$
  if n=5 then casa$="Casa III":h$(n)=h3$
  a=0
  t=n*30

  a=armc+t  'Ascension Oblicua de la cuspide

  if n=1 or n=5 then tanpolo#=sin(ax#/3)/tan(e#*ra#)   ' casas XI  y III
  if n=3        then tanpolo#=tan(la*ra#)              ' casa  I
  if n=2 or n=4 then tanpolo#=sin(2*ax#/3)/tan(e#*ra#) ' casas XII y II

  if            a= 90 then a= 90.0010
  if hs#=12 and a=270 then a=270.0026
  if            a=270 then a=270.0001
  if a>=360 then a=a-360

  'Longitud de la cuspide
  AA#= (atn(tanpolo#/cos(a*ra#)))/ra#
  cus(n)= (atn(tan(a*ra#)*cos(AA#*ra#)/cos((AA#+e#)*ra#)))/ra#

  cus(1)=cus(1)-180
  cus(2)=cus(2)-180

    if cus(n)<0 and hs#>12 then cus(n)=cus(n)+180

    do
    if cus(n)<0            then cus(n)=cus(n)+360 else exit loop
    loop
'    print n;"cus ";cus(n)

  if           hs#=<6  and cus(1)> 90 and cus(1)<180 then cus(1)=cus(1)+180
  if           hs#=<6  and cus(2)> 90 and cus(2)<180 then cus(2)=cus(2)+180
  if hs#>6 and hs#=<12 and cus(1)>180 and cus(1)<270 then cus(1)=cus(1)+180
  if hs#>6 and hs#=<12 and cus(2)>180 and cus(2)<270 then cus(2)=cus(2)+180
  if hs#>6 and hs#=<12 and cus(4)>270 and cus(4)<360 then cus(4)=cus(4)+180
  if hs#>6 and hs#=<12 and cus(5)>270 and cus(5)<360 then cus(5)=cus(5)+180
  if hs#>12 and hs#<18 and cus(1)>270 and cus(1)<360 then cus(1)=cus(1)+180
  if hs#>12 and hs#<18 and cus(2)>270 and cus(2)<360 then cus(2)=cus(2)+180
  if hs#>12 and hs#<18 and cus(4)>  0 and cus(4)< 90 then cus(4)=cus(4)+180
  if hs#>12 and hs#<18 and cus(5)>  0 and cus(5)< 90 then cus(5)=cus(5)+180
  if hs#>=18           and cus(1)>270 and cus(1)<360 then cus(1)=cus(1)+180
  if hs#>=18           and cus(2)>270 and cus(2)<360 then cus(2)=cus(2)+180
  if hs#>18            and cus(1)>0   and cus(1)< 90 then cus(1)=cus(1)+180
  if hs#>18            and cus(2)>0   and cus(2)< 90 then cus(2)=cus(2)+180
  if hs#>=18           and cus(4)>0   and cus(4)< 90 then cus(4)=cus(4)+180
  if hs#>=18           and cus(5)>0   and cus(5)< 90 then cus(5)=cus(5)+180
  if hs#>18            and cus(4)>90  and cus(4)<180 then cus(4)=cus(4)+180
  if hs#>18            and cus(5)>90  and cus(5)<180 then cus(5)=cus(5)+180
'  print n;"cus  ";cus(n)


                                cus(n)=cus(n)+180
    if cus(n)>=360         then cus(n)=cus(n)-360
    if hs#>=18 then cus(3)=cus(3)-180

  call trans(cus(n),cus$(n))
  call trans(MC,MC$)

  '..................
  d$= "\           \ ###,.##  \          \\          \"
  if n=1 then print "latitud: ";la$;"  hora sideral:  ";hs$
  if n=1 then print "----------------------------------------------"
  if n=1 then print using d$;"Medio Cielo ";MC;MC$;h10$
              print using d$;casa$ ;cus(n);cus$(n);h$(n)
  if n=5 then print ".............................................."
next
'next
end
'..................

sub s: while inkey$="":wend: end sub
'..................
sub trans(x,x$)
   s=int(x/30)+1
  ga=x-(s-1)*30:g=int(ga)
                m=cint((ga-g)*60)
  if m=60 then  m=0:g=g+1
  if g=30 then  g=0:s=s+1
  if s=13 then  s=1
  x$=str$(g)+"("+str$(s)+")"+str$(m)
end sub

Determinacion del Medio Cielo y Ascendente


'casa9.bas

for n=1 to 21:read hs$,h11$,h12$,hs1$,hs2$,hs3$:next

'     Hora Sid   Casa X   Casa I     CASAXI     CASA XII   CASA II    CASA III
data "00:00:00"," 0( 1)","26( 4)10"," 8.6( 2)","22.0( 3)","12.4( 5)"," 2.4( 5)"
data "00:03:40"," 1( 1)","26( 4)51"," 9.6( 2)","22.9( 3)","13.1( 5)"," 3.4( 6)"
data "02:03:08"," 3( 2)","18( 5)12","12.4( 3)","19.2( 4)"," 6.6( 6)"," 0.7( 7)"
data "04:16:27"," 6( 3)","11( 6)39","13.1( 3)","15.2( 5)"," 3.3( 7)"," 1.4( 8)"
data "05:55:38","29( 3)","29( 6)13"," 5.0( 5)"," 5.1( 6)","23.9( 7)","23.2( 8)"
data "06:00:00"," 0( 4)"," 0( 7)00"," 5.9( 5)"," 6.0( 7)","24.0( 7)","24.1( 8)"
data "06:04:22"," 1( 4)"," 0( 7)47"," 6.8( 5)"," 6.9( 6)","24.9( 7)","25.0( 8)"
data "08:12:54"," 1( 5)","23( 7)31"," 5.4( 6)"," 2.6( 7)","20.1( 8)","23.2( 9)"
data "10:23:35"," 4( 6)","16( 8)30"," 5.4( 7)","28.6( 7)","16.3( 9)","24.4(10)"
data "11:56:20","29( 6)"," 3( 9)09","26.8( 7)","16.9( 8)"," 7.1(10)","20.4(11)"
data "12:00:00"," 0( 7)"," 3( 9)50","27.6( 7)","17.6( 8)"," 8.0(10)","21.4(11)"
data "12:03:40"," 1( 7)"," 4( 9)30","28.3( 7)","18.3( 8)"," 8.9(10)","22.6(11)"
data "14:30:21","10( 8)"," 4(10)55"," 0.7( 9)","17.7( 9)","23.6(10)","10.0( 1)"
data "16:46:16","13( 9)","20(11)09"," 0.7(10)","12.9(10)","19.4( 1)","22.0( 2)"
data "17:55:38","29( 9)","27(12)27","17.2(10)","11.2(11)","15.8( 2)","10.5( 3)"
data "18:00:00"," 0(10)"," 0( 1)00","18.3(10)","12.7(11)","17.3( 2)","11.7( 3)"
data "18:04:22"," 1(10)"," 2( 1)33","19.5(10)","14.2(11)","18.8( 2)","12.8( 3)"
data "20:41:41"," 8(11)","12( 3)18"," 4.4(12)","17.5( 1)"," 1.8( 3)","19.0( 3)"
data "22:49:53","11(12)","12( 4)43","16.4( 1)"," 3.1( 3)","28.7( 4)","16.8( 5)"
data "23:56:20","29(12)","25( 4)30"," 7.4( 2)","21.1( 3)","11.7( 5)"," 1.7( 6)"
data "24:00:00"," 0( 1)","26( 4)10"," 8.6( 2)","22.0( 3)","12.4( 5)"," 2.4( 6)"
la$="51N00"
'..................
cls
e$="23:28:00"
pi#=4*atn(1)
ra#=2*pi#/360
'......................
hs=val(left$(hs$,2))+val(mid$(hs$,4,2))/60+val(right$(hs$,2))/3600
if hs=24 then hs=0
la=val(left$(la$,2))+val(right$(la$,2))/60
e#=val(left$(e$,2))+val(mid$(e$,4,2))/60+val(right$(e$,2))/3600
' ................

armc=hs*360/24    'Ascension Recta del Medio Cielo
MC=atn(tan((armc)*ra#)/cos(e#*ra#))/ra# 'Longitud del Medio Cielo

    if MC<0    then MC=MC+360
                    MC=MC+180
    if MC>=360 then MC=MC-360

    if hs>=0 and hs=<6  then MC=MC-180
    if hs>18 and hs=<24 then MC=MC+180
'................

'a=armc+90  'Ascension Oblicua del Ascendente
a=armc+120

if           a= 90 then a= 90.0010
if hs=12 and a=270 then a=270.0026
if           a=270 then a=270.0001
if a>=360 then a=a-360

AA= (atn((tan(la*ra#))/cos(a*ra#)))/ra#
H1= (atn(tan(a*ra#)*cos(AA*ra#)/cos((AA+e#)*ra#)))/ra# 'Longitud del Ascendente

    if H1<0 and hs>12 then H1=H1+180
    if H1<0    then H1=H1+360
                    H1=H1+180
    if H1>=360 then H1=H1-360

    if hs>=18 then H1=H1-180


senx=tan(e#*ra#)*tan(la*ra#)
cosx=sqr(1-senx^2)
tanx=senx/cosx
x=atn(tanx)  ' x en radianes
tanpolo11=sin(2*x/3)*(1/tan(e#*ra#))

AA= (atn(tanpolo11/cos(a*ra#)))/ra#
H11= (atn(tan(a*ra#)*cos(AA*ra#)/cos((AA+e#)*ra#)))/ra# 'Longitud de la casa 11
if H11<0 then H11=H11+360
print "H11";H11

'..................
call trans(H1,H1$)
call trans(MC,MC$)
print "latitud: ";la$;"  hora sideral:  ";hs$
d$= "\           \ ###,.##  \          \   \          \"
print using d$;"Medio Cielo ";MC;MC$;h10$
print using d$;"Ascendente  ";H1;H1$;h1$
end
'..................
sub s: while inkey$="":wend: end sub
'..................
sub trans(x,x$)
   s=int(x/30)+1
  ga=x-(s-1)*30:g=int(ga)
                m=cint((ga-g)*60)
  if m=60 then  m=0:g=g+1
  if g=30 then  g=0:s=s+1
  if s=13 then  s=1
  x$=str$(g)+"("+str$(s)+")"+str$(m)
end sub

2011/09/05

Determinacion de cuspides. Sistema de Placidus


'placidus.bas  

'     Hora Sid   Casa X   CASAXI     CASA XII   Casa I     CASA II    CASA III
data "00:00:00"," 0( 1)"," 8.6( 2)","22.0( 3)","26( 4)10","12.4( 5)"," 2.4( 6)"
data "00:03:40"," 1( 1)"," 9.6( 2)","22.9( 3)","26( 4)51","13.1( 5)"," 3.4( 6)"
data "02:03:08"," 3( 2)","12.4( 3)","19.2( 4)","18( 5)12"," 6.6( 6)"," 0.7( 7)"
data "04:16:27"," 6( 3)","13.4( 4)","15.6( 5)","11( 6)39"," 3.3( 7)"," 1.3( 8)"
data "05:55:38","29( 3)"," 5.0( 5)"," 5.1( 6)","29( 6)13","23.9( 7)","23.2( 8)"
data "06:00:00"," 0( 4)"," 5.9( 5)"," 6.0( 6)"," 0( 7)00","24.0( 7)","24.1( 8)"
data "06:04:22"," 1( 4)"," 6.8( 5)"," 6.9( 6)"," 0( 7)47","24.9( 7)","25.0( 8)"
data "08:12:54"," 1( 5)"," 5.4( 6)"," 2.6( 7)","23( 7)31","20.1( 8)","23.2( 9)"
data "10:23:35"," 4( 6)"," 5.4( 7)","28.6( 7)","16( 8)30","16.3( 9)","24.4(10)"
data "11:56:20","29( 6)","26.8( 7)","16.9( 8)"," 3( 9)09"," 7.1(10)","20.4(11)"
data "12:00:00"," 0( 7)","27.6( 7)","17.6( 8)"," 3( 9)50"," 8.0(10)","21.4(11)"
data "12:03:40"," 1( 7)","28.3( 7)","18.3( 8)"," 4( 9)30"," 8.9(10)","22.6(11)"
data "14:30:21","10( 8)"," 0.7( 9)","17.7( 9)"," 4(10)55","23.6(11)","10.0( 1)"
data "16:46:16","13( 9)"," 0.7(10)","12.9(10)","20(11)09","19.4( 1)","22.0( 2)"
data "17:55:38","29( 9)","17.2(10)","11.2(11)","27(12)27","15.8( 2)","10.5( 3)"
data "18:00:00"," 0(10)","18.3(10)","12.7(11)"," 0( 1)00","17.3( 2)","11.7( 3)"
data "18:04:22"," 1(10)","19.5(10)","14.2(11)"," 2( 1)33","18.8( 2)","12.8( 3)"
data "20:41:41"," 8(11)"," 4.4(12)","17.5( 1)","12( 3)18"," 1.8( 4)","19.0( 4)"
data "22:49:53","11(12)","16.4( 1)"," 3.1( 3)","12( 4)43","28.7( 4)","16.8( 5)"
data "23:56:20","29(12)"," 7.4( 2)","21.1( 3)","25( 4)30","11.7( 5)"," 1.7( 6)"
data "24:00:00"," 0( 1)"," 8.6( 2)","22.0( 3)","26( 4)10","12.4( 5)"," 2.4( 6)"
'..................
for nn=1 to 2:read hs$,h10$,h11$,h12$,h1$,h2$,h3$: next
la$="51N00"
'..................
cls

e$="23:27:15"
pi#=4*atn(1)
ra#=2*pi#/360
'......................
hs#=val(left$(hs$,2))+val(mid$(hs$,4,2))/60+val(right$(hs$,2))/3600
if hs#=24 then hs#=0
la=val(left$(la$,2))+val(right$(la$,2))/60
la.c=la-11/60-29/(60*60)   'correccion de la latitud geografica

e#=val(left$(e$,2))+val(mid$(e$,4,2))/60+val(right$(e$,2))/3600

' ................

'Ascension Recta del Medio Cielo
armc=hs#*360/24

'Longitud del Medio Cielo
MC=atn(tan((armc)*ra#)/cos(e#*ra#))/ra#

    if MC<0    then MC=MC+360
                    MC=MC+180
    if MC>=360 then MC=MC-360

    if hs#>=0 and hs#=<6  then MC=MC-180
    if hs#>18 and hs#=<24 then MC=MC+180
'................

for n=1 to 2
  if n=1 then casa$="Casa XI" :h$(n)=h11$
  if n=2 then casa$="Casa XII":h$(n)=h12$
'  if n=3 then casa$="Casa I"  :h$(n)=h1$
'  if n=4 then casa$="Casa II" :h$(n)=h2$
'  if n=5 then casa$="Casa III":h$(n)=h3$

  ra1=armc+30*n
  ra2=ra1
  f=3/n
'  do
for kk=1 to 20
print "ra1  ";ra1
'    if  abs(ra2-ra3)<0.01 then exit loop
    print abs(ra2-ra3)
    ra3=ra1
    cose=-sin(ra1*ra#)*tan(e#*ra#)*tan(la*ra#)

    seno=sqr(1-cose^2)
    tang=seno/cose
    deno=(atn(tang))/ra#
    ra2=armc+deno/f
if ra2<0 then ra2=ra2+360
    ra1=ra2
'  loop
print "ra1  ";ra1
call s
next kk
print "ra2  ";ra2
  cus(n)=(atn(tan(ra2*ra#)/cos(e#*ra#)))/ra#
  call trans(cus(n),cus$(n))
  call trans(MC,MC$)

'..................
  d$= "\           \ ###,.##  \          \\          \"
  if n=1 then print "latitud: ";la$;"  hora sideral:  ";hs$
  if n=1 then print "----------------------------------------------"
  if n=1 then print using d$;"Medio Cielo ";MC;MC$;h10$
              print using d$;casa$ ;cus(n);cus$(n);h$(n)
  if n=5 then print ".............................................."
next

end
'''..................

sub s: while inkey$="":wend: end sub
'..................
sub trans(x,x$)
   s=int(x/30)+1
  ga=x-(s-1)*30:g=int(ga)
                m=cint((ga-g)*60)
  if m=60 then  m=0:g=g+1
  if g=30 then  g=0:s=s+1
  if s=13 then  s=1
  x$=str$(g)+"("+str$(s)+")"+str$(m)
end sub

2011/09/04

Programa en Basic para calculo de cuspides mediante interpolacion (Version 2)


 'casa9.bas  


for n=1 to 21:read hs$,h11$,h12$,hs1$,hs2$,hs3$:next


'     Hora Sid   Casa X   Casa I     CASAXI     CASA XII   CASA II    CASA III
data "00:00:00"," 0( 1)","26( 4)10"," 8.6( 2)","22.0( 3)","12.4( 5)"," 2.4( 5)"
data "00:03:40"," 1( 1)","26( 4)51"," 9.6( 2)","22.9( 3)","13.1( 5)"," 3.4( 6)"
data "02:03:08"," 3( 2)","18( 5)12","12.4( 3)","19.2( 4)"," 6.6( 6)"," 0.7( 7)"
data "04:16:27"," 6( 3)","11( 6)39","13.1( 3)","15.2( 5)"," 3.3( 7)"," 1.4( 8)"
data "05:55:38","29( 3)","29( 6)13"," 5.0( 5)"," 5.1( 6)","23.9( 7)","23.2( 8)"
data "06:00:00"," 0( 4)"," 0( 7)00"," 5.9( 5)"," 6.0( 7)","24.0( 7)","24.1( 8)"
data "06:04:22"," 1( 4)"," 0( 7)47"," 6.8( 5)"," 6.9( 6)","24.9( 7)","25.0( 8)"
data "08:12:54"," 1( 5)","23( 7)31"," 5.4( 6)"," 2.6( 7)","20.1( 8)","23.2( 9)"
data "10:23:35"," 4( 6)","16( 8)30"," 5.4( 7)","28.6( 7)","16.3( 9)","24.4(10)"
data "11:56:20","29( 6)"," 3( 9)09","26.8( 7)","16.9( 8)"," 7.1(10)","20.4(11)"
data "12:00:00"," 0( 7)"," 3( 9)50","27.6( 7)","17.6( 8)"," 8.0(10)","21.4(11)"
data "12:03:40"," 1( 7)"," 4( 9)30","28.3( 7)","18.3( 8)"," 8.9(10)","22.6(11)"
data "14:30:21","10( 8)"," 4(10)55"," 0.7( 9)","17.7( 9)","23.6(10)","10.0( 1)"
data "16:46:16","13( 9)","20(11)09"," 0.7(10)","12.9(10)","19.4( 1)","22.0( 2)"
data "17:55:38","29( 9)","27(12)27","17.2(10)","11.2(11)","15.8( 2)","10.5( 3)"
data "18:00:00"," 0(10)"," 0( 1)00","18.3(10)","12.7(11)","17.3( 2)","11.7( 3)"
data "18:04:22"," 1(10)"," 2( 1)33","19.5(10)","14.2(11)","18.8( 2)","12.8( 3)"
data "20:41:41"," 8(11)","12( 3)18"," 4.4(12)","17.5( 1)"," 1.8( 3)","19.0( 3)"
data "22:49:53","11(12)","12( 4)43","16.4( 1)"," 3.1( 3)","28.7( 4)","16.8( 5)"
data "23:56:20","29(12)","25( 4)30"," 7.4( 2)","21.1( 3)","11.7( 5)"," 1.7( 6)"
data "24:00:00"," 0( 1)","26( 4)10"," 8.6( 2)","22.0( 3)","12.4( 5)"," 2.4( 6)"
la$="51N00"
'..................
cls
e$="23:28:00"
pi#=4*atn(1)
ra#=2*pi#/360
'......................
hs=val(left$(hs$,2))+val(mid$(hs$,4,2))/60+val(right$(hs$,2))/3600
if hs=24 then hs=0
la=val(left$(la$,2))+val(right$(la$,2))/60
e#=val(left$(e$,2))+val(mid$(e$,4,2))/60+val(right$(e$,2))/3600
' ................


armc=hs*360/24    'Ascension Recta del Medio Cielo
MC=atn(tan((armc)*ra#)/cos(e#*ra#))/ra# 'Longitud del Medio Cielo


    if MC<0    then MC=MC+360
                    MC=MC+180
    if MC>=360 then MC=MC-360


    if hs>=0 and hs=<6  then MC=MC-180
    if hs>18 and hs=<24 then MC=MC+180
'................


'a=armc+90  'Ascension Oblicua del Ascendente
a=armc+120


if           a= 90 then a= 90.0010
if hs=12 and a=270 then a=270.0026
if           a=270 then a=270.0001
if a>=360 then a=a-360


AA= (atn((tan(la*ra#))/cos(a*ra#)))/ra#
H1= (atn(tan(a*ra#)*cos(AA*ra#)/cos((AA+e#)*ra#)))/ra# 'Longitud del Ascendente


    if H1<0 and hs>12 then H1=H1+180
    if H1<0    then H1=H1+360
                    H1=H1+180
    if H1>=360 then H1=H1-360


    if hs>=18 then H1=H1-180




senx=tan(e#*ra#)*tan(la*ra#)
cosx=sqr(1-senx^2)
tanx=senx/cosx
x=atn(tanx)  ' x en radianes
tanpolo11=sin(2*x/3)*(1/tan(e#*ra#))


AA= (atn(tanpolo11/cos(a*ra#)))/ra#
H11= (atn(tan(a*ra#)*cos(AA*ra#)/cos((AA+e#)*ra#)))/ra# 'Longitud de la casa 11
if H11<0 then H11=H11+360
print "H11";H11


'..................
call trans(H1,H1$)
call trans(MC,MC$)
print "latitud: ";la$;"  hora sideral:  ";hs$
d$= "\           \ ###,.##  \          \   \          \"
print using d$;"Medio Cielo ";MC;MC$;h10$
print using d$;"Ascendente  ";H1;H1$;h1$
end
'..................
sub s: while inkey$="":wend: end sub
'..................
sub trans(x,x$)
   s=int(x/30)+1
  ga=x-(s-1)*30:g=int(ga)
                m=cint((ga-g)*60)
  if m=60 then  m=0:g=g+1
  if g=30 then  g=0:s=s+1
  if s=13 then  s=1
  x$=str$(g)+"("+str$(s)+")"+str$(m)
end sub

Programa en Basic para calculo de cuspides mediante interpolacion


cls
    d1$="  ##     ##    ##     ##  "
    d2$="  MC     ##    ##     ##  "
pi#=4*atn(1)
a#=2*pi#/360
ce#=(23+27/60)*a#  ' constante ecliptica en radianes


input "Horasideral ",hs$
'hs$="163913"
  hs=val(left$(hs$,2))+(val(mid$(hs$,3,2)))/60+(val(right$(hs$,2)))/3600
input "latitud ",la$
  la=val(left$(la$,2))+(val(mid$(la$,3,2)))/60+(val(right$(la$,2)))/3600
  if la>60 then la=60

x=hs*360/24
print "Hora sideral en grados ";x

' calculo del medio cielo
aa=x+2.5*2*sin(x*a#)*(cos(x*a#))
a0=aa
gosub signos
print using d2$;s+1;g;m

 'ascendente a 0 grados
 'primera correccion
  x0=x-2.5*2*sin(x*a#)*(cos(x*a#))
  aa=x0
  g0=x0+3*30
  gosub signos
  print "           Ascendnte"
  print "Latitud Signo Grado Minuto"

print using d1$;0;s+4;g;m

open "casadato.dat" for input as #1
input #1, nd
for n=1 to nd
'  g0a=g0p
  g2a=g2p
  g4a=g4p
  g5a=g5p
  g6a=g6p
  ha =hp  'hacemos igual la hora anterior a la posterior leida antes

  input #1, ht$   'hora sideral de la tabla de datos
    ht=val(left$(ht$,2))+(val(mid$(ht$,3,2)))/60+(val(right$(ht$,2)))/3600
  input #1, g0$   ' grado 0
'    g0=val((left$(g0$,2))-1)*30+(val(mid$(g0$,3,2)))+(val(right$(g0$,2)))/60
  input #1, g2$   ' grado 20
    g2=(val(left$(g2$,2))-1)*30+(val(mid$(g2$,3,2)))+(val(right$(g2$,2)))/60
  input #1, g4$   ' grado 40
    g4=(val(left$(g4$,2))-1)*30+(val(mid$(g4$,3,2)))+(val(right$(g4$,2)))/60
  input #1, g5$   ' grado 50
    g5=(val(left$(g5$,2))-1)*30+(val(mid$(g5$,3,2)))+(val(right$(g5$,2)))/60
  input #1, g6$   ' grado 60
    g6=(val(left$(g6$,2))-1)*30+(val(mid$(g6$,3,2)))+(val(right$(g6$,2)))/60

'  g0p=g0
'  if g0p<g0a then g0p=g0p+12*30
  g2p=g2
  if g2p<g2a then g2p=g2p+12*30
  g4p=g4
  if g4p<g4a then g4p=g4p+12*30
  g5p=g5
  if g5p<g5a then g5p=g5p+12*30
  g6p=g6
  if g6p<g6a then g6p=g6p+12*30

  hp=ht  ' hacemos igual la hora posterior a la hora leida en ese momento
  ' si la hora sidral esta comprendida entre dos consecutivas de la tabla
  ' podemos hacer el calculo de interpolacion con esos dos datos.

  if hs>=ha and hs<=hp then
'    call inter(g0a,g0p,hp,ha,hs)
'    a0=aa
aa=g0
a0=g0
gosub signos
    print "Ascendente a  0 grados ";aa$

    call inter(g2a,g2p,hp,ha,hs)
    a2=aa
    print "Ascendente a 20 grados ";aa$

    call inter(g4a,g4p,hp,ha,hs)
    a4=aa
    print "Ascendente a 40 grados ";aa$

    call inter(g5a,g5p,hp,ha,hs)
    a5=aa
    print "Ascendente a 50 grados ";aa$

    call inter(g6a,g6p,hp,ha,hs)
    a6=aa
    print "Ascendente a 60 grados ";aa$

  if           la<=20 then call inter(a0,a2,20,0 ,la)
  if la>20 and la<=40 then call inter(a2,a4,40,20,la)
  if la>40 and la<=50 then call inter(a4,a5,50,40,la)
  if la>50            then call inter(a5,a6,60,50,la)

  al=aa
  print "-------------------------------------"
  print "ASCENDENTE A";int(la);"GRADOS ";aa$

    goto fuera
  end if
next n
close #1
fuera:


end


sub inter(ga,gp,p,a,s)
shared gs,aa$,aa
    i=p-a
    if abs(gp)<=abs(ga) then aa=((ga-gp)*(p-s))/i+gp
    if abs(gp)> abs(ga) then aa=((gp-ga)*(s-a))/i+ga
    if aa>12*30 then aa=aa-12*30
call s
    gosub signos
end sub

signos:
s=int(aa/30)     ' signo
g1=(aa-s*30)
g=int(g1)       ' grado
m=int((g1-g)*60)     ' minuto
aa$=str$(s+1)+str$(g)+str$(m)
return


sub s
while inkey$="":wend
end sub