Differences between revisions 16 and 17
Revision 16 as of 2018-05-05 21:03:06
Size: 3672
Editor: BMittan
Revision 17 as of 2018-05-05 21:27:34
Size: 3674
Editor: BMittan
Deletions are marked like this. Additions are marked like this.
Line 90: Line 90:
-------- ----------



MGRAV.TXT is the output from Mgrav.e. This is a bigmap specific data file, similar to SGRAV.TXT. It contains the size of the map, as well as many useful parameters.

  • Line one: imax and jmax (the width of the map)
  • Line two: Position of v (center point?), a 3 component vector (v(k), k1,3)
  • All following lines: (vertex i, j, k and potential, acceleration, slope, elevation). The vertex positions should be identical to the map (maplet or bigmap) that you specified (i.e., row and column format of equal spacing along the surface of the object).
    • Column 4 is potential???.
    • Column 5 is acceleration (km/s/s). From a review of the output, I grossly assume that it is the gravitational acceleration at that location with respect to a constant height over the entire map (from the middle point of the map).
    • Column 6 is slope (degrees).
    • Column 7 is elevation (km?). Elevation is based upon the deviation from the center point of the map. You will find that the middle of every map will be 0.

        2049        2049
   57.145420074462891       -15.315745353698730       -220.78500366210938     
    0.13277E+03   -0.71393E+02   -0.18624E+03   -0.69832E-01    0.24570E-03    0.95146E+02   -0.47969E+01
    0.13276E+03   -0.71325E+02   -0.18628E+03   -0.69828E-01    0.24570E-03    0.11549E+03   -0.47811E+01
    0.13276E+03   -0.71257E+02   -0.18632E+03   -0.69825E-01    0.24571E-03    0.11527E+03   -0.47653E+01
    0.13275E+03   -0.71189E+02   -0.18636E+03   -0.69821E-01    0.24571E-03    0.11522E+03   -0.47512E+01
    0.13275E+03   -0.71121E+02   -0.18640E+03   -0.69818E-01    0.24572E-03    0.64173E+02   -0.47387E+01
    0.13274E+03   -0.71053E+02   -0.18643E+03   -0.69815E-01    0.24573E-03    0.11524E+03   -0.47271E+01
    0.13274E+03   -0.70985E+02   -0.18646E+03   -0.69813E-01    0.24574E-03    0.64958E+02   -0.47172E+01
    0.13273E+03   -0.70917E+02   -0.18650E+03   -0.69811E-01    0.24576E-03    0.11555E+03   -0.47081E+01


Here is a simple perl script that will rip off columns. You run this in unix by "perl scriptname > output.txt"

# Eric E. Palmer - 23 Sep 2012
# Perl script to read a file and output the absolute distance of the first 3 columns
#     or other columns
#     It is assumed that that is the distance that vector is from the center
#     and that it is reading an equa-spaced file

open FILE, "MGRAV.TXT" or die $!;

# Get the map sizes
chomp ($line);
$data =~ s/\s+/\t/g;
@items = split('  ', $data);  # Break line into an array

# Skip the next line

# Loop until you run out of data
while (<FILE>) {
   chomp;                  # remove trailing linefeed
   $data = $_;             # 
   $data =~ s/\s+/\t/g;    # convert blocks of spaces to tabs
   @items = split('  ', $data);  # Break line into an array

   # Get data - uncomment out the item you want
   #printf ("%3.5e   ", $items[4]);    # elevation
   #printf ("%3.5e   ", $items[5]);    # acceleration
   #printf ("%3.5f   ", $items[6]);    # potential
   printf ("%3.5f ", $items[7]);    # slope

   # Use this to get topography (or distance from center of gravity)
   #$a=$items[1];          # i
   #$b=$items[2];          # j
   #$c=$items[3];          # k
   #$dist = sqrt ($a*$a + $b*$b + $c*$c); # distance from center 
   #printf ("%3.2f   ", $dist);  #distance (or topography)

   if ($cnt >= $i) {
      printf ("\n");
close (FILE);
printf ("\n");

MGRAV.TXT (last edited 2018-05-05 21:27:34 by BMittan)