cspice_vsep

 Abstract I/O Examples Particulars Required Reading Version Index_Entries

#### Abstract

```
CSPICE_VSEP returns the separation angle in radians between
two double precision, 3-vectors. This angle is defined as zero
if either vector is zero.

```

#### I/O

```
Given:

v1   an arbitrary vector(s).

[3,n] = size(v1); double = class(v1)

v2   another arbitrary vector(s).

[3,n] = size(v2); double = class(v2)

'v1' or 'v2' or both may be the zero vector.

An implicit assumption exists that 's1' and 's2' are specified
in the same reference frame using the same coordinate system.
If this is not the case, the numerical result has no meaning.

the call:

vsep = cspice_vsep(v1, v2)

returns:

vsep   the value(s) of the angular separation between 'v1' and 'v2'
expressed in radians. If either 'v1' or 'v2' is the zero
vector, then cspice_vsep return value has value 0 radians.

[1,n] = size(vsep); double = class(vsep)

'sep' returns with the same vectorization measure, N, as
'v1' and 'v2'

```

#### Examples

```
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.

%
% Define a set of vectors, calculate angular
% separation as measured in radians.
%
v1 = [1; 0; 0]
v2 = [1; 0; 0]

sep = cspice_vsep( v1, v2 )

MATLAB outputs:

v1 =

1
0
0

v2 =

1
0
0

sep =

0

%
% Another vector set.
%

v1 = [1; 0; 0]
v2 = [0; 1; 0]

sep = cspice_vsep( v1, v2 )

MATLAB outputs:

v1 =

1
0
0

v2 =

0
1
0

sep =

1.57079632679490

%
% Instead of two calls with 3-vectors,
% vectorize the input as two 3X2 array.
%
v1 = [ [1; 0; 0], [1; 0; 0] ]
v2 = [ [1; 0; 0], [0; 1; 0] ]

sep = cspice_vsep( v1, v2 )

MATLAB outputs:

v1 =

1     1
0     0
0     0

v2 =

1     0
0     1
0     0

sep =

0   1.57079632679490

```

#### Particulars

```
None.

```

```
For important details concerning this module's function, please refer to
the CSPICE routine vsep_c.

MICE.REQ

```

#### Version

```
-Mice Version 1.0.2, 17-DEC-2014, EDW (JPL)

Edited I/O section to conform to NAIF standard for Mice documentation.

Corrections made to version section numbering. 10-APR-2010
notation now numbered as 1.0.1.

-Mice Version 1.0.1, 10-APR-2010, EDW (JPL)

```
`Wed Apr  5 18:00:36 2017`