Документ взят из кэша поисковой машины. Адрес оригинального документа : http://www.stsci.edu/~sontag/spicedocs/ug/subpt.html
Дата изменения: Sat Dec 17 06:07:08 2005
Дата индексирования: Sun Apr 10 19:11:00 2016
Кодировка:
SUBPT User's Guide

SUBPT User's Guide





Last revised on 2002 DEC 13 by E. D. Wright.



Abstract




SUBPT is a cookbook program that demonstrates how to use Toolkit routines to compute sub-spacecraft point.



Summary




The SUBPT `cookbook' program illustrates the use of CSPICE Toolkit software for solving a typical geometrical problem --- computing the apparent sub-observer point on a target body using light time corrections.

The `sub-observer point' is defined to be the point on the target body surface closest to the observer. The state of the target body at time t-Tau is the state of the target seen by the observer at time t, where Tau is the light time from the target body to the observer. The `apparent sub-observer point' is the point on the target body at time t-Tau that is closest to the observer at time t.

SUBPT demonstrates the use of the following high-level SPK subroutines:

furnsh_c

Load SPICE kernels
str2et_c

Convert time string to ephemeris time
subpt_c

Calculate the sub-point.
et2utc_c

Convert ephemeris time to UTC string
To run SUBPT, you need a binary SPK ephemeris file and knowledge of the bodies and the corresponding time intervals contained in that file. The utility program named BRIEF summarizes the contents and time coverage of a binary SPK file. Refer to NAIF IDs Required Reading for a list of body names and integer codes. In addition to an SPK file, you also require access to leapsecond (LSK) and planetary constants (PCK) kernels.

SUBPT prompts you for the NAIF IDs or string name of a target body and observing body, the UTC end-points of a time interval, and the number of evaluations to perform over the assigned time interval. The program then computes the planetocentric coordinates of the apparent sub-observer point on the target body, printing to the terminal screen for each time in the interval.

Below, find a sample session using SUBPT to calculate the latitude and longitude of the nearest point on the Earth to the Sun through a single day. SUBPT can be used with any SPK file containing appropriate data.

Please note: FORTRAN and C versions of the program can output numerical values in slightly different formats.

It is assumed the kernel files used by SUBPT exist in the current directory (i.e. the directory from which your execute SUBPT). This particular session was run on an Intel box using the LINUX operating system.

First, create the binary SPK kernel "cook_01.bsp" by running the CSPICE Toolkit TOBIN application on the transfer format file "cook_01.tsp" located in the CSPICE data directory. The program also requires a leapseconds kernel to run; an example leapseconds kernel, 'cook_01.tls' exists within the same directory. Now, execute SUBPT:

 
                Welcome to SUBPT
 
   This program demonstrates the use of CSPICE in computing
   the apparent sub-observer point on a target body.   The
   computations use light time corrections.
 
   Enter the name of leapseconds kernel file: cook_01.tls
 
   Enter the name of a planetary constants kernel: cook_01.tpc
 
   Enter the name of a binary SPK file: cook_01.bsp
 
   Working ... Please wait.
 
   Enter the name for the observing body: sun
 
   Enter the name for a target body: earth
 
   Enter the number of points to calculate: 24
 
   Enter the beginning UTC time: jul 1 1990
 
   Enter the ending UTC time: jul 2 1990
 
   Planetocentric coordinates for the nearest point
   on the target body to the observing body (deg).
   Target body: earth          Observing body: sun
 
          UTC Time            Lat         Lon
   ----------------------------------------------
     1990 JUL 01 00:00:00   23.00157    -176.91995
     1990 JUL 01 01:02:36   22.99879    167.43000
     1990 JUL 01 02:05:13   22.99600    151.77995
     1990 JUL 01 03:07:49   22.99320    136.12990
     1990 JUL 01 04:10:26   22.99039    120.47985
     1990 JUL 01 05:13:02   22.98757    104.82979
     1990 JUL 01 06:15:39   22.98473     89.17973
     1990 JUL 01 07:18:15   22.98188     73.52967
     1990 JUL 01 08:20:52   22.97902     57.87961
     1990 JUL 01 09:23:28   22.97614     42.22954
     1990 JUL 01 10:26:05   22.97325     26.57948
     1990 JUL 01 11:28:41   22.97035     10.92941
     1990 JUL 01 12:31:18   22.96744     -4.72066
     1990 JUL 01 13:33:54   22.96451    -20.37074
     1990 JUL 01 14:36:31   22.96157    -36.02081
     1990 JUL 01 15:39:07   22.95862    -51.67089
     1990 JUL 01 16:41:44   22.95566    -67.32097
     1990 JUL 01 17:44:20   22.95268    -82.97105
     1990 JUL 01 18:46:57   22.94969    -98.62113
     1990 JUL 01 19:49:33   22.94669    -114.27122
     1990 JUL 01 20:52:10   22.94368    -129.92131
     1990 JUL 01 21:54:46   22.94065    -145.57140
     1990 JUL 01 22:57:23   22.93761    -161.22149
     1990 JUL 02 00:00:00   22.93456    -176.87159
 
   Continue? (Enter Y or N): N