#!/usr/bin/perl
# 
# Compute the "lambda" factor for a set of objects in the solar system.
#   "Lambda" is related to the time in which an object will scatter
#   small bodies from nearby orbits, as defined in (for example)
#       http://adsabs.harvard.edu/abs/2006AJ....132.2513S
#
# MWR 9/19/2016

$debug = 1;

$PI = 3.14159;
# value of constant which will yield approx "time to clear" 
#    in years
$k = 1E54;

# properties of objects: name, mass (kg), period (yr)
#
@bodies = (  [ 'Mercury',    3.30E23,    0.2408 ] ,
             [ 'Venus',      4.87E24,    0.6152 ] , 
             [ 'Earth',      5.98E24,    1.0000 ] ,
             [ 'Mars',       6.42E23,    1.8808 ] ,
             [ 'Ceres',      8.96E20,    4.5996 ] ,
             [ 'Jupiter',    1.90E27,   11.8623 ] ,
             [ 'Saturn',     5.68e26,   29.4579 ] ,
             [ 'Uranus',     8.68e25,   84.0110 ] ,
             [ 'Neptune',    1.02e26,  164.7912 ] ,
             [ 'Pluto' ,     1.27e22,  247.9124 ] ,
             [ 'Eris',       1.66e22,  560.9    ] 
          );   



for ($i = 0; $i <= $#bodies; $i++) {
  $name = $bodies[$i][0];
  $mass = $bodies[$i][1];
  $period = $bodies[$i][2];

  $lambda = ($k*$period) / ($mass*$mass);

  printf "%-12s   %8.2e kg    %10.5f years    clear in  %8.2e year \n", 
       $name, $mass, $period, $lambda;
}


exit 0;
