'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