WIRE SO Tool: mooncheck


The WIRE mission must satisfy moon pointing constraints that disallow telescope pointings within a certain angular range about the Moon. Perl script mooncheck computes the Moon's position at a given WIRE modified-Julian date using canned C routines. For a given spacecraft telescope pointing, it computes the angle between the center of the Moon and telescope boresight, compares this angle with a given constraint-threshold angle, and determines whether or not the pointing is allowed.

Although the tool has only been used to check results from moonviol.pl (which is called by plansky and autotilefile for moon-violation checking), it is packed with all the features necessary for Tim Conrow's pipeline-style operation, including execution-path passing, log file generation, and command-line-option override of default values.

The Moon's position as computed by this tool were compared with positions listed in the Astronomical Almanac for three different dates. The agreement was within 50 arcseconds, which is probably mostly due to differences between UT and TDT (A.A. Moon positions are given in these terms).

The tool is now under both CVS version control (/proj/wire/cvsroot/so/russ/moon), and make control (makefile.p-bin). It has been delivered to /proj/wire/so_tst/bin (this latest version includes CVS version string). It uses perl libraries moonviolation.pl, mytime.pl, params.pl, and wireutils.pl. The lastest CVS version number is 1.3. The source code is located in /proj/wire/russ/moon.

Required and Optional Inputs

The table below describes the available command-line inputs.
Command-line input  Definition 
-mjdate or -m value WIRE modified-Julian date. Default is 36213.5 days.
-rawire or -r value J2000 R.A. of telescope boresight. Either decimal degrees or sexigesimal angle units (hms or dms) are allowed. Default is 45.0 degrees.
-decwire or -d value J2000 Dec. of telescope boresight. Either decimal degrees or sexigesimal angle units (hms or dms) are allowed. Default is 5.0 degrees.
-moonminangle or -a value Minimum acceptable angle between Moon's center and telescope boresight. Angle must be given in units of decimal degrees only. Default is 8 degrees.
-execPath or -xp execution path Pathname of modules that are executed by this tool. Default is @/ (means same as that of mooncheck when delivered using Tim Conrow's makefile macros for perl).


Generates standard output, as well as a log file for STDERR outputs. The STDOUT results are Moon position, separation angle between Moon and telescope boresight, minimum separation angle, and accept/reject flag for the telescope pointing. See sample STDOUT output given below.


Example of how to execute mooncheck:
/proj/wire/so_tst/bin/mooncheck -r 68 -d 16 -m 36213.5 -a 7

The standard output is:

mooncheck version $Id: mooncheck,v 1.3 1999/03/12 21:35:31 laher Exp $  update Fri_1999/03/12(071)_14:21:13 , PID=1302
User: laher   Date/time: Fri_1999/03/12(071)_14:30:45   PCPU: 1.23/0.2/2  CCPU: 0.18/0.23


Named parameters for Mooncheck:
  mjdate = 36213.5; rawire = 68; decwire = 16; moonminangle = 7; 
  verbose = undef; execpath = @/; debug = undef; log = undef; 

Moon violation-check results:
   Observation flag = accept
   Separation angle (degrees) = 7.79346483155832
   Minimum separation angle (degrees) = 7
   Moon (RA, Dec) = 75.883573, 17.976857

End of mooncheck status 0, PID=1302
User: laher   Date/time: Fri_1999/03/12(071)_14:30:45   PCPU: 1.29/0.2/2  CCPU: 0.21/0.35

Last revised: March 12, 1999

Software Developer: Russ Laher

Webpage by: Russ Laher

URL: http://spider.ipac.caltech.edu/staff/laher/mooncheck.html

Return to Home Page