spkcvt_c |

Table of contents## Procedurespkcvt_c ( SPK, constant velocity target state ) void spkcvt_c ( ConstSpiceDouble trgsta [6], SpiceDouble trgepc, ConstSpiceChar * trgctr, ConstSpiceChar * trgref, SpiceDouble et, ConstSpiceChar * outref, ConstSpiceChar * refloc, ConstSpiceChar * abcorr, ConstSpiceChar * obsrvr, SpiceDouble state [6], SpiceDouble * lt ) ## AbstractReturn the state, relative to a specified observer, of a target having constant velocity in a specified reference frame. The target's state is provided by the calling program rather than by loaded SPK files. ## Required_ReadingFRAMES PCK SPK TIME ## KeywordsEPHEMERIS ## Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- trgsta I Target state relative to center of motion. trgepc I Epoch of target state. trgctr I Center of motion of target. trgref I Frame of target state. et I Observation epoch. outref I Reference frame of output state. refloc I Output reference frame evaluation locus. abcorr I Aberration correction. obsrvr I Name of observing ephemeris object. state O State of target with respect to observer. lt O One way light time between target and observer. ## Detailed_Inputtrgsta is the geometric state of a target moving at constant velocity relative to its center of motion `trgctr', expressed in the reference frame `trgref', at the epoch `trgepc'. `trgsta' is a six-dimensional vector representing position and velocity in cartesian coordinates: the first three components represent the position of a target relative to its center of motion; the last three components represent the velocity of the target. Units are always km and km/sec. trgepc is the epoch, expressed as seconds past J2000 TDB, at which the target state `trgsta' is applicable. For other epochs, the position of the target relative to its center of motion is linearly extrapolated from the position at `trgepc' using the velocity component of `trgsta'. `trgepc' is independent of the epoch `et' at which the state of the target relative to the observer is to be computed. trgctr is the name of the center of motion of `trgsta'. The ephemeris of `trgctr' is provided by loaded SPK files. Optionally, you may supply the integer ID code for the object as an integer string. For example both "MOON" and "301" are legitimate strings that indicate the moon is the center of motion. Case and leading and trailing blanks are not significant in the string `trgctr'. trgref is the name of the reference frame relative to which the input state `trgsta' is expressed. The target has constant velocity relative to its center of motion in this reference frame. Case and leading and trailing blanks are not significant in the string `trgref'. et is the ephemeris time at which the state of the target relative to the observer is to be computed. `et' is expressed as seconds past J2000 TDB. `et' refers to time at the observer's location. `et' is independent of the target epoch `trgepc'. outref is the name of the reference frame with respect to which the output state is expressed. When `outref' is time-dependent (non-inertial), its orientation relative to the J2000 frame is evaluated in the manner commanded by the input argument `refloc' (see description below). Case and leading and trailing blanks are not significant in the string `outref'. refloc is a string indicating the output reference frame evaluation locus: this is the location associated with the epoch at which this routine is to evaluate the orientation, relative to the J2000 frame, of the output frame `outref'. The values and meanings of `refloc' are: "OBSERVER" Evaluate `outref' at the observer's epoch `et'. Normally the locus "OBSERVER" should be selected when `outref' is centered at the observer. "TARGET" Evaluate `outref' at the target epoch; letting `lt' be the one-way light time between the target and observer, the target epoch is et-lt if reception aberration corrections are used et+lt if transmission aberration corrections are used et if no aberration corrections are used Normally the locus "TARGET" should be selected when `outref' is `trgref', the frame in which the target state is specified. "CENTER" Evaluate the frame `outref' at the epoch associated its center. This epoch, which we'll call `etctr', is determined as follows: Let `ltctr' be the one-way light time between the observer and the center of `outref'. Then `etctr' is et-ltctr if reception aberration corrections are used et+ltctr if transmission aberration corrections are used et if no aberration corrections are used The locus "CENTER" should be selected when the user intends to obtain results compatible with those produced by spkezr_c. When `outref' is inertial, all choices of `refloc' yield the same results. Case and leading and trailing blanks are not significant in the string `refloc'. abcorr indicates the aberration corrections to be applied to observer-target state to account for one-way light time and stellar aberration. `abcorr' may be any of the following: "NONE" Apply no correction. Return the geometric state of the target relative to the observer. The following values of `abcorr' apply to the "reception" case in which photons depart from the target's location at the light-time corrected epoch et-lt and *arrive* at the observer's location at `et': "LT" Correct for one-way light time (also called "planetary aberration") using a Newtonian formulation. This correction yields the state of the target at the moment it emitted photons arriving at the observer at `et'. The light time correction uses an iterative solution of the light time equation. The solution invoked by the "LT" option uses one iteration. "LT+S" Correct for one-way light time and stellar aberration using a Newtonian formulation. This option modifies the state obtained with the "LT" option to account for the observer's velocity relative to the solar system barycenter. The result is the apparent state of the target---the position and velocity of the target as seen by the observer. "CN" Converged Newtonian light time correction. In solving the light time equation, the "CN" correction iterates until the solution converges. "CN+S" Converged Newtonian light time and stellar aberration corrections. The following values of `abcorr' apply to the "transmission" case in which photons *depart* from the observer's location at `et' and arrive at the target's location at the light-time corrected epoch et+lt: "XLT" "Transmission" case: correct for one-way light time using a Newtonian formulation. This correction yields the state of the target at the moment it receives photons emitted from the observer's location at `et'. "XLT+S" "Transmission" case: correct for one-way light time and stellar aberration using a Newtonian formulation This option modifies the state obtained with the "XLT" option to account for the observer's velocity relative to the solar system barycenter. The position component of the computed target state indicates the direction that photons emitted from the observer's location must be "aimed" to hit the target. "XCN" "Transmission" case: converged Newtonian light time correction. "XCN+S" "Transmission" case: converged Newtonian light time and stellar aberration corrections. Neither special nor general relativistic effects are accounted for in the aberration corrections applied by this routine. Case and leading and trailing blanks are not significant in the string `abcorr'. obsrvr is the name of an observing body. Optionally, you may supply the ID code of the object as an integer string. For example, both "EARTH" and "399" are legitimate strings to supply to indicate the observer is Earth. Case and leading and trailing blanks are not significant in the string `obsrvr'. ## Detailed_Outputstate is a Cartesian state vector representing the position and velocity of the target relative to the specified observer. `state' is corrected for the specified aberrations and is expressed with respect to the reference frame specified by `outref'. The first three components of `state' represent the x-, y- and z-components of the target's position; the last three components form the corresponding velocity vector. The position component of `state' points from the observer's location at `et' to the aberration-corrected location of the target. Note that the sense of the position vector is independent of the direction of radiation travel implied by the aberration correction. The velocity component of `state' is the derivative with respect to time of the position component of `state'. Units are always km and km/sec. When `state' is expressed in a time-dependent (non-inertial) output frame, the orientation of that frame relative to the J2000 frame is evaluated in the manner indicated by the input argument `refloc' (see description above). lt is the one-way light time between the observer and target in seconds. If the target state is corrected for aberrations, then `lt' is the one-way light time between the observer and the light time corrected target location. ## ParametersNone. ## Exceptions1) If either the name of the center of motion or the observer cannot be translated to its NAIF ID code, the error SPICE(IDCODENOTFOUND) is signaled by a routine in the call tree of this routine. 2) If the reference frame `outref' is unrecognized, the error SPICE(UNKNOWNFRAME) is signaled by a routine in the call tree of this routine. 3) If the reference frame `trgref' is unrecognized, an error is signaled by a routine in the call tree of this routine. 4) If the frame evaluation locus `refloc' is not recognized, the error SPICE(NOTSUPPORTED) is signaled by a routine in the call tree of this routine. 5) If the loaded kernels provide insufficient data to compute the requested state vector, an error is signaled by a routine in the call tree of this routine. 6) If an error occurs while reading an SPK or other kernel file, the error is signaled by a routine in the call tree of this routine. 7) If the aberration correction `abcorr' is not recognized, an error is signaled by a routine in the call tree of this routine. 8) If any of the `trgctr', `trgref', `outref', `refloc', `abcorr', `obsrvr' or `trgsta' input string pointers is null, the error SPICE(NULLPOINTER) is signaled. 9) If any of the `trgctr', `trgref', `outref', `refloc', `abcorr' or `obsrvr' input strings has zero length, the error SPICE(EMPTYSTRING) is signaled. ## FilesAppropriate kernels must be loaded by the calling program before this routine is called. The following data are required: - SPK data: ephemeris data for target center and observer must be loaded. If aberration corrections are used, the states of target center and observer relative to the solar system barycenter must be calculable from the available ephemeris data. Typically ephemeris data are made available by loading one or more SPK files using furnsh_c. The following data may be required: - PCK data: if the target frame is a PCK frame, rotation data for the target frame must be loaded. These may be provided in a text or binary PCK file. - Frame data: if a frame definition not built into SPICE is required, for example to convert the observer-target state to the output frame, that definition must be available in the kernel pool. Typically frame definitions are supplied by loading a frame kernel using furnsh_c. - Additional kernels: if any frame used in this routine's state computation is a CK frame, then at least one CK and corresponding SCLK kernel is required. If dynamic frames are used, additional SPK, PCK, CK, or SCLK kernels may be required. In all cases, kernel data are normally loaded once per program run, NOT every time this routine is called. ## ParticularsThis routine computes observer-target states for targets whose trajectories are not provided by SPK files. Targets supported by this routine must have constant velocity with respect to a specified center of motion, expressed in a caller-specified reference frame. The state of the center of motion relative to the observer must be computable using loaded SPK data. For applications in which the target has zero velocity relative to its center of motion, the CSPICE routine spkcpt_c { SPK, constant position target } can be used. spkcpt_c has a simpler interface than that of ## ExamplesThe numerical results shown for this example may differ across platforms. The results depend on the SPICE kernels used as input, the compiler and supporting libraries, and the machine specific arithmetic implementation. 1) Demonstrate use of this routine; in particular demonstrate applications of the output frame evaluation locus. The following program is not necessarily realistic: for brevity, it combines several unrelated computations. Task Description ================ Find the state of a given surface point on earth, corrected for light time and stellar aberration, relative to the Mars Global Surveyor spacecraft, expressed in the earth fixed reference frame ITRF93. The selected point is the position of the DSN station DSS-14. Contrast the states computed by setting the output frame evaluation locus to "TARGET" and to "CENTER". Show that the latter choice produces results very close to those that can be obtained using spkezr_c. Also compute the state of a selected Mars surface point as seen from MGS. The point we'll use is the narrow angle MOC boresight surface intercept corresponding to the chosen observation time. Express the state in a spacecraft-centered reference frame. Use the output frame evaluation locus "OBSERVER" for this computation. The observation epoch is 2003 OCT 13 06:00:00 UTC. Kernels ======= Use the meta-kernel shown below to load the required SPICE kernels. KPL/MK File name: spkcvt_ex1.tm This is the meta-kernel file for the header code example for the subroutine ## Restrictions1) This routine may not be suitable for work with stars or other objects having large distances from the observer, due to loss of precision in position vectors. ## Literature_ReferencesNone. ## Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) S.C. Krening (JPL) B.V. Semenov (JPL) ## Version-CSPICE Version 1.0.2, 05-AUG-2021 (JDR) Edited the header to comply with NAIF standard. Modified code example output format for the solutions to fit within the -Examples section without modifications. -CSPICE Version 1.0.1, 08-SEP-2015 (NJB) The -Exceptions section of the header was updated to mention exceptions involving null pointers and empty input strings. -CSPICE Version 1.0.0, 27-MAR-2012 (NJB) (SCK) (BVS) ## Index_Entriesstate of constant_velocity_target state of surface_point on extended_object state of landmark on extended_object |

Fri Dec 31 18:41:12 2021