Remote Sensing Hands-On Lesson, using CASSINI (IDL) |
Table of ContentsRemote Sensing Hands-On Lesson, using CASSINI (IDL) Overview Note About HTML Links References Tutorials Required Readings The Permuted Index Icy API Documentation Kernels Used Icy Modules Used Time Conversion (convtm) Task Statement Learning Goals Approach Solution Solution Meta-Kernel Solution Source Code Solution Sample Output Extra Credit Task statements and questions Solutions and answers Obtaining Target States and Positions (getsta) Task Statement Learning Goals Approach Solution Solution Meta-Kernel Solution Source Code Solution Sample Output Extra Credit Task statements and questions Solutions and answers Spacecraft Orientation and Reference Frames (xform) Task Statement Learning Goals Approach Solution Solution Meta-Kernel Solution Source Code Solution Sample Output Extra Credit Task statements and questions Solutions and answers Computing Sub-s/c and Sub-solar Points on an Ellipsoid and a DSK (subpts) Task Statement Learning Goals Approach Solution Solution Meta-Kernel Solution Source Code Solution Sample Output Extra Credit Task statements and questions Solutions and answers Intersecting Vectors with an Ellipsoid and a DSK (fovint) Task Statement Learning Goals Approach Solution Solution Meta-Kernel Solution Source Code Solution Sample Output Extra Credit Remote Sensing Hands-On Lesson, using CASSINI (IDL)
Overview
Note About HTML Links
In order for the links to be resolved, if not done already by installing the lessons package under the Toolkit's ``doc/html'' directory, create a subdirectory called ``lessons'' under the ``doc/html'' directory of the ``icy/'' tree and copy this document to that subdirectory before loading it into a Web browser. References
Of these documents, the ``Tutorials'' contains the highest level descriptions with the least number of details while the ``Required Reading'' documents contain much more detailed specifications. The most complete specifications are provided in the ``API Documentation''. In some cases the lesson explanations also refer to the information provided in the meta-data area of the kernels used in the lesson examples. It is especially true in case of the FK and IK files, which often contain comprehensive descriptions of the frames, instrument FOVs, etc. Since both the FK and IK are text kernels, the information provided in them can be viewed using any text editor, while the meta information provided in binary kernels---SPKs and CKs---can be viewed using ``commnt'' or ``spacit'' utility programs located in ``icy/exe'' of Toolkit installation tree. Tutorials
Name Lesson steps/routines it describes ---------------- ----------------------------------------------- Time Time Conversion SCLK and LSK Time Conversion SPK Obtaining Ephemeris Data Frames Reference Frames Using Frames Reference Frames PCK Planetary Constants Data CK Spacecraft Orientation Data DSK Detailed Target Shape (Topography) DataThese tutorials are available from the NAIF server at JPL:
https://naif.jpl.nasa.gov/naif/tutorials.html Required Readings
Name Lesson steps/routines that it describes --------------- ----------------------------------------- ck.req Obtaining spacecraft orientation data dsk.req Obtaining detailed body shape data frames.req Using reference frames naif_ids.req Determining body ID codes pck.req Obtaining planetary constants data sclk.req SCLK time conversion spk.req Obtaining ephemeris Data time.req Time conversion icy.req The Icy API The Permuted Index
This text document provides a simple mechanism by which users can discover which Icy procedures perform functions of interest, as well as the names of the source files that contain these procedures.
Icy API Documentation
For example, the document
icy/doc/html/icy/cspice_str2et.htmldescribes the cspice_str2et routine. Kernels Used
# FILE NAME TYPE DESCRIPTION -- ------------------------- ---- ----------------------------------- 1 naif0008.tls LSK Generic LSK 2 cas00084.tsc SCLK Cassini SCLK 3 981005_PLTEPH-DE405S.bsp SPK Solar System Ephemeris 4 020514_SE_SAT105.bsp SPK Saturnian Satellite Ephemeris 5 030201AP_SK_SM546_T45.bsp SPK Cassini Spacecraft SPK 6 cas_v37.tf FK Cassini FK 7 04135_04171pc_psiv2.bc CK Cassini Spacecraft CK 8 cpck05Mar2004.tpc PCK Cassini Project PCK 9 phoebe_64q.bds DSK Phoebe DSK 10 cas_iss_v09.ti IK ISS Instrument KernelThese SPICE kernels are included in the lesson package. In addition to these kernels, the extra credit exercises require the following kernels:
# FILE NAME TYPE DESCRIPTION -- --------------- ---- --------------------------------------------- 11 jup310_2004.bsp SPK Generic Jovian Satellite EphemerisThese SPICE kernels are available from the NAIF server at JPL:
https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/satellites/ Icy Modules Used
CHAPTER EXERCISE FUNCTIONS NON-VOID KERNELS ------- --------- ------------- ------------- ---------- 1 convtm cspice_furnsh 1,2 cspice_str2et cspice_etcal cspice_timout cspice_sce2s cspice_unload extra (*) cspice_sct2e cspice_unitim 1,2 cspice_et2utc cspice_scs2e 2 getsta cspice_furnsh cspice_vnorm 1,3-5 cspice_str2et cspice_spkezr cspice_spkpos cspice_convrt cspice_kclear extra (*) cspice_unload 1,3-5,11 3 xform cspice_furnsh cspice_vsep 1-8 cspice_str2et cspice_spkezr cspice_sxform cspice_spkpos cspice_pxform cspice_mxv cspice_convrt cspice_kclear extra (*) cspice_unload 1-8 4 subpts cspice_furnsh cspice_vnorm 1,3-5,8,9 cspice_str2et cspice_subpnt cspice_subslr cspice_unload extra (*) cspice_kclear cspice_dpr 1,3-5,8 cspice_reclat cspice_bodvrd cspice_recpgr 5 fovint cspice_furnsh cspice_dpr 1-10 cspice_str2et cspice_getfvn cspice_bodn2c cspice_sincpt cspice_reclat cspice_illumf cspice_et2lst cspice_kclear (*) Additional APIs and kernels used in Extra Credit tasks.Refer to the Icy HTML API documentation pages located under ``icy/doc/html/icy'' for detailed interface specifications of these procedures. Time Conversion (convtm)Task Statement
Learning Goals
Approach
When completing the ``calendar format'' step above, consider using one of two possible methods: cspice_etcal or cspice_timout. SolutionSolution Meta-Kernel
KPL/MK This is the meta-kernel used in the solution of the ``Time Conversion'' task in the Remote Sensing Hands On Lesson. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents -------------------------- ----------------------------- naif0008.tls Generic LSK cas00084.tsc Cassini SCLK \begindata KERNELS_TO_LOAD = ( 'kernels/lsk/naif0008.tls', 'kernels/sclk/cas00084.tsc' ) \begintext Solution Source Code
PRO convtm ;; ;; Local Parameters ;; METAKR = "convtm.tm" SCLKID = -82 STRLEN = 50 utctim = '' ;; ;; Load the kernels his program requires. ;; Both the spacecraft clock kernel and a ;; leapseconds kernel should be listed in ;; the meta-kernel. ;; cspice_furnsh, METAKR ;; ;; Prompt the user for the input time string. ;; read, utctim, PROMPT="Input UTC Time: " print, "Converting UTC Time: ", utctim ;; ;; Convert utctim to et. ;; cspice_str2et, utctim, et print, FORMAT="(A,F16.3)", " ET Seconds Past J2000: ", et ;; ;; Now convert ET to a formal calendar time ;; string. This can be accomplished in two ;; ways. ;; cspice_etcal, et, calet print, " Calendar ET (cspice_etcal): ", calet ;; ;; Or use cspice_timout for finer control over the ;; output format. The picture below was built ;; by examining the header of cspice_timout. ;; cspice_timout, et , "YYYY-MON-DDTHR:MN:SC ::TDB", $ STRLEN, calet print, " Calendar ET (cspice_timout): ", calet ;; ;; Convert ET to spacecraft clock time. ;; cspice_sce2s, SCLKID, et, sclkst print, " Spacecraft Clock Time: ", sclkst cspice_unload, METAKR END Solution Sample Output
Input UTC Time: 2004 jun 11 19:32:00 Converting UTC Time: 2004 jun 11 19:32:00 ET Seconds Past J2000: 140254384.185 Calendar ET (cspice_etcal): 2004 JUN 11 19:33:04.184 Calendar ET (cspice_timout): 2004-JUN-11T19:33:04 Spacecraft Clock Time: 1/1465674964.105 Extra Credit
These ``extra credit'' tasks are provided as task statements, and unlike the regular tasks, no approach or solution source code is provided. In the next section, you will find the numeric solutions (when applicable) and answers to the questions asked in these tasks. Task statements and questions
Solutions and answers
Julian Date TDB: 2453168.3146318
% CSPICE_STR2ET: SPICE(NOLEAPSECONDS): [str2et_c->STR2ET->TTRANS] The variable that points to the leapseconds (DELTET/DELTA_AT) could not be located in the kernel pool. It is likely that the leapseconds kernel has not been loaded. (CSPICE_N0067) % Execution halted at: CONVTM 32 /home/bsemenov/tmp/lessons_230301/lessons/remote_sensing/convtm .pro % $MAIN$
% CSPICE_SCE2S: SPICE(KERNELVARNOTFOUND): [sce2s_c->SCE2S->SCE2T->SCTYPE->SCTY01] Kernel variable SCLK_DATA_TYPE_82 was not found in the kernel pool. (CSPICE_N0067) % Execution halted at: CONVTM 63 /home/bsemenov/tmp/lessons_230301/lessons/remote_sensing/convtm .pro % $MAIN$
Earliest UTC convertible to SCLK: 1980-01-01T00:00:00.000
Spacecraft Clock Time: 1/1465674964.105 UTC time from spacecraft clock: 2004-06-11T19:31:59.999 Obtaining Target States and Positions (getsta)Task Statement
Learning Goals
Approach
When deciding which SPK files to load, the Toolkit utility ``brief'' may be of some use. ``brief'' is located in the ``icy/exe'' directory for IDL toolkits. Consult its user's guide available in ``icy/doc/brief.ug'' for details. SolutionSolution Meta-Kernel
KPL/MK This is the meta-kernel used in the solution of the ``Obtaining Target States and Positions'' task in the Remote Sensing Hands On Lesson. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents -------------------------- ----------------------------- naif0008.tls Generic LSK 981005_PLTEPH-DE405S.bsp Solar System Ephemeris 020514_SE_SAT105.bsp Saturnian Satellite Ephemeris 030201AP_SK_SM546_T45.bsp Cassini Spacecraft SPK \begindata KERNELS_TO_LOAD = ( 'kernels/lsk/naif0008.tls', 'kernels/spk/981005_PLTEPH-DE405S.bsp', 'kernels/spk/020514_SE_SAT105.bsp', 'kernels/spk/030201AP_SK_SM546_T45.bsp' ) \begintext Solution Source Code
PRO getsta ;; ;; Local Parameters ;; METAKR = 'getsta.tm' STRLEN = 50 utctim = '' ;; ;; Load the kernels that this program requires. We ;; will need a leapseconds kernel to convert input ;; UTC time strings into ET. We also will need the ;; necessary SPK files with coverage for the bodies ;; in which we are interested. ;; cspice_furnsh, METAKR ;; ;; Prompt the user for the input time string. ;; read, utctim, PROMPT = 'Input UTC Time: ' print, 'Converting UTC Time: ', utctim ;; ;; Convert utctim to et. ;; cspice_str2et, utctim, et print, FORMAT='(A,F16.3)', ' ET seconds past J2000: ', et ;; ;; Compute the apparent state of Phoebe as seen from ;; CASSINI in the J2000 frame. All of the ephemeris ;; readers return states in units of kilometers and ;; kilometers per second. ;; cspice_spkezr, 'PHOEBE' , et , 'J2000', 'LT+S', $ 'CASSINI', state, ltime print, ' Apparent state of Phoebe as seen ' +$ 'from CASSINI in the J2000 ' print, ' frame (km, km/s): ' print, FORMAT='(A,F16.3)', ' X = ', state[0] print, FORMAT='(A,F16.3)', ' Y = ', state[1] print, FORMAT='(A,F16.3)', ' Z = ', state[2] print, FORMAT='(A,F16.3)', ' VX = ', state[3] print, FORMAT='(A,F16.3)', ' VY = ', state[4] print, FORMAT='(A,F16.3)', ' VZ = ', state[5] ;; ;; Compute the apparent position of Earth as seen from ;; CASSINI in the J2000 frame. Note: We could have ;; continued using cspice_spkezr and simply ignored the ;; velocity components. ;; cspice_spkpos, 'EARTH' , et , 'J2000', 'LT+S', $ 'CASSINI', pos, ltime print, ' Apparent position of Earth as ' +$ 'seen from CASSINI in the J2000 ' print, ' frame (km): ' print, FORMAT='(A,F16.3)', ' X = ', pos[0] print, FORMAT='(A,F16.3)', ' Y = ', pos[1] print, FORMAT='(A,F16.3)', ' Z = ', pos[2] ;; ;; We need only display LT, as it is precisely the ;; light time in which we are interested. ;; print, ' One way light time between CASSINI and ' +$ 'the apparent position' print, FORMAT='(A,F16.3)', ' of Earth (seconds): ', $ ltime ;; ;; Compute the apparent position of the Sun as seen ;; from Phoebe in the J2000 frame. ;; cspice_spkpos, 'SUN' , et , 'J2000', 'LT+S', $ 'PHOEBE', pos, ltime print, ' Apparent position of Sun as seen ' +$ 'from Phoebe in the ' print, ' J2000 frame (km): ' print, FORMAT='(A,F16.3)', ' X = ', pos[0] print, FORMAT='(A,F16.3)', ' Y = ', pos[1] print, FORMAT='(A,F16.3)', ' Z = ', pos[2] ;; ;; Now we need to compute the actual distance between ;; the Sun and Phoebe. The above SPKPOS call gives us ;; the apparent distance, so we need to adjust our ;; aberration correction appropriately. ;; cspice_spkpos, 'SUN' , et , 'J2000', 'NONE', $ 'PHOEBE', pos, ltime ;; ;; Compute the distance between the body centers in ;; kilometers. ;; dist = cspice_vnorm ( pos ) ;; ;; Convert this value to AU using cspice_convrt. ;; Recall, cspice_convrt cannot overwrite the ;; input with the output. Use 'dist_au' for the ;; output value. ;; cspice_convrt, dist, 'KM', 'AU', dist_au print, ' Actual distance between Sun and Phoebe ' + $ 'body centers:' print, FORMAT='(A,F16.3)', ' (AU): ', dist_au cspice_kclear END Solution Sample Output
Input UTC Time: 2004 jun 11 19:32:00 Converting UTC Time: 2004 jun 11 19:32:00 ET seconds past J2000: 140254384.185 Apparent state of Phoebe as seen from CASSINI in the J2000 frame (km, km/s): X = -119.921 Y = 2194.139 Z = -57.639 VX = -5.980 VY = -2.119 VZ = -0.295 Apparent position of Earth as seen from CASSINI in the J2000 frame (km): X = 353019393.123 Y = -1328180352.140 Z = -568134171.697 One way light time between CASSINI and the apparent position of Earth (seconds): 4960.427 Apparent position of Sun as seen from Phoebe in the J2000 frame (km): X = 376551465.272 Y = -1190495630.303 Z = -508438699.110 Actual distance between Sun and Phoebe body centers: (AU): 9.012 Extra Credit
These ``extra credit'' tasks are provided as task statements, and unlike the regular tasks, no approach or solution source code is provided. In the next section, you will find the numeric solutions (when applicable) and answers to the questions asked in these tasks. Task statements and questions
Solutions and answers
% CSPICE_SPKEZR: SPICE(SPKINSUFFDATA): [spkezr_c->SPKEZR->SPKEZ->SPKACS->SPKGEO] Insufficient ephemeris data has been loaded to compute the state of -82 (CASSINI) relative to 0 (SOLAR SYSTEM BARYCENTER) at the ephemeris epoch 2004 JUN 11 19:33:04.184. (CSPICE_N0067) % Execution halted at: GETSTA 42 /home/bsemenov/tmp/lessons_230301/lessons/remote_sensing/getsta .pro % $MAIN$
BRIEF -- Version 4.1.0, September 17, 2021 -- Toolkit Version N0067 Summary for: kernels/spk/981005_PLTEPH-DE405S.bsp Bodies: MERCURY BARYCENTER (1) w.r.t. SOLAR SYSTEM BARYCENTER (0) VENUS BARYCENTER (2) w.r.t. SOLAR SYSTEM BARYCENTER (0) EARTH BARYCENTER (3) w.r.t. SOLAR SYSTEM BARYCENTER (0) MARS BARYCENTER (4) w.r.t. SOLAR SYSTEM BARYCENTER (0) JUPITER BARYCENTER (5) w.r.t. SOLAR SYSTEM BARYCENTER (0) SATURN BARYCENTER (6) w.r.t. SOLAR SYSTEM BARYCENTER (0) URANUS BARYCENTER (7) w.r.t. SOLAR SYSTEM BARYCENTER (0) NEPTUNE BARYCENTER (8) w.r.t. SOLAR SYSTEM BARYCENTER (0) PLUTO BARYCENTER (9) w.r.t. SOLAR SYSTEM BARYCENTER (0) SUN (10) w.r.t. SOLAR SYSTEM BARYCENTER (0) MERCURY (199) w.r.t. MERCURY BARYCENTER (1) VENUS (299) w.r.t. VENUS BARYCENTER (2) MOON (301) w.r.t. EARTH BARYCENTER (3) EARTH (399) w.r.t. EARTH BARYCENTER (3) MARS (499) w.r.t. MARS BARYCENTER (4) Start of Interval (UTC) End of Interval (UTC) ----------------------------- ------------------------- ---- 2004-JUN-11 05:00:00.000 2004-JUN-12 12:00:00.000 Summary for: kernels/spk/020514_SE_SAT105.bsp Bodies: MIMAS (601) w.r.t. SATURN BARYCENTER (6) ENCELADUS (602) w.r.t. SATURN BARYCENTER (6) TETHYS (603) w.r.t. SATURN BARYCENTER (6) DIONE (604) w.r.t. SATURN BARYCENTER (6) RHEA (605) w.r.t. SATURN BARYCENTER (6) TITAN (606) w.r.t. SATURN BARYCENTER (6) HYPERION (607) w.r.t. SATURN BARYCENTER (6) IAPETUS (608) w.r.t. SATURN BARYCENTER (6) PHOEBE (609) w.r.t. SATURN BARYCENTER (6) SATURN (699) w.r.t. SATURN BARYCENTER (6) Start of Interval (UTC) End of Interval (UTC) ----------------------------- ------------------------- ---- 2004-JUN-11 05:00:00.000 2004-JUN-12 12:00:00.000 Summary for: kernels/spk/030201AP_SK_SM546_T45.bsp Body: CASSINI (-82) w.r.t. SATURN BARYCENTER (6) Start of Interval (UTC) End of Interval (UTC) ----------------------------- --------------------------- -- 2004-JUN-11 05:00:00.000 2004-JUN-12 12:00:00.000
Additional kernels required for this task: File name Contents ----------------------- ---------------------------------- jup310_2004.bsp Generic Jovian Satellite Ephemeris available in the NAIF server at: https://naif.jpl.nasa.gov/pub/naif/generic_kernels/spk/satellites/
Actual position of Jupiter as seen from Saturn in the J2000 frame (km): X = -436016583.291 Y = -1094176737.323 Z = -446585337.431
Actual (geometric) position of Sun as seen from Saturn in the J2000 frame (km): X = 367770592.367 Y = -1197330367.359 Z = -510369088.677 Light-time corrected position of Sun as seen from Saturn in the J2000 frame (km): X = 367770572.921 Y = -1197330417.733 Z = -510369109.509 Apparent position of Sun as seen from Saturn in the J2000 frame (km): X = 367726456.168 Y = -1197342627.879 Z = -510372252.747 Spacecraft Orientation and Reference Frames (xform)Task Statement
Learning Goals
Approach
You may find it useful to consult the permuted index, the headers of various source modules, and the following toolkit documentation:
SolutionSolution Meta-Kernel
KPL/MK This is the meta-kernel used in the solution of the ``Spacecraft Orientation and Reference Frames'' task in the Remote Sensing Hands On Lesson. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents -------------------------- ----------------------------- naif0008.tls Generic LSK cas00084.tsc Cassini SCLK 981005_PLTEPH-DE405S.bsp Solar System Ephemeris 020514_SE_SAT105.bsp Saturnian Satellite Ephemeris 030201AP_SK_SM546_T45.bsp Cassini Spacecraft SPK cas_v37.tf Cassini FK 04135_04171pc_psiv2.bc Cassini Spacecraft CK cpck05Mar2004.tpc Cassini Project PCK \begindata KERNELS_TO_LOAD = ( 'kernels/lsk/naif0008.tls', 'kernels/sclk/cas00084.tsc', 'kernels/spk/981005_PLTEPH-DE405S.bsp', 'kernels/spk/020514_SE_SAT105.bsp', 'kernels/spk/030201AP_SK_SM546_T45.bsp', 'kernels/fk/cas_v37.tf', 'kernels/ck/04135_04171pc_psiv2.bc', 'kernels/pck/cpck05Mar2004.tpc' ) \begintext Solution Source Code
PRO xform ;; ;; Local Parameters ;; METAKR = 'xform.tm' STRLEN = 50 utctim = '' ;; ;; Load the kernels that this program requires. We ;; will need: ;; ;; A leapseconds kernel ;; A spacecraft clock kernel for CASSINI ;; The necessary ephemerides ;; A planetary constants file (PCK) ;; A spacecraft orientation kernel for CASSINI (CK) ;; A frame kernel (TF) ;; cspice_furnsh, METAKR ;; ;; Prompt the user for the input time string. ;; read, utctim, PROMPT = 'Input UTC Time: ' print, 'Converting UTC Time: ', utctim ;; ;; Convert utctim to et. ;; cspice_str2et, utctim, et print, FORMAT='(A,F16.3)', ' ET seconds past J2000: ', et ;; ;; Compute the apparent state of Phoebe as seen from ;; CASSINI in the J2000 frame. All of the ephemeris ;; readers return states in units of kilometers and ;; kilometers per second. ;; cspice_spkezr, 'PHOEBE' , et , 'J2000', 'LT+S', $ 'CASSINI', state, ltime ;; ;; Now obtain the transformation from the inertial ;; J2000 frame to the non-inertial body-fixed IAU_PHOEBE ;; frame. Since we want the apparent state in the ;; IAU_PHOEBE reference frame, we need to correct the ;; orientation and angular velocity of this frame ;; for one-way light time; hence we subtract ltime from ;; et in the call below. ;; cspice_sxform, 'J2000', 'IAU_PHOEBE', et-ltime, sxfmat ;; ;; Now transform the apparent J2000 state into IAU_PHOEBE ;; with the following matrix multiplication: ;; bfixst = transpose(sxfmat) # state ;; ;; Display the results. ;; print, ' Apparent state of Phoebe as seen ' +$ 'from CASSINI in the IAU_PHOEBE' print, ' body-fixed frame (km, km/s):' print, FORMAT='(A,F19.6)', ' X = ', bfixst[0] print, FORMAT='(A,F19.6)', ' Y = ', bfixst[1] print, FORMAT='(A,F19.6)', ' Z = ', bfixst[2] print, FORMAT='(A,F19.6)', ' VX = ', bfixst[3] print, FORMAT='(A,F19.6)', ' VY = ', bfixst[4] print, FORMAT='(A,F19.6)', ' VZ = ', bfixst[5] ;; ;; It is worth pointing out, all of the above could ;; have been done with a single use of cspice_spkezr: ;; ;; cspice_spkezr, 'PHOEBE' , et , 'IAU_PHOEBE', 'LT+S', $ 'CASSINI', state, ltime ;; ;; Display the results. ;; print, ' Apparent state of Phoebe as seen ' +$ 'from CASSINI in the IAU_PHOEBE' print, ' body-fixed frame (km, km/s) ' +$ 'obtained using cspice_spkezr' print, ' directly:' print, FORMAT='(A,F19.6)', ' X = ', state[0] print, FORMAT='(A,F19.6)', ' Y = ', state[1] print, FORMAT='(A,F19.6)', ' Z = ', state[2] print, FORMAT='(A,F19.6)', ' VX = ', state[3] print, FORMAT='(A,F19.6)', ' VY = ', state[4] print, FORMAT='(A,F19.6)', ' VZ = ', state[5] ;; ;; Note that the velocity found by using cspice_spkezr ;; to compute the state in the IAU_PHOEBE frame differs ;; at the few mm/second level from that found previously ;; by calling cspice_spkezr and then cspice_sxform. Computing ;; velocity via a single call to cspice_spkezr as we've ;; done immediately above is slightly more accurate because ;; it accounts for the effect of the rate of change of ;; light time on the apparent angular velocity of the ;; target's body-fixed reference frame. ;; ;; Now we are to compute the angular separation between ;; the apparent position of the Earth as seen from the ;; orbiter and the nominal boresight of the high gain ;; antenna. First, compute the apparent position of ;; the Earth as seen from CASSINI in the J2000 frame. ;; cspice_spkpos, 'EARTH' , et, 'J2000', 'LT+S', $ 'CASSINI', pos, ltime ;; ;; Now compute the location of the antenna boresight ;; at this same epoch. From reading the frame kernel ;; we know that the antenna boresight is nominally the ;; +Z axis of the CASSINI_HGA frame defined there. ;; bsight = [ 0.D0, 0.D0, 1.D0] ;; ;; Now compute the rotation matrix from CASSINI_HGA into ;; J2000. ;; cspice_pxform, 'CASSINI_HGA', 'J2000', et, pform ;; ;; And multiply the result to obtain the nominal ;; antenna boresight in the J2000 reference frame. ;; cspice_mxv, pform, bsight, bsight ;; ;; Lastly compute the angular separation. ;; cspice_convrt, cspice_vsep(bsight, pos), 'RADIANS', $ 'DEGREES', sep print, ' Angular separation between the ' +$ 'apparent position of' print, ' Earth and the CASSINI high ' +$ 'gain antenna boresight (degrees):' print, FORMAT='(A,F16.3)', ' ', sep ;; ;; Or alternatively we can work in the antenna ;; frame directly. ;; cspice_spkpos, 'EARTH' , et , 'CASSINI_HGA', 'LT+S', $ 'CASSINI', pos, ltime ;; ;; The antenna boresight is the Z-axis in the ;; CASSINI_HGA frame. ;; bsight = [ 0.D0, 0.D0, 1.D0] ;; ;; Lastly compute the angular separation. ;; cspice_convrt, cspice_vsep(bsight, pos), 'RADIANS', $ 'DEGREES', sep print, ' Angular separation between the ' +$ 'apparent position of' print, ' Earth and the CASSINI high ' +$ 'gain antenna boresight computed' print, ' using vectors in the CASSINI_HGA ' +$ 'frame (degrees):' print, FORMAT='(A,F16.3)', ' ', sep cspice_kclear END Solution Sample Output
Input UTC Time: 2004 jun 11 19:32:00 Converting UTC Time: 2004 jun 11 19:32:00 ET seconds past J2000: 140254384.185 Apparent state of Phoebe as seen from CASSINI in the IAU_PHOEBE body-fixed frame (km, km/s): X = -1982.639762 Y = -934.530471 Z = -166.562595 VX = 3.970833 VY = -3.812498 VZ = -2.371663 Apparent state of Phoebe as seen from CASSINI in the IAU_PHOEBE body-fixed frame (km, km/s) obtained using cspice_spkezr directly: X = -1982.639762 Y = -934.530471 Z = -166.562595 VX = 3.970832 VY = -3.812496 VZ = -2.371663 Angular separation between the apparent position of Earth and the CASSINI high gain antenna boresight (degrees): 71.924 Angular separation between the apparent position of Earth and the CASSINI high gain antenna boresight computed using vectors in the CASSINI_HGA frame (degrees): 71.924 Extra Credit
These ``extra credit'' tasks are provided as task statements, and unlike the regular tasks, no approach or solution source code is provided. In the next section, you will find the numeric solutions (when applicable) and answers to the questions asked in these tasks. Task statements and questions
Solutions and answers
% CSPICE_PXFORM: SPICE(NOFRAMECONNECT): [pxform_c->PXFORM->REFCHG] At epoch 1.4025036418463E+08 TDB (2004 JUN 11 18:26:04.184 TDB), there is insufficient information available to transform from reference frame -82101 (CASSINI_HGA) to reference frame 1 (J2000). Frame CASSINI_HGA could be transformed to frame -82000 (CASSINI_SC_COORD). The latter is a CK frame; a CK file containing data for instrument or structure -82000 at the epoch shown above, as well as a corresponding SCLK kernel, must be loaded in order to use this frame. Failure to find required CK data could be due to one or more CK files not having been loaded, or to the epoch shown above lying within a coverage gap or beyond the coverage bounds of the loaded CK files. It is also possible that no loaded CK file has required angular velocity data for the input epoch, even if a loaded CK does have attitude data for that epoch. You can use CKBRIEF with the -dump option to display coverage intervals of a CK file. (CSPICE_N0067) % Execution halted at: XFORM 134 /home/bsemenov/tmp/lessons_230301/lessons/remote_sensing/xform. pro % $MAIN$
CKBRIEF -- Version 6.1.0, June 27, 2014 -- Toolkit Version N0067 Summary for: kernels/ck/04135_04171pc_psiv2.bc Segment No.: 1 Object: -82000 Interval Begin UTC Interval End UTC AV ------------------------ ------------------------ --- 2004-JUN-11 05:00:00.000 2004-JUN-11 09:25:02.019 Y 2004-JUN-11 09:26:14.019 2004-JUN-11 18:24:37.152 Y 2004-JUN-11 18:26:13.152 2004-JUN-12 05:53:26.012 Y 2004-JUN-12 05:54:56.012 2004-JUN-12 10:32:08.016 Y 2004-JUN-12 10:33:26.016 2004-JUN-12 11:59:59.998 Y
CKBRIEF -- Version 6.1.0, June 27, 2014 -- Toolkit Version N0067 Summary for: kernels/ck/04135_04171pc_psiv2.bc Object: -82000 Interval Begin UTC Interval End UTC AV ------------------------ ------------------------ --- 2004-JUN-11 05:00:00.000 2004-JUN-12 11:59:59.998 Y
Angular separation between the apparent position of the Sun and the nominal boresight of the CASSINI high gain antenna (degrees): 73.130 HGA illumination: CASSINI high gain antenna IS illuminated.
Computing Sub-s/c and Sub-solar Points on an Ellipsoid and a DSK (subpts)Task Statement
near point/ellipsoiddefinition, and once using a DSK shape model and the
nadir/dsk/unprioritizeddefinition. The program displays the results. Use the program to compute these quantities at "2004 jun 11 19:32:00" UTC. Learning Goals
Approach
One point worth considering: how would the results change if the sub-solar and sub-observer points were computed using the
intercept/ellipsoidand
intercept/dsk/unprioritizeddefinitions? Which definition is appropriate? SolutionSolution Meta-Kernel
KPL/MK This is the meta-kernel used in the solution of the ``Computing Sub-spacecraft and Sub-solar Points'' task in the Remote Sensing Hands On Lesson. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents -------------------------- ----------------------------- naif0008.tls Generic LSK 981005_PLTEPH-DE405S.bsp Solar System Ephemeris 020514_SE_SAT105.bsp Saturnian Satellite Ephemeris 030201AP_SK_SM546_T45.bsp Cassini Spacecraft SPK cpck05Mar2004.tpc Cassini Project PCK phoebe_64q.bds Phoebe DSK \begindata KERNELS_TO_LOAD = ( 'kernels/lsk/naif0008.tls', 'kernels/spk/981005_PLTEPH-DE405S.bsp', 'kernels/spk/020514_SE_SAT105.bsp', 'kernels/spk/030201AP_SK_SM546_T45.bsp', 'kernels/pck/cpck05Mar2004.tpc' 'kernels/dsk/phoebe_64q.bds' ) \begintext Solution Source Code
PRO subpts ;; ;; Local Parameters ;; METAKR = 'subpts.tm' STRLEN = 50 utctim = '' ;; ;; Load the kernels that this program requires. We ;; will need: ;; ;; A leapseconds kernel ;; The necessary ephemerides ;; A planetary constants file (PCK) ;; A DSK file containing Phoebe shape data ;; cspice_furnsh, METAKR ;; ;; Prompt the user for the input time string. ;; read, utctim, PROMPT = 'Input UTC Time: ' print, 'Converting UTC Time: ', utctim ;; ;; Convert utctim to et. ;; cspice_str2et, utctim, et print, FORMAT='(A,F16.3)', ' ET seconds past J2000: ', et for i = 0, 1 do begin if i eq 0 then begin ;; ;; Use the "near point" sub-point definition ;; and an ellipsoidal model. ;; method = 'NEAR POINT/Ellipsoid' endif else begin ;; ;; Use the "nadir" sub-point definition ;; and a DSK model. ;; method = 'NADIR/DSK/Unprioritized' endelse print print, FORMAT='(A)', ' Sub-point/target shape model: ' $ + method print ;; ;; Compute the apparent sub-observer point of CASSINI ;; on Phoebe. ;; cspice_subpnt, method, $ 'PHOEBE', et, 'IAU_PHOEBE', 'LT+S', $ 'CASSINI', spoint, trgepc, srfvec print, ' Apparent sub-observer point of CASSINI ' +$ 'on Phoebe in the' print, ' IAU_PHOEBE frame (km):' print, FORMAT='(A,F16.3)', ' X = ', spoint[0] print, FORMAT='(A,F16.3)', ' Y = ', spoint[1] print, FORMAT='(A,F16.3)', ' Z = ', spoint[2] print, FORMAT='(A,F16.3)', ' ALT = ', cspice_vnorm(srfvec) ;; ;; Compute the apparent sub-solar point on Phoebe ;; as seen from CASSINI. ;; cspice_subslr, method, $ 'PHOEBE', et, 'IAU_PHOEBE', 'LT+S', $ 'CASSINI', spoint, trgepc, srfvec print, ' Apparent sub-solar point on Phoebe ' +$ 'as seen from CASSINI in' print, ' the IAU_PHOEBE frame (km):' print, FORMAT='(A,F16.3)', ' X = ', spoint[0] print, FORMAT='(A,F16.3)', ' Y = ', spoint[1] print, FORMAT='(A,F16.3)', ' Z = ', spoint[2] endfor print cspice_unload, METAKR END Solution Sample Output
Input UTC Time: 2004 jun 11 19:32:00 Converting UTC Time: 2004 jun 11 19:32:00 ET seconds past J2000: 140254384.185 Sub-point/target shape model: NEAR POINT/Ellipsoid Apparent sub-observer point of CASSINI on Phoebe in the IAU_PHOEBE frame (km): X = 104.498 Y = 45.269 Z = 7.383 ALT = 2084.116 Apparent sub-solar point on Phoebe as seen from CASSINI in the IAU_PHOEBE frame (km): X = 78.681 Y = 76.879 Z = -21.885 Sub-point/target shape model: NADIR/DSK/Unprioritized Apparent sub-observer point of CASSINI on Phoebe in the IAU_PHOEBE frame (km): X = 95.373 Y = 40.948 Z = 6.610 ALT = 2094.242 Apparent sub-solar point on Phoebe as seen from CASSINI in the IAU_PHOEBE frame (km): X = 79.111 Y = 77.338 Z = -22.028 Extra Credit
These ``extra credit'' tasks are provided as task statements, and unlike the regular tasks, no approach or solution source code is provided. In the next section, you will find the numeric solutions (when applicable) and answers to the questions asked in these tasks. Task statements and questions
Solutions and answers
Apparent sub-solar point on Phoebe as seen from CASSINI in the IAU_PHOEBE frame using the 'Near Point: ellipsoid' method (km): X = 78.681 Y = 76.879 Z = -21.885 Apparent sub-solar point on Phoebe as seen from CASSINI in the IAU_PHOEBE frame using the 'Intercept: ellipsoid' method (km): X = 74.542 Y = 79.607 Z = -24.871
Geometric sub-spacecraft point of CASSINI on Phoebe in the IAU_PHOEBE frame using the 'Near Point: ellipsoid' method (km): X = 104.497 Y = 45.270 Z = 7.384
Planetocentric coordinates of the CASSINI sub-spacecraft point on Phoebe (degrees, km): LAT = 3.710 LON = 23.423 R = 114.121 Planetographic coordinates of the CASSINI sub-spacecraft point on Phoebe (degrees, km): LAT = 4.454 LON = 336.577 ALT = -0.831
Intersecting Vectors with an Ellipsoid and a DSK (fovint)Task Statement
At each point of intersection compute the following:
Additionally compute the local solar time at the intercept of the camera boresight with the surface of Phoebe, using both ellipsoidal and DSK shape models. Use this program to compute values at the epoch:
Learning Goals
Approach
SolutionSolution Meta-Kernel
KPL/MK This is the meta-kernel used in the solution of the ``Intersecting Vectors with a Triaxial Ellipsoid'' task in the Remote Sensing Hands On Lesson. The names and contents of the kernels referenced by this meta-kernel are as follows: File name Contents -------------------------- ----------------------------- naif0008.tls Generic LSK cas00084.tsc Cassini SCLK 981005_PLTEPH-DE405S.bsp Solar System Ephemeris 020514_SE_SAT105.bsp Saturnian Satellite Ephemeris 030201AP_SK_SM546_T45.bsp Cassini Spacecraft SPK cas_v37.tf Cassini FK 04135_04171pc_psiv2.bc Cassini Spacecraft CK cpck05Mar2004.tpc Cassini Project PCK cas_iss_v09.ti ISS Instrument Kernel phoebe_64q.bds Phoebe DSK \begindata KERNELS_TO_LOAD = ( 'kernels/lsk/naif0008.tls', 'kernels/sclk/cas00084.tsc', 'kernels/spk/981005_PLTEPH-DE405S.bsp', 'kernels/spk/020514_SE_SAT105.bsp', 'kernels/spk/030201AP_SK_SM546_T45.bsp', 'kernels/fk/cas_v37.tf', 'kernels/ck/04135_04171pc_psiv2.bc', 'kernels/pck/cpck05Mar2004.tpc', 'kernels/ik/cas_iss_v09.ti' 'kernels/dsk/phoebe_64q.bds' ) \begintext Solution Source Code
PRO fovint ;; ;; Local Parameters ;; METAKR = 'fovint.tm' STRLEN = 50 boolstr = [ 'false', 'true' ] ;; ;; BCVLEN is the maximum number of boundary corner ;; vectors we can retrieve. We've extended this array by 1 ;; element to make room for the boresight vector. ;; BCVLEN = 5 utctim = '' scan_vecs = dblarr( 3, BCVLEN ) vecnam = ['Boundary Corner 1', $ 'Boundary Corner 2', $ 'Boundary Corner 3', $ 'Boundary Corner 4', $ 'Cassini NAC Boresight' ] ;; ;; Load the kernels that this program requires. We ;; will need: ;; ;; A leapseconds kernel. ;; A SCLK kernel for CASSINI. ;; Any necessary ephemerides. ;; The CASSINI frame kernel. ;; A CASSINI C-kernel. ;; A PCK file with Phoebe constants. ;; The CASSINI ISS I-kernel. ;; A DSK file containing Phoebe shape data. ;; cspice_furnsh, METAKR ;; ;; Prompt the user for the input time string. ;; read, utctim, PROMPT = 'Input UTC Time: ' print, 'Converting UTC Time: ', utctim ;; ;; Convert utctim to et. ;; cspice_str2et, utctim, et print, FORMAT='(A,F16.3)', ' ET seconds past J2000: ', et print ;; ;; Now we need to obtain the FOV configuration of ;; the ISS NAC camera. ;; cspice_getfvn, 'CASSINI_ISS_NAC', BCVLEN, shape, insfrm, $ bsight, bounds ;; ;; Rather than treat 'bsight' as a separate vector, ;; copy it and 'bounds' to 'scan_vecs'. ;; scan_vecs[ 0:11] = bounds[0:11] scan_vecs[12:14] = bsight[0:2] ;; ;; Set values of "method" string that specify use of ;; ellipsoidal and DSK (topographic) shape models. ;; ;; In this case, we can use the same methods for calls to both ;; cspice_sincpt and cspice_ilumin. Note that some SPICE routines ;; require different "method" inputs from those shown here. See ;; the API documentation of each routine for details. ;; method = [ 'Ellipsoid', 'DSK/Unprioritized' ] ;; ;; Get Phoebe ID. We'll use this ID code later, when we ;; compute local solar time. ;; cspice_bodn2c, 'PHOEBE', phoeid, found ;; ;; The ID code for PHOEBE is built in to the library. ;; However, it is good programming practice to get ;; in the habit of checking your found-flags. ;; Return if the code was not found. ;; if ( ~found ) then begin print, 'Unable to locate the ID code for Phoebe.' return endif ;; ;; Now perform the same set of calculations for each ;; vector listed in the 'bounds' array. ;; for i = 0, 4 do begin print, 'Vector: ', vecnam[i] for j = 0, 1 do begin print print, FORMAT = '(A)', ' Target shape model: ' + method[j] print ;; ;; Call sincpt to determine coordinates of the ;; intersection of this vector with the surface ;; of Phoebe. ;; cspice_sincpt, method[j], 'PHOEBE', et, $ 'IAU_PHOEBE', 'LT+S', 'CASSINI', $ insfrm, scan_vecs[*,i], point, $ trgepc, srfvec, found ;; ;; Check the found flag. Display a message if ;; the point of intersection was not found, ;; otherwise continue with the calculations. ;; if ( ~ found ) then begin print, 'No intersection point found at ' +$ 'this epoch for this vector.' endif else begin ;; ;; Now, we have discovered a point of intersection. ;; Start by displaying the position vector in the ;; IAU_PHOEBE frame of the intersection. ;; print, ' Position vector of surface intercept ' +$ 'in the IAU_PHOEBE frame (km):' print, FORMAT='(A,F16.3)', ' X = ', point[0] print, FORMAT='(A,F16.3)', ' Y = ', point[1] print, FORMAT='(A,F16.3)', ' Z = ', point[2] ;; ;; Display the planetocentric latitude and longitude ;; of the intercept. ;; cspice_reclat, point, radius, lon, lat print, ' Planetocentric coordinates of ' +$ 'the intercept (degrees):' print, FORMAT='(A,F16.3)', ' LAT = ', $ lat * cspice_dpr() print, FORMAT='(A,F16.3)', ' LON = ', $ lon * cspice_dpr() ;; ;; Compute the illumination angles at this ;; point. ;; cspice_illumf, method[j], 'PHOEBE', 'SUN', $ et, 'IAU_PHOEBE', 'LT+S', $ 'CASSINI', point, trgepc, $ srfvec, phase, solar, $ emissn, visibl, lit print, FORMAT='(A,F16.3)', $ ' Phase angle (degrees): ', $ phase * cspice_dpr() print, FORMAT='(A,F16.3)', $ ' Solar incidence angle (degrees): ', $ solar * cspice_dpr() print, FORMAT='(A,F16.3)', $ ' Emission angle (degrees): ', $ emissn * cspice_dpr() print, FORMAT='(A)', $ ' Observer visible: ' + boolstr[visibl] print, FORMAT='(A)', $ ' Sun visible: ' + boolstr[lit] ;; ;; Lastly compute the local solar time at the boresight ;; intersection. ;; if i eq 4 then begin ;; Compute local solar time corresponding to ;; the TDB light time corrected epoch at the ;; intercept. ;; cspice_et2lst, trgepc, phoeid, lon, 'PLANETOCENTRIC',$ hr, min, sc, time, ampm print print, ' Local Solar Time at boresight ' +$ 'intercept (24 Hour Clock):' print, ' ' + time endif ;; ;; End of LST computation block. ;; endelse ;; ;; End of intercept processing block. ;; endfor ;; ;; End of shape model loop. ;; print endfor ;; ;; End of vector loop. ;; cspice_kclear END Solution Sample Output
Input UTC Time: 2004 jun 11 19:32:00 Converting UTC Time: 2004 jun 11 19:32:00 ET seconds past J2000: 140254384.185 Vector: Boundary Corner 1 Target shape model: Ellipsoid Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 91.026 Y = 67.190 Z = 2.030 Planetocentric coordinates of the intercept (degrees): LAT = 1.028 LON = 36.432 Phase angle (degrees): 28.110 Solar incidence angle (degrees): 16.121 Emission angle (degrees): 14.627 Observer visible: true Sun visible: true Target shape model: DSK/Unprioritized Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 78.770 Y = 61.570 Z = 0.964 Planetocentric coordinates of the intercept (degrees): LAT = 0.552 LON = 38.013 Phase angle (degrees): 28.110 Solar incidence angle (degrees): 31.132 Emission angle (degrees): 16.539 Observer visible: true Sun visible: true Vector: Boundary Corner 2 Target shape model: Ellipsoid Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 89.991 Y = 66.726 Z = 14.733 Planetocentric coordinates of the intercept (degrees): LAT = 7.492 LON = 36.556 Phase angle (degrees): 27.894 Solar incidence angle (degrees): 22.894 Emission angle (degrees): 14.988 Observer visible: true Sun visible: true Target shape model: DSK/Unprioritized Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 76.586 Y = 60.579 Z = 13.657 Planetocentric coordinates of the intercept (degrees): LAT = 7.962 LON = 38.344 Phase angle (degrees): 27.894 Solar incidence angle (degrees): 32.013 Emission angle (degrees): 11.845 Observer visible: true Sun visible: true Vector: Boundary Corner 3 Target shape model: Ellipsoid Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 80.963 Y = 76.643 Z = 14.427 Planetocentric coordinates of the intercept (degrees): LAT = 7.373 LON = 43.430 Phase angle (degrees): 28.171 Solar incidence angle (degrees): 21.315 Emission angle (degrees): 21.977 Observer visible: true Sun visible: true Target shape model: DSK/Unprioritized Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 68.677 Y = 71.100 Z = 13.444 Planetocentric coordinates of the intercept (degrees): LAT = 7.745 LON = 45.993 Phase angle (degrees): 28.171 Solar incidence angle (degrees): 36.039 Emission angle (degrees): 14.474 Observer visible: true Sun visible: true Vector: Boundary Corner 4 Target shape model: Ellipsoid Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 81.997 Y = 77.106 Z = 1.698 Planetocentric coordinates of the intercept (degrees): LAT = 0.865 LON = 43.239 Phase angle (degrees): 28.385 Solar incidence angle (degrees): 13.882 Emission angle (degrees): 21.763 Observer visible: true Sun visible: true Target shape model: DSK/Unprioritized Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 73.186 Y = 73.131 Z = 0.934 Planetocentric coordinates of the intercept (degrees): LAT = 0.517 LON = 44.978 Phase angle (degrees): 28.385 Solar incidence angle (degrees): 41.268 Emission angle (degrees): 17.493 Observer visible: true Sun visible: true Vector: Cassini NAC Boresight Target shape model: Ellipsoid Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 86.390 Y = 72.089 Z = 8.255 Planetocentric coordinates of the intercept (degrees): LAT = 4.196 LON = 39.844 Phase angle (degrees): 28.139 Solar incidence angle (degrees): 18.247 Emission angle (degrees): 17.858 Observer visible: true Sun visible: true Local Solar Time at boresight intercept (24 Hour Clock): 11:31:50 Target shape model: DSK/Unprioritized Position vector of surface intercept in the IAU_PHOEBE frame (km): X = 74.326 Y = 66.602 Z = 7.247 Planetocentric coordinates of the intercept (degrees): LAT = 4.153 LON = 41.863 Phase angle (degrees): 28.139 Solar incidence angle (degrees): 33.200 Emission angle (degrees): 9.230 Observer visible: true Sun visible: true Local Solar Time at boresight intercept (24 Hour Clock): 11:39:55 Extra Credit
|