Hello Monks and happy new year...

...to prove how boring it would be without the reality of digital computing and space exploration, Ultima Thule was just observed. It is fresh off the press as a 'W' for people who look at Cassiopeia. I'd like to look at it with perl.

I know that the game is that I post the source I have. It's been a while since I've made such calculations. They were for the solar eclipse that started in Neskowin, Oregon:

$ cat 4.triton.pl 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 ); # 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 ); 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 ); } $

Venus and Jupiter aren't moving fast enough. Instead, I ask that we focus on the question, when will the moon next conjoin with ultima thule? More specifically, when will they have the same right ascension from the point of view of Portland, Oregon? What other resources exist to determine this?

Thanks for your comment,

Aldebaran


In reply to locating ultima thule by Aldebaran

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.