CSPICE_PSV2PL returns a SPICE plane given a point and two spanning vectors.
For important details concerning this module's function, please refer to
the CSPICE routine psv2pl_c.
Given:
point a double precision 3vector
span1 a double precision 3vector
span2 a double precision 3vector
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:
cspice_psv2pl, point, span1, span2, plane
returns:
plane a structure representing the SPICE plane as
defined by 'point', 'span1', and 'span2'. The
structure has the fields:
plane.normal: [3array double]
plane.constant: [scalar double]
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. Use the Ecliptic J2000 frame
;; as a conceptual convenience, however the result is
;; invariant with respect to an inertial frame.
;;
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
;;
cspice_str2et, epoch, et
;;
;; Calculate the orbit plane of the Earth about
;; the solar system barycenter at epoch.
;;
cspice_spkezr, 'EARTH', et, frame, corr, $
'Solar System Barycenter', state, ltime
cspice_psv2pl, state[0:2], state[0:2], state[3:5], es_plane
cspice_pl2nvc, es_plane, es_norm, es_const
;;
;; Calculate the orbit plane of the Moon with respect to
;; the EarthMoon barycenter at epoch.
;;
cspice_spkezr, 'MOON', et, frame, corr, $
'EARTH BARYCENTER', state, ltime
cspice_psv2pl, state[0:2], state[0:2], state[3:5], em_plane
cspice_pl2nvc, em_plane, em_norm, em_const
;;
;; Calculate the inclination (output in degrees) from
;; the angle between the plane normals.
;;
;; 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 GT cspice_halfpi() ) then begin
loc_inc = cspice_pi()  loc_inc
endif
print, 'MoonEarth orbit plane inclination (degrees): ', $
loc_inc * cspice_dpr()
IDL outputs:
MoonEarth orbit plane inclination (degrees): 5.0424957
Icy 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 Icy 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 Icy 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.
ICY.REQ
PLANES.REQ
Icy Version 1.0.1, 01SEP2010, EDW (JPL)
Improved the I/O section. The section now meets NAIF standard
for Icy headers. Improved Particulars section.
Corrected example code to perform described function.
Icy Version 1.0.0, 16JUN2003, EDW (JPL)
point and spanning vectors to plane
