vrel_c |

Table of contents## Procedurevrel_c ( Vector relative difference, 3 dimensions ) SpiceDouble vrel_c ( ConstSpiceDouble v1[3], ConstSpiceDouble v2[3] ) ## AbstractReturn the relative difference between two 3-dimensional vectors. ## Required_ReadingNone. ## KeywordsMATH VECTOR ## Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- v1, v2 I Input vectors. The function returns the relative difference between two 3-dimensional vectors. ## Detailed_Inputv1, v2 are two 3-dimensional vectors for which the relative difference is to be computed. ## Detailed_OutputThe function returns the relative difference between the two input 3-dimensional vectors `v1' and `v2'. It is defined as: || v1 - v2 || ## ParametersNone. ## ExceptionsError free. 1) If both `v1' and `v2' are zero vectors, then ## FilesNone. ## ParticularsThis function computes the relative difference between two 3-dimensional vectors as defined above. The function vrelg_c may be used to find the relative difference for two vectors of general dimension. ## ExamplesThis example code fragment computes the relative difference between the geometric and light time corrected state of Io with respect to Voyager 2 at a given UTC time. #include "SpiceUsr.h" . . . /. The NAIF integer code for Io is 501 and the code for Voyager 2 is -32. ./ #define IO 501 #define VG2 -32 /. Local variables ./ SpiceDouble state [ 6 ]; SpiceDouble pos1 [ 3 ]; SpiceDouble pos2 [ 3 ]; SpiceDouble diff; SpiceDouble lt; SpiceDouble et; SpiceChar * utc = "1979 JUN 25 12:00:00"; /. Load the sample SPK ephemeris file. ./ furnsh_c ( "VG2_JUP.BSP" ); /. Convert the UTC time string to ephemeris time. ./ utc2et_c ( utc, &et ); /. First calculate the geometric state and then the light time corrected state. ./ spkez_c ( IO, et, "J2000", "none", VG2, state, < ); vequ_c ( state, pos1 ); spkez_c ( IO, et, "J2000", "lt", VG2, state, < ); vequ_c ( state, pos2 ); /. Call ## RestrictionsNone. ## Literature_ReferencesNone. ## Author_and_InstitutionN.J. Bachman (JPL) J. Diaz del Rio (ODC Space) J.M. Lynch (JPL) E.D. Wright (JPL) ## Version-CSPICE Version 1.1.1, 09-APR-2021 (JDR) Edited the header to comply with NAIF standard. -CSPICE Version 1.1.0, 28-AUG-2001 (NJB) Include interface macro definition file SpiceZim.h. -CSPICE Version 1.0.1, 13-APR-2000 (NJB) Made some minor updates and corrections in the code example. -CSPICE Version 1.0.0, 06-JUL-1999 (EDW) (JML) ## Index_Entriesrelative difference of 3-dimensional vectors |

Fri Dec 31 18:41:15 2021