CSPICE_PSV2PL returns a SPICE plane given a point and two
spanning vectors.
Given:
point [3,1] = size(point); double = class(point)
span1 [3,1] = size(span1); double = class(span1)
span2 [3,1] = size(span2); double = class(span2)
are, respectively, a point and two spanning vectors
that define a geometric plane in threedimensional
space. The plane is the set of vectors
point + s * span1 + t * span2
where 's' and 't' are real numbers. The spanning
vectors 'span1' and 'span2' must be linearly
independent, but they need not be orthogonal or
unitized.
the call:
[plane] = cspice_psv2pl(point, span1, span2 )
returns:
plane a structure describing a SPICE plane defined
by 'point', 'span1', and 'span2'.
[1,1] = size(plane); struct = class(plane)
The structure has the fields:
normal: [3,1] = size(normal); double = class(normal)
constant: [1,1] = size(constant); double = class(constant)
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.
%
% Calculate the inclination of the Moon's orbit plane about
% the Earth to the orbit plane of the Earth around the sun.
%
% We want a geometric analysis, so the calculation requires
% no aberration correction.
%
epoch = 'Jan 1 2005';
frame = 'ECLIPJ2000';
corr = 'NONE';
%
% Load the kernels we need to retrieve state data.
%
cspice_furnsh( 'standard.tm' )
%
% Convert the time string to ephemeris time
%
et = cspice_str2et( epoch );
%
% Calculate the orbit plane of the Earth about
% the solar system barycenter at epoch.
%
[state, ltime] = cspice_spkezr( 'EARTH', et, frame, corr, ...
'Solar System Barycenter' );
es_plane = cspice_psv2pl( state(1:3), ...
state(1:3), ...
state(4:6) );
[es_norm, es_const] = cspice_pl2nvc( es_plane );
%
% Calculate the orbit plane of the Moon with respect to
% the EarthMoon barycenter at epoch.
%
[state, ltime] = cspice_spkezr( 'MOON', et, frame, corr, ...
'EARTH BARYCENTER' );
em_plane = cspice_psv2pl( state(1:3), ...
state(1:3), ...
state(4:6) );
[em_norm, em_const] = cspice_pl2nvc( em_plane );
%
% Calculate the inclination equals (output in degrees).
% Depending on the orientation of the plane normals, the
% cspice_vsep result may exceed 90 degrees. If, so subtract
% the value off 180 degrees.
%
loc_inc = cspice_vsep( es_norm, em_norm );
if ( loc_inc > cspice_halfpi )
loc_inc = cspice_pi  loc_inc;
end
fprintf( 'MoonEarth orbit plane inclination (degrees): %f\n', ...
loc_inc * cspice_dpr )
Matlab outputs:
MoonEarth orbit plane inclination (degrees): 5.042496
Mice geometry routines that deal with planes use the `plane'
data type to represent input and output planes. This data type
makes the subroutine interfaces simpler and more uniform.
The Mice routines that produce SPICE planes from data that
define a plane are:
cspice_nvc2pl ( Normal vector and constant to plane )
cspice_nvp2pl ( Normal vector and point to plane )
cspice_psv2pl ( Point and spanning vectors to plane )
The Mice routines that convert SPICE planes to data that
define a plane are:
cspice_pl2nvc ( Plane to normal vector and constant )
cspice_pl2nvp ( Plane to normal vector and point )
cspice_pl2psv ( Plane to point and spanning vectors )
Any of these last three routines may be used to convert this
routine's output, 'plane', to another representation of a
geometric plane.
For important details concerning this module's function, please refer to
the CSPICE routine psv2pl_c.
MICE.REQ
PLANES.REQ
Mice Version 1.0.0, 27AUG2012, EDW (JPL)
plane to point and spanning vectors
