Table of contents
CSPICE_VEQUG makes one double precision vector of arbitrary dimension
equal to another.
Given:
vin an arbitrary, double precision n-dimensional vector.
help, vin
DOUBLE = Array[N]
the call:
cspice_vequg, vin, vout
returns:
vout a double precision n-dimensional vector set equal to `vin'.
help, vout
DOUBLE = Array[N]
None.
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.
1) Lets assume we have a pointing record that contains the
start time of an interpolation interval, the components of
the quaternion that represents the C-matrix associated with
the start time of the interval, and the angular velocity vector
of the interval. The following example demonstrates how to
extract the time, the quaternion and the angular velocity
vector into separate variables for their processing.
Example code begins here.
PRO vequg_ex1
;;
;; Define the pointing record. We would normally obtain it
;; from, e.g. CK readers, or other non SPICE data files.
;;
record = [ 283480.753D0, 0.99999622D0, 0.D0, 0.D0, $
-0.0027499965D0, 0.D0, 0.D0, 0.01D0 ]
;;
;; Get the time, quaternion and angular velocity vector
;; into separate variables.
;;
time = record[0]
cspice_vequg, record[1:4], quat
cspice_vequ, record[5:7], av
;;
;; Display the contents of the variables.
;;
print, format='(A,F11.3)', 'Time :', time
print, format='(A)', 'Quaternion :'
print, format='(4F15.10)', quat
print, format='(A)', 'Angular velocity:'
print, format='(3F15.10)', av
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
Time : 283480.753
Quaternion :
0.9999962200 0.0000000000 0.0000000000 -0.0027499965
Angular velocity:
0.0000000000 0.0000000000 0.0100000000
The code simply sets each component of `vout' equal to the
corresponding component of `vin'.
The IDL native code to perform the same operation:
vout = vin
The IDL '=' operator accepts arbitrary size vectors.
1) If the input argument `vin' is undefined, an error is signaled
by the IDL error handling system.
2) If the input argument `vin' is not of the expected type, or it
does not have the expected dimensions and size, an error is
signaled by the Icy interface.
3) If the output argument `vout' is not a named variable, an
error is signaled by the Icy interface.
None.
None.
ICY.REQ
None.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.0.2, 10-AUG-2021 (JDR)
Edited the header to comply with NAIF standard. Added complete
code examples.
Added -Parameters, -Exceptions, -Files, -Restrictions,
-Literature_References and -Author_and_Institution sections, and
completed -Particulars section. Moved the contents of the existing
-Examples section to -Particulars.
Removed reference to the routine's corresponding CSPICE header from
-Abstract section.
Added arguments' type and size information in the -I/O section.
-Icy Version 1.0.1, 09-DEC-2005 (EDW)
Added -Examples section.
-Icy Version 1.0.0, 16-JUN-2003 (EDW)
assign an n-dimensional vector to another
|