in reply to locating ultima thule
I wanted to "get my own rebound here" and post source that produces meaningful output. It isn't too far from the source in the original post. I omitted the shebang line, so this script was, in my opinion, dangerous, because it could create files I didn't request in its own environment. I had that environment trimmed down to what was going to serve this script, but after executing the script with ./ , got:
$ ./4.triton.pl ./4.triton.pl: line 1: use: command not found ./4.triton.pl: line 2: use: command not found ./4.triton.pl: line 3: use: command not found ./4.triton.pl: line 4: use: command not found ./4.triton.pl: line 5: use: command not found ./4.triton.pl: line 6: use: command not found ./4.triton.pl: line 7: use: command not found ./4.triton.pl: line 8: use: command not found ./4.triton.pl: line 9: use: command not found ./4.triton.pl: line 10: use: command not found ./4.triton.pl: line 14: syntax error near unexpected token `$moon_seco +nds,' ./4.triton.pl: line 14: `my ( $moon_seconds, $sun_seconds, $equal_sec, + $equal );' $ file * 1.manifest: ASCII text 1.oneify.bash: Bourne-Again shell script, ASCII text executable 2.a.pl: Perl script text executable 2.create.bash: Bourne-Again shell script, ASCII text executable 3: empty 30: empty 3.ping3a.pl: Perl script text executable 4.haukex.pl: Perl script text executable 4.ping3a.pl: Perl script text executable 4.triton.pl: ASCII text 5.ping3a.pl: Perl script text executable template_stuff: directory :utf8: empty utils1.pm: Perl5 module source, UTF-8 Unicode text $
Q1) If this was 4.triton.pl, how did those 3 empty files come into existence?
use warnings; use strict; use 5.010; use WWW::Mechanize::GZip; use HTML::TableExtract; use Prompt::Timeout; use open ':std', OUT => ':utf8'; use constant TIMEOUT => 3; use constant MAXTRIES => 30; use utils1; ## redesign for solar eclipse of aug 21, 2017 # declarations, initializations to precede main control my ( $moon_seconds, $sun_seconds, $equal_sec, $equal );
One thing I like about this script is the light load it carries with modules. You'd have to be in a place with pretty low baud rate to make the acquisition of the these 3 take long:
WWW::Mechanize::GZip HTML::TableExtract Prompt::Timeout
In the drama that unfolded for New Horizons, they had to reload up to the 'puter from scratch right as they got there. It takes 4.5 hours for data to get there at, what, the speed of light in vacuum?
Anyways, this script is starting to shows the behaviors I'm looking for. Output then source.
$ ./5.triton.pl Make query number 1? [Y] :Y Make query number 2? [Y] :Y Make query number 3? [Y] :Y Make query number 4? [Y] :Y Make query number 5? [Y] :Y Make query number 6? [Y] :Y $VAR1 = [ [ ' ', 'Right Ascension', 'Declination', 'Distance (AU)', 'From 45°N 122°W:', undef, undef ], [ undef, undef, undef, undef, 'Altitude', 'Azimuth', undef ], [ 'Sun', '15h 14m 28s', "\x{2212}18\x{b0} 1.0'", '0.990', "\x{2212}56.049", '134.597', 'Set' ], [ 'Mercury', '16h 34m 17s', "\x{2212}24\x{b0} 23.1'", '1.215', "\x{2212}48.583", '104.536', 'Set' ], [ 'Venus', '14h 21m 15s', "\x{2212}12\x{b0} 43.1'", '1.642', "\x{2212}56.283", '159.644', 'Set' ], [ 'Moon', '11h 29m 54s', '+6° 4.0\'', '59.6 ER', "\x{2212}31.689", "\x{2212}142.465", 'Set' ], [ 'Mars', '12h 51m 38s', "\x{2212}4\x{b0} 19.7'", '2.331', "\x{2212}48.205", "\x{2212}163.434", 'Set' ], [ 'Jupiter', '14h 21m 15s', "\x{2212}12\x{b0} 59.9'", '6.395', "\x{2212}56.553", '159.518', 'Set' ], [ 'Saturn', '17h 41m 55s', "\x{2212}22\x{b0} 24.3'", '10.861', "\x{2212}35.493", '92.927', 'Set' ], [ 'Uranus', '1h 35m 39s', '+9° 19.7\'', '19.010', '54.328', "\x{2212}0.031", 'Up' ], [ 'Neptune', '22h 53m 7s', "\x{2212}8\x{b0} 6.8'", '29.586', '25.569', '45.596', 'Up' ], [ 'Pluto', '19h 13m 54s', "\x{2212}21\x{b0} 48.5'", '33.987', "\x{2212}18.947", '77.750', 'Set' ] ]; $
The logfile looks right:
$ cat 2.jv.txt Script executed at Thu Jan 3 09:23:32 2019 1 Venus 14h 22m 7s −12° 47.7' 1.642 −35.087 −108.646 + Set 1 Jupiter 14h 21m 24s −13° 0.6' 6.394 −35.123 −108.3 +10 Set 2 Venus 14h 20m 55s −12° 41.4' 1.642 −45.439 124.939 Set 2 Jupiter 14h 21m 11s −12° 59.6' 6.395 −45.644 124.606 Set 3 Venus 14h 21m 33s −12° 44.7' 1.642 −56.544 −161.34 +2 Set 3 Jupiter 14h 21m 18s −13° 0.1' 6.395 −56.780 −161.1 +26 Set 4 Venus 14h 21m 11s −12° 42.8' 1.642 −54.981 152.224 Set 4 Jupiter 14h 21m 14s −12° 59.8' 6.395 −55.244 152.038 Set 5 Venus 14h 21m 22s −12° 43.7' 1.642 −57.625 174.471 Set 5 Jupiter 14h 21m 16s −12° 60.0' 6.395 −57.897 174.480 Set 6 Venus 14h 21m 16s −12° 43.2' 1.642 −56.648 162.352 Set 6 Jupiter 14h 21m 15s −12° 59.9' 6.395 −56.920 162.250 Set equal, while condition fails at julian second 2458070.75649605 7 Venus 14h 21m 14s −12° 43.1' 1.642 −56.026 157.953 Set 7 Jupiter 14h 21m 14s −12° 59.8' 6.395 −56.295 157.814 Set equal seconds is 2458070.75649605 Script executed at Thu Jan 3 09:25:42 2019 1 Venus 14h 22m 15s −12° 48.4' 1.642 −28.309 −100.51 +9 Set 1 Jupiter 14h 21m 25s −13° 0.7' 6.394 −28.308 −100.1 +93 Set 2 Venus 14h 21m 10s −12° 42.7' 1.642 −54.559 150.266 Set 2 Jupiter 14h 21m 14s −12° 59.8' 6.395 −54.819 150.066 Set 3 Venus 14h 21m 42s −12° 45.6' 1.642 −52.400 −141.86 +9 Set 3 Jupiter 14h 21m 19s −13° 0.3' 6.395 −52.576 −141.5 +51 Set 4 Venus 14h 21m 27s −12° 44.2' 1.642 −57.614 −173.98 +5 Set 4 Jupiter 14h 21m 17s −13° 0.0' 6.395 −57.874 −173.8 +70 Set 5 Venus 14h 21m 19s −12° 43.5' 1.642 −57.187 167.450 Set 5 Jupiter 14h 21m 15s −12° 59.9' 6.395 −57.460 167.394 Set equal, while condition fails at julian second 2458070.75927645 6 Venus 14h 21m 15s −12° 43.1' 1.642 −56.283 159.644 Set 6 Jupiter 14h 21m 15s −12° 59.9' 6.395 −56.553 159.518 Set equal seconds is 2458070.75927645 $
Source:
$ cat 5.triton.pl #!/usr/bin/perl -w use 5.011; use WWW::Mechanize::GZip; use HTML::TableExtract; use Prompt::Timeout; use open ':std', OUT => ':utf8'; use constant TIMEOUT => 3; use constant MAXTRIES => 30; use Data::Dumper; #use utils1; ### re-set for ultima thule ## redesign for solar eclipse of aug 21, 2017 # declarations, initializations to precede main control my ( $moon_seconds, $sun_seconds, $equal_sec, $equal ); # set time boundaries my ( $before_bound, $after_bound ) = ( 2458070.47111, 2458071.47111); # hard code 2 objects to look at (rows) my $e1 = 4; #venus my $e2 = 7; #jupiter # hard code column my $column = 1; #right ascension my $filename = '2.jv.txt'; #output file my $now_string = localtime; open( my $jh, '>>', $filename ) or die "Could not open file '$filename +' $!"; say $jh "Script executed at $now_string"; my $attempts = 1; my ( $lower, $upper ) = ( $before_bound, $after_bound ); my $site = 'http://www.fourmilab.ch/yoursky/cities.html'; my $mech = 'WWW::Mechanize::GZip'->new; $mech->get($site); $mech->follow_link( text => 'Portland OR' ); $mech->set_fields(qw'date 2'); #julian date specified my $ref_final; #reference to outlive what follows # determine equality by contracting stochastically while ( ( ( $attempts == 1 ) || ( $sun_seconds != $moon_seconds ) ) ) +{ my $default = ( ( $attempts >= MAXTRIES ) ) ? 'N' : 'Y'; my $answer = prompt( "Make query number $attempts?", $default, TIM +EOUT ); exit if $answer =~ /^N/i; my $guess = closetohalf( $upper, $lower ); $mech->set_fields( jd => $guess ); $mech->click_button( value => "Update" ); my $te = 'HTML::TableExtract'->new; $te->parse( $mech->content ); my $table = ( $te->tables )[3]; #ephemeris table # looking to get the whole row my $aoa_ref = $table->rows(); #print_aoa( $aoa_ref ); #my $inverted = invert_aoa( $aoa_ref ); #print_aoa( $inverted ); $ref_final = $aoa_ref; # my $row_ref1 = $table->row($e1); my @row1 = @$row_ref1; my $row_ref2 = $table->row($e2); my @row2 = @$row_ref2; my $moon = $row1[$column]; my $sun = $row2[$column]; $moon_seconds = string_to_second($moon); $sun_seconds = string_to_second($sun); if ( $sun_seconds < $moon_seconds ) { $upper = $guess; } elsif ( $moon_seconds < $sun_seconds ) { $lower = $guess; } else { $equal = $guess; say $jh "equal, while condition fails at julian second $equal" +; $equal_sec = $moon_seconds; } say $jh "$attempts @row1"; say $jh "$attempts @row2"; $attempts++; } say $jh "equal seconds is $equal"; #print_aoa( $ref_final ); print Dumper $ref_final; sub string_to_second { my $string = shift; my $return; if ( my $success = $string =~ /^(\d*)h\s+(\d*)m\s+(\d*)s$/ ) { $return = 3600 * $1 + 60 * $2 + $3; } else { } return $return; } sub closetohalf { my ( $up, $low ) = @_; $low + ( $up - $low ) * ( 0.4 + rand 0.2 ); } $
I don't want to cheat and google for where this thing is before I make a good attempt at it. What I propose is that I reset these values to looking when the moon and pluto conjoin. I would understand the answer to this question relationally to the ephemeris, which I can observe. Others may have others ways to get at the same answer, which I, again, solicit. (or is it elicit: I can barely speak my Muttersprache anymore)
I'd bet that Ultima Thule is less than "one finger" from Pluto, where that represents the arcdistance of a finger held out at armslength for normally-proportioned homo sapiens. (We need to be specific, in case the Plutans are listening.)
This and the ushering in of a check on executive power in Congress have me rather optimistic today. I hope you feel it too.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: locating ultima thule
by Anonymous Monk on Jan 04, 2019 at 15:01 UTC | |
by afoken (Chancellor) on Jan 04, 2019 at 19:12 UTC |