pub struct SpiceLock { /* private fields */ }lock only.Expand description
A wrapper singleton struct around the API to prevent concurrent calls to SPICE functions from multiple threads.
Exposes all functions as methods with identical signatures besides the added &self argument.
Only available with the lock feature enabled.
Implementations§
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn try_acquire() -> Result<Self, &'static str>
pub fn try_acquire() -> Result<Self, &'static str>
Attempt to create a SpiceLock instance.
Will be Err if an instance already exists.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn timout(&self, et: f64, pictur: &str) -> String
Available on non-crate feature lock only.
pub fn timout(&self, et: f64, pictur: &str) -> String
lock only.This routine converts an input epoch represented in TDB seconds past the TDB epoch of J2000 to a character string formatted to the specifications of a user’s format picture.
See raw::timout for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn dskx02(
&self,
handle: i32,
dladsc: DLADSC,
vertex: [f64; 3],
raydir: [f64; 3],
) -> (i32, [f64; 3], bool)
Available on non-crate feature lock only.
pub fn dskx02( &self, handle: i32, dladsc: DLADSC, vertex: [f64; 3], raydir: [f64; 3], ) -> (i32, [f64; 3], bool)
lock only.Determine the plate ID and body-fixed coordinates of the intersection of a specified ray with the surface defined by a type 2 DSK plate model.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn illumf(
&self,
method: &str,
target: &str,
ilusrc: &str,
et: f64,
fixref: &str,
abcorr: &str,
obsrvr: &str,
spoint: [f64; 3],
) -> (f64, [f64; 3], f64, f64, f64, bool, bool)
Available on non-crate feature lock only.
pub fn illumf( &self, method: &str, target: &str, ilusrc: &str, et: f64, fixref: &str, abcorr: &str, obsrvr: &str, spoint: [f64; 3], ) -> (f64, [f64; 3], f64, f64, f64, bool, bool)
lock only.Compute the illumination angles—phase, incidence, and emission—at a specified point on a target body. Return logical flags indicating whether the surface point is visible from the observer’s position and whether the surface point is illuminated.
The target body’s surface is represented using topographic data provided by DSK files, or by a reference ellipsoid.
The illumination source is a specified ephemeris object.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn occult(
&self,
targ1: &str,
shape1: &str,
frame1: &str,
targ2: &str,
shape2: &str,
frame2: &str,
abcorr: &str,
obsrvr: &str,
et: f64,
) -> i32
Available on non-crate feature lock only.
pub fn occult( &self, targ1: &str, shape1: &str, frame1: &str, targ2: &str, shape2: &str, frame2: &str, abcorr: &str, obsrvr: &str, et: f64, ) -> i32
lock only.Determines the occultation condition (not occulted, partially, etc.) of one target relative to another target as seen by an observer at a given time, with targets modeled as points, ellipsoids, or digital shapes (DSK)
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn sincpt(
&self,
method: &str,
target: &str,
et: f64,
fixred: &str,
abcorr: &str,
obsrvr: &str,
dref: &str,
dvec: [f64; 3],
) -> ([f64; 3], f64, [f64; 3], bool)
Available on non-crate feature lock only.
pub fn sincpt( &self, method: &str, target: &str, et: f64, fixred: &str, abcorr: &str, obsrvr: &str, dref: &str, dvec: [f64; 3], ) -> ([f64; 3], f64, [f64; 3], bool)
lock only.Compute, for a given observer and a ray emanating from the observer, the surface intercept of the ray on a target body at a specified epoch, optionally corrected for light time and stellar aberration.
The surface of the target body may be represented by a triaxial ellipsoid or by topographic data provided by DSK files.
This routine supersedes srfxpt.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkezr(
&self,
targ: &str,
et: f64,
frame: &str,
abcorr: &str,
obs: &str,
) -> ([f64; 6], f64)
Available on non-crate feature lock only.
pub fn spkezr( &self, targ: &str, et: f64, frame: &str, abcorr: &str, obs: &str, ) -> ([f64; 6], f64)
lock only.Return the state (position and velocity) of a target body relative to an observing body, optionally corrected for light time (planetary aberration) and stellar aberration.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SpiceLock
impl !RefUnwindSafe for SpiceLock
impl Send for SpiceLock
impl !Sync for SpiceLock
impl Unpin for SpiceLock
impl UnwindSafe for SpiceLock
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.