Table of contents
CSPICE_EDLIMB calculates the limb of a triaxial ellipsoid
as viewed from a specified location.
Given an ellipsoid centered at the origin:
a,
b,
c the scalar double precision lengths of the semi-axes of a
triaxial ellipsoid.
help, a
DOUBLE = Scalar
help, b
DOUBLE = Scalar
help, c
DOUBLE = Scalar
The ellipsoid is centered at the origin and oriented so that
its axes lie on the x, y and z axes. `a', `b', and `c' are the
lengths of the semi-axes that respectively point in the x, y,
and z directions.
viewpt a point from which the ellipsoid is viewed.
help, viewpt
DOUBLE = Array[3]
`viewpt' must be outside of the ellipsoid.
the call:
cspice_edlimb, a, b, c, viewpt, limb
returns:
limb the scalar SPICE ellipse structure that represents the limb of the
ellipsoid observed from `viewpt'.
help, limb
STRUCT = CSPICE_ELLIPSE
The structure has the fields:
center: dblarr(3)
semimajor: dblarr(3)
semiminor: dblarr(3)
None.
Any numerical results shown for these examples may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
1) Given an ellipsoid and a viewpoint exterior to it, calculate
the limb ellipse as seen from that viewpoint.
Example code begins here.
PRO edlimb_ex1
;;
;; Define an ellipsoid
;;
a = sqrt(2.d)
b = 2.d*sqrt(2.d)
c = sqrt(2.d)
;;
;; Locate a viewpoint exterior to the ellipsoid.
;;
viewpt = [ 2.d, 0.d, 0.d ]
;;
;; Calculate the limb ellipse as seen by from the
;; viewpoint.
;;
cspice_edlimb, a, b, c, viewpt, limb
;;
;; Output the structure components.
;;
print, 'Semiminor axis: ', limb.semiminor
print, 'Semimajor axis: ', limb.semimajor
print, 'Limb center : ', limb.center
;;
;; Check against expected values:
;;
;; Semiminor: 0.d, 0.d, -1.d
;; Semimajor: 0.d, 2.d, 0.d
;; Center : 1.d, 0.d, 0.d
;;
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
Semiminor axis: 0.0000000 0.0000000 -1.0000000
Semimajor axis: 0.0000000 2.0000000 -0.0000000
Limb center : 1.0000000 0.0000000 0.0000000
2) We'd like to find the apparent limb of Jupiter, corrected for
light time and stellar aberration, as seen from JUNO
spacecraft's position at a given UTC time.
Use the meta-kernel shown below to load the required SPICE
kernels.
KPL/MK
File name: edlimb_ex2.tm
This meta-kernel is intended to support operation of SPICE
example programs. The kernels shown here should not be
assumed to contain adequate or correct versions of data
required by SPICE-based user applications.
In order for an application to use this meta-kernel, the
kernels referenced here must be present in the user's
current working directory.
The names and contents of the kernels referenced
by this meta-kernel are as follows:
File name Contents
--------- --------
juno_rec_160522_160729_160909.bsp JUNO s/c ephemeris
pck00010.tpc Planet orientation
and radii
naif0012.tls Leapseconds
\begindata
KERNELS_TO_LOAD = ( 'juno_rec_160522_160729_160909.bsp',
'pck00010.tpc',
'naif0012.tls' )
\begintext
End of meta-kernel
Example code begins here.
PRO edlimb_ex2
;;
;; Local parameters.
;;
UTCSTR = '2016 Jul 14 19:45:00'
;;
;; Load the required kernels.
;;
cspice_furnsh, 'edlimb_ex2.tm'
;;
;; Find the viewing point in Jupiter-fixed coordinates. To
;; do this, find the apparent position of Jupiter as seen
;; from the spacecraft in Jupiter-fixed coordinates and
;; negate this vector. In this case we'll use light time
;; and stellar aberration corrections to arrive at the
;; apparent limb. `jpos' is the Jupiter's position as seen
;; from the spacecraft. `scpos' is the spacecraft's position
;; relative to Jupiter.
;;
cspice_str2et, UTCSTR, et
cspice_spkpos, 'JUPITER', et, 'J2000', 'LT+S', 'JUNO', jpos, ltime
cspice_vminus, jpos, scpos
;;
;; Get Jupiter's semi-axis lengths...
;;
cspice_bodvrd, 'JUPITER', 'RADII', 3, rad
;;
;; ...and the transformation from J2000 to Jupiter
;; equator and prime meridian coordinates. Note that we
;; use the orientation of Jupiter at the time of
;; emission of the light that arrived at the
;; spacecraft at time `et'.
;;
cspice_pxform, 'J2000', 'IAU_JUPITER', et-ltime, tipm
;;
;; Transform the spacecraft's position into Jupiter-
;; fixed coordinates.
;;
cspice_mxv, tipm, scpos, scpjfc
;;
;; Find the apparent limb. `limb' is a SPICE ellipse
;; representing the limb.
;;
cspice_edlimb, rad[0], rad[1], rad[2], scpjfc, limb
;;
;; LCENTR, `smajor', and `sminor' are the limb's center,
;; semi-major axis of the limb, and a semi-minor axis
;; of the limb. We obtain these from `limb' using the
;; Icy routine cspice_el2cgv ( Ellipse to center and
;; generating vectors ).
;;
cspice_el2cgv, limb, center, smajor, sminor
;;
;; Output the structure components.
;;
print, format='(A)', 'Apparent limb of Jupiter as seen from JUNO:'
print, format='(2A)', ' UTC time : ', UTCSTR
print, format='(A,3F14.6)', ' Semi-minor axis:', sminor[0], $
sminor[1], sminor[2]
print, format='(A,3F14.6)', ' Semi-major axis:', smajor[0], $
smajor[1], smajor[2]
print, format='(A,3F14.6)', ' Center :', center[0], $
center[1], center[2]
;;
;; It's always good form to unload kernels after use,
;; particularly in IDL due to data persistence.
;;
cspice_kclear
END
When this program was executed on a Mac/Intel/IDL8.x/64-bit
platform, the output was:
Apparent limb of Jupiter as seen from JUNO:
UTC time : 2016 Jul 14 19:45:00
Semi-minor axis: 12425.547643 -5135.572410 65656.053303
Semi-major axis: 27305.667297 66066.222576 -0.000000
Center : 791.732472 -327.228993 -153.408849
The limb of a body, as seen from a viewing point, is the boundary
of the portion of the body's surface that is visible from that
viewing point. In this definition, we consider a surface point
to be `visible' if it can be connected to the viewing point by a
line segment that doesn't pass through the body. This is a purely
geometrical definition that ignores the matter of which portions
of the surface are illuminated, or whether the view is obscured by
any additional objects.
If a body is modeled as a triaxial ellipsoid, the limb is always
an ellipse. The limb is determined by its center, a semi-major
axis vector, and a semi-minor axis vector.
We note that the problem of finding the limb of a triaxial
ellipsoid is mathematically identical to that of finding its
terminator, if one makes the simplifying assumption that the
terminator is the limb of the body as seen from the vertex of the
umbra. So, this routine can be used to solve this simplified
version of the problem of finding the terminator.
1) If the length of any semi-axis of the ellipsoid is
non-positive, the error SPICE(INVALIDAXISLENGTH) is signaled
by a routine in the call tree of this routine. `limb' is not
modified.
2) If the length of any semi-axis of the ellipsoid is zero after
the semi-axis lengths are scaled by the reciprocal of the
magnitude of the longest semi-axis and then squared, the error
SPICE(DEGENERATECASE) is signaled by a routine in the call
tree of this routine. `limb' is not modified.
3) If the viewing point `viewpt' is inside the ellipse, the error
SPICE(INVALIDPOINT) is signaled by a routine in the call tree
of this routine. `limb' is not modified.
4) If the geometry defined by the input ellipsoid and viewing
point is so extreme that the limb cannot be found, the error
SPICE(DEGENERATECASE) is signaled by a routine in the call
tree of this routine.
5) If the shape of the ellipsoid and the viewing geometry are
such that the limb is an excessively flat ellipsoid, the
limb may be a degenerate ellipse. You must determine whether
this possibility poses a problem for your application.
6) If any of the input arguments, `a', `b', `c' or `viewpt', is
undefined, an error is signaled by the IDL error handling
system.
7) If any of the input arguments, `a', `b', `c' or `viewpt', is
not of the expected type, or it does not have the expected
dimensions and size, an error is signaled by the Icy
interface.
8) If the output argument `limb' is not a named variable, an
error is signaled by the Icy interface.
None.
None.
ICY.REQ
ELLIPSES.REQ
None.
J. Diaz del Rio (ODC Space)
E.D. Wright (JPL)
-Icy Version 1.0.2, 13-AUG-2021 (JDR)
Edited the -Examples section to comply with NAIF standard. Added
example's problem statement and a second example.
Added -Parameters, -Exceptions, -Files, -Restrictions,
-Literature_References and -Author_and_Institution sections.
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, 20-JUN-2011 (EDW)
Edits to -I/O and -Particulars sections so as to parallel Mice version.
-Icy Version 1.0.0, 16-JUN-2003 (EDW)
ellipsoid limb
|