dvcrss_c |

Table of contents## Proceduredvcrss_c ( Derivative of Vector cross product ) void dvcrss_c ( ConstSpiceDouble s1 [6], ConstSpiceDouble s2 [6], SpiceDouble sout[6] ) ## AbstractCompute the cross product of two 3-dimensional vectors and the derivative of this cross product. ## Required_ReadingNone. ## KeywordsDERIVATIVE VECTOR ## Brief_I/OVARIABLE I/O DESCRIPTION -------- --- -------------------------------------------------- s1 I Left hand state for cross product and derivative. s2 I Right hand state for cross product and derivative. sout O State associated with cross product of positions. ## Detailed_Inputs1 is any state vector. Typically, this might represent the apparent state of a planet or the Sun, which defines the orientation of axes of some coordinate system. s2 is any state vector. ## Detailed_Outputsout is the state associated with the cross product of the position components of `s1' and `s2'. In other words, if `s1' = (p1,v1) and `s2' = (p2,v2) then `sout' is ( p1xp2, d/dt( p1xp2 ) ). ## ParametersNone. ## ExceptionsError free. 1) If `s1' and `s2' are large in magnitude (taken together, their magnitude surpasses the limit allowed by the computer) then it may be possible to generate a floating point overflow from an intermediate computation even though the actual cross product and derivative may be well within the range of double precision numbers. ## FilesNone. ## Particulars
## ExamplesThe numerical results shown for these examples 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) Compute the cross product of two 3-dimensional vectors and the derivative of this cross product. Example code begins here. /. Program dvcrss_ex1 ./ #include <stdio.h> #include "SpiceUsr.h" int main( ) { /. Local variables ./ SpiceDouble sout [6]; SpiceInt i; /. Set `s1' and `s2' vectors. ./ SpiceDouble s1 [2][6] = { {0.0, 1.0, 0.0, 1.0, 0.0, 0.0}, {5.0, 5.0, 5.0, 1.0, 0.0, 0.0} }; SpiceDouble s2 [2][6] = { { 1.0, 0.0, 0.0, 1.0, 0.0, 0.0}, {-1.0, -1.0, -1.0, 2.0, 0.0, 0.0} }; /. For each vector `s1' and `s2', compute their cross product and its derivative. ./ for ( i = 0; i < 2; i++ ) { ## RestrictionsNone. ## Literature_ReferencesNone. ## Author_and_InstitutionJ. Diaz del Rio (ODC Space) E.D. Wright (JPL) ## Version-CSPICE Version 1.0.1, 06-JUL-2021 (JDR) Edited the header to comply with NAIF standard. Added complete code examples. -CSPICE Version 1.0.0, 23-NOV-2009 (EDW) ## Index_EntriesCompute the derivative of a cross product |

Fri Dec 31 18:41:05 2021