<%args> $trkId $mag_limit => 22 $radius_arcmin => 5 <%init> use LWP::UserAgent; my $model = $m->notes('MODEL'); $ENV{OORB_DATA} = '/home/mops/MOPS_DEVEL/data/oorb'; # MOPS digest. my @mops_stuff = ("MOPS DIGEST\n", `neodigest $model T$trkId`, "\n\n"); # MPC digest. # Get MPC-formatted tracklet. my @mpc_data = `mt --global_oid=T$trkId --instance=$model --mpc --xd T$trkId`; chomp @mpc_data; my $data = join("\r\n", @mpc_data) . "\r\n"; # Get digest over HTTP from MPC. my $url = 'http://scully.harvard.edu/cgi-bin/possneo.cgi'; my $ua = LWP::UserAgent->new(timeout => 600); $ua->agent("Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.1) Gecko/20061208 Firefox/2.0.0.1"); my $response = $ua->post( $url, { TextArea => $data }, ); my $html = $response->content; my @mpc_stuff = ("MPC DIGEST\n", $html, "\n\n"); my @data_stuff = ("INPUT DATA\n\n", $data, "\n\n"); # OORB. my @oorb_stuff = ("OORB\n", `neoburn $model T$trkId`); # MPChecker. #my $cmd = "mt --miti --xd T$trkId --instance=$model | miti2mpc --mpcheck | mpcheck --mag_limit=$mag_limit --radius_arcmin=$radius_arcmin --insert_html --object_name=FOO | perl -pe 's/MOPS\\d+/T$trkId/'"; #my @check_stuff = `$cmd`; my @check_stuff = ''; $r->content_type('text/plain'); $m->clear_buffer; $m->print(@data_stuff, @mops_stuff, @mpc_stuff, @oorb_stuff, "\n\n", @check_stuff); $m->abort;