CSPICE_DVDOT returns the time derivative of the dot product of
two position vectors.
s1 a SPICE state(s);
s1 = (r1, dr1 ).
[6,n] = size(s1); double = class(s1)
s2 a second SPICE state(s);
s2 = (r2, dr2 ).
[6,n] = size(s2); double = class(s2)
An implicit assumption exists that 's1' and 's2' are specified
in the same reference frame. If this is not the case, the numerical
result has no meaning.
dvdot = cspice_dvdot( s1, s2 )
dvdot the time derivative(s) of the dot product between the position
components of 's1' and 's2'.
'dvdot' returns with the same vectorization measure (N)
as 's1' and 's2'.
[1,n] = size(dvdot); double = class(dvdot)
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
Suppose that given two state vectors (s1 and s2) whose position
components are unit vectors, and that we need to compute the
rate of change of the angle between the two vectors.
We know that the Cosine of the angle THETA between them is given
cos(theta) = dot(s1,s2)
Thus by the chain rule, the derivative of the angle is given
sine(theta) dtheta/dt = cspice_dvdot(s1,s2)
Thus for values of theta away from zero we can compute
dtheta = cspice_dvdot(s1,s2) / sqrt( 1 - dot(s1,s2)**2 )
Note that position components of s1 and s2 are parallel, the
derivative of the angle between the positions does not
exist. Any code that computes the derivative of the angle
between two position vectors should account for the case
when the position components are parallel.
In this discussion, the notation
< V1, V2 >
indicates the dot product of vectors V1 and V2.
Given two state vectors s1 and s2 made up of position and velocity
components (r1,v1) and (r2,v2) respectively, cspice_dvdot calculates
the derivative of the dot product of p1 and p2, i.e. the time
-- < r1, r2 > = < v1, r2 > + < r1, v2 >
For important details concerning this module's function, please refer to
the CSPICE routine dvdot_c.
-Mice Version 1.0.0, 20-APR-2010, EDW (JPL)
time derivative of a dot product