2014-11-03 09:00:00 +00:00
const GLib = imports . gi . GLib ;
const Swe = imports . gi . SweGlib ;
const Format = imports . format ;
String . prototype . format = Format . format ;
2013-09-27 00:11:17 +00:00
Swe . init ( ) ;
var timestamp = new Swe . Timestamp ( ) ;
timestamp . set _gregorian _full ( 1983 , 3 , 7 , 11 , 54 , 45 , 0 , 1 ) ;
2014-03-15 19:28:44 +00:00
var moment = new Swe . Moment ( ) ;
2013-09-27 00:11:17 +00:00
moment . add _all _planets ( ) ;
moment . set _timestamp ( timestamp ) ;
2014-11-04 15:17:59 +00:00
moment . set _coordinates ( 19.03991 , 47.49801 , 280 ) ;
2013-09-27 00:11:17 +00:00
moment . set _house _system ( Swe . HouseSystem . PLACIDUS ) ;
2014-03-15 19:28:44 +00:00
var all _planets = moment . get _all _planets ( )
for ( var i = 0 ; i < all _planets . length ; i ++ ) {
var planet = all _planets [ i ] ;
var position = planet . get _position ( ) ;
var sign _position = position % 30 ;
var degree = Math . floor ( sign _position ) ;
var minute = Math . floor ( ( sign _position - degree ) * 60 ) ;
var second = Math . floor ( ( ( sign _position - degree ) * 60 - minute ) * 60 )
2014-11-03 09:00:00 +00:00
print ( "%s: %.6f (%d°%d′ %d″ %s)" . format ( planet . get _planet _info ( ) . get _name ( ) , position , degree , minute , second , planet . get _sign _info ( ) . get _name ( ) ) ) ;
2014-03-15 19:28:44 +00:00
}
var all _aspects = moment . get _all _aspects ( ) ;
for ( var i = 0 ; i < all _aspects . length ; i ++ ) {
var aspect = all _aspects [ i ] ;
if ( aspect . get _aspect ( ) != Swe . Aspect . NONE ) {
var planet1 = aspect . get _planet1 ( ) ;
var planet2 = aspect . get _planet2 ( ) ;
2014-11-03 09:00:00 +00:00
print ( "%s in %s with %s (±%.2f%%)" . format ( planet1 . get _planet _info ( ) . get _name ( ) , aspect . get _aspect _info ( ) . get _name ( ) , planet2 . get _planet _info ( ) . get _name ( ) , aspect . get _difference ( ) ) ) ;
2014-03-15 19:28:44 +00:00
}
}
var all _antiscia = moment . get _all _antiscia ( ) ;
for ( var i = 0 ; i < all _antiscia . length ; i ++ ) {
var antiscion = all _antiscia [ i ] ;
if ( antiscion . get _axis ( ) != Swe . AntiscionAxis . NONE ) {
var planet1 = antiscion . get _planet1 ( ) ;
var planet2 = antiscion . get _planet2 ( ) ;
2014-11-03 09:00:00 +00:00
print ( "%s is antiscion of %s on axis %s (±%.2f%%)" . format ( planet1 . get _planet _info ( ) . get _name ( ) , planet2 . get _planet _info ( ) . get _name ( ) , antiscion . get _antiscion _axis _info ( ) . get _name ( ) , antiscion . get _difference ( ) . toFixed ( 2 ) ) ) ;
2014-03-15 19:28:44 +00:00
}
}