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 bodc2s(&self, code: i32) -> String
Available on non-crate feature lock only.
pub fn bodc2s(&self, code: i32) -> String
lock only.Translate a body ID code to either the corresponding name or, if no name exists, the string representation of the code.
See raw::bodc2s for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn frmnam(&self, frcode: i32) -> String
Available on non-crate feature lock only.
pub fn frmnam(&self, frcode: i32) -> String
lock only.Look up the name of a reference frame associated with an ID code.
See raw::frmnam for the raw interface.
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 trcnam(&self, index: i32) -> String
Available on non-crate feature lock only.
pub fn trcnam(&self, index: i32) -> String
lock only.The name of the routine at a given depth in the traceback.
See raw::trcnam for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn lcase(&self, input: &str) -> String
Available on non-crate feature lock only.
pub fn lcase(&self, input: &str) -> String
lock only.Convert a string to lower case.
See raw::lcase for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ucase(&self, input: &str) -> String
Available on non-crate feature lock only.
pub fn ucase(&self, input: &str) -> String
lock only.Convert a string to upper case.
See raw::ucase for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfoclt(
&self,
occtyp: &str,
front: &str,
fshape: &str,
fframe: &str,
back: &str,
bshape: &str,
bframe: &str,
abcorr: &str,
obsrvr: &str,
step: f64,
cnfine: &mut Cell<f64>,
) -> Cell<f64>
Available on non-crate feature lock only.
pub fn gfoclt( &self, occtyp: &str, front: &str, fshape: &str, fframe: &str, back: &str, bshape: &str, bframe: &str, abcorr: &str, obsrvr: &str, step: f64, cnfine: &mut Cell<f64>, ) -> Cell<f64>
lock only.Determine the time windows, within a confinement window, when one body is occulted by or in transit across another, as seen from an observer.
See raw::gfoclt for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfdist(
&self,
target: &str,
abcorr: &str,
obsrvr: &str,
relate: &str,
refval: f64,
adjust: f64,
step: f64,
cnfine: &mut Cell<f64>,
) -> Cell<f64>
Available on non-crate feature lock only.
pub fn gfdist( &self, target: &str, abcorr: &str, obsrvr: &str, relate: &str, refval: f64, adjust: f64, step: f64, cnfine: &mut Cell<f64>, ) -> Cell<f64>
lock only.Search for times when the distance to a target meets a condition.
See raw::gfdist for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfrr(
&self,
target: &str,
abcorr: &str,
obsrvr: &str,
relate: &str,
refval: f64,
adjust: f64,
step: f64,
cnfine: &mut Cell<f64>,
) -> Cell<f64>
Available on non-crate feature lock only.
pub fn gfrr( &self, target: &str, abcorr: &str, obsrvr: &str, relate: &str, refval: f64, adjust: f64, step: f64, cnfine: &mut Cell<f64>, ) -> Cell<f64>
lock only.Search for times when the range rate of a target meets a condition.
See raw::gfrr for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfpa(
&self,
target: &str,
illmn: &str,
abcorr: &str,
obsrvr: &str,
relate: &str,
refval: f64,
adjust: f64,
step: f64,
cnfine: &mut Cell<f64>,
) -> Cell<f64>
Available on non-crate feature lock only.
pub fn gfpa( &self, target: &str, illmn: &str, abcorr: &str, obsrvr: &str, relate: &str, refval: f64, adjust: f64, step: f64, cnfine: &mut Cell<f64>, ) -> Cell<f64>
lock only.Search for times when the phase angle of a target meets a condition.
See raw::gfpa for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfposc(
&self,
target: &str,
frame: &str,
abcorr: &str,
obsrvr: &str,
crdsys: &str,
coord: &str,
relate: &str,
refval: f64,
adjust: f64,
step: f64,
cnfine: &mut Cell<f64>,
) -> Cell<f64>
Available on non-crate feature lock only.
pub fn gfposc( &self, target: &str, frame: &str, abcorr: &str, obsrvr: &str, crdsys: &str, coord: &str, relate: &str, refval: f64, adjust: f64, step: f64, cnfine: &mut Cell<f64>, ) -> Cell<f64>
lock only.Search for times when a coordinate of a target’s position meets a condition.
See raw::gfposc for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfsubc(
&self,
target: &str,
fixref: &str,
method: &str,
abcorr: &str,
obsrvr: &str,
crdsys: &str,
coord: &str,
relate: &str,
refval: f64,
adjust: f64,
step: f64,
cnfine: &mut Cell<f64>,
) -> Cell<f64>
Available on non-crate feature lock only.
pub fn gfsubc( &self, target: &str, fixref: &str, method: &str, abcorr: &str, obsrvr: &str, crdsys: &str, coord: &str, relate: &str, refval: f64, adjust: f64, step: f64, cnfine: &mut Cell<f64>, ) -> Cell<f64>
lock only.Search for times when a coordinate of the sub-observer point meets a condition.
See raw::gfsubc for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfsntc(
&self,
target: &str,
fixref: &str,
method: &str,
abcorr: &str,
obsrvr: &str,
dref: &str,
dvec: [f64; 3],
crdsys: &str,
coord: &str,
relate: &str,
refval: f64,
adjust: f64,
step: f64,
cnfine: &mut Cell<f64>,
) -> Cell<f64>
Available on non-crate feature lock only.
pub fn gfsntc( &self, target: &str, fixref: &str, method: &str, abcorr: &str, obsrvr: &str, dref: &str, dvec: [f64; 3], crdsys: &str, coord: &str, relate: &str, refval: f64, adjust: f64, step: f64, cnfine: &mut Cell<f64>, ) -> Cell<f64>
lock only.Search for times when a coordinate of a ray-surface intercept meets a condition.
See raw::gfsntc for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfsep(
&self,
targ1: &str,
shape1: &str,
frame1: &str,
targ2: &str,
shape2: &str,
frame2: &str,
abcorr: &str,
obsrvr: &str,
relate: &str,
refval: f64,
adjust: f64,
step: f64,
cnfine: &mut Cell<f64>,
) -> Cell<f64>
Available on non-crate feature lock only.
pub fn gfsep( &self, targ1: &str, shape1: &str, frame1: &str, targ2: &str, shape2: &str, frame2: &str, abcorr: &str, obsrvr: &str, relate: &str, refval: f64, adjust: f64, step: f64, cnfine: &mut Cell<f64>, ) -> Cell<f64>
lock only.Search for times when the angular separation of two targets meets a condition.
See raw::gfsep for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfilum(
&self,
method: &str,
angtyp: &str,
target: &str,
illmn: &str,
fixref: &str,
abcorr: &str,
obsrvr: &str,
spoint: [f64; 3],
relate: &str,
refval: f64,
adjust: f64,
step: f64,
cnfine: &mut Cell<f64>,
) -> Cell<f64>
Available on non-crate feature lock only.
pub fn gfilum( &self, method: &str, angtyp: &str, target: &str, illmn: &str, fixref: &str, abcorr: &str, obsrvr: &str, spoint: [f64; 3], relate: &str, refval: f64, adjust: f64, step: f64, cnfine: &mut Cell<f64>, ) -> Cell<f64>
lock only.Search for times when an illumination angle at a surface point meets a condition.
See raw::gfilum for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gftfov(
&self,
inst: &str,
target: &str,
tshape: &str,
tframe: &str,
abcorr: &str,
obsrvr: &str,
step: f64,
cnfine: &mut Cell<f64>,
) -> Cell<f64>
Available on non-crate feature lock only.
pub fn gftfov( &self, inst: &str, target: &str, tshape: &str, tframe: &str, abcorr: &str, obsrvr: &str, step: f64, cnfine: &mut Cell<f64>, ) -> Cell<f64>
lock only.Search for times when a target is in the field of view of an instrument.
See raw::gftfov for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfuds(
&self,
udfuns: UdFuns,
udfunb: UdFunb,
relate: &str,
refval: f64,
adjust: f64,
step: f64,
cnfine: &mut Cell<f64>,
) -> Cell<f64>
Available on non-crate feature lock only.
pub fn gfuds( &self, udfuns: UdFuns, udfunb: UdFunb, relate: &str, refval: f64, adjust: f64, step: f64, cnfine: &mut Cell<f64>, ) -> Cell<f64>
lock only.Search for times when a scalar function the caller supplies meets a condition.
See raw::gfuds for the raw interface.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn bodvrd(&self, bodynm: &str, item: &str, maxn: usize) -> Vec<f64>
Available on non-crate feature lock only.
pub fn bodvrd(&self, bodynm: &str, item: &str, maxn: usize) -> Vec<f64>
lock only.Fetch from the kernel pool the double precision values of an item associated with a body.
At most maxn values are returned; the vector is truncated to the number actually found, and is
empty when the item is not in the pool.
Source§impl SpiceLock
impl SpiceLock
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ckw03(
&self,
handle: i32,
begtim: f64,
endtim: f64,
inst: i32,
frame: &str,
avflag: bool,
segid: &str,
nrec: i32,
sclkdp: &[f64],
quats: &[[f64; 4]],
avvs: &[[f64; 3]],
nints: i32,
starts: &[f64],
)
Available on non-crate feature lock only.
pub fn ckw03( &self, handle: i32, begtim: f64, endtim: f64, inst: i32, frame: &str, avflag: bool, segid: &str, nrec: i32, sclkdp: &[f64], quats: &[[f64; 4]], avvs: &[[f64; 3]], nints: i32, starts: &[f64], )
lock only.Add a type 3 segment to a CK file.
§Panics
Panics if nrec or nints is negative, or larger than the arrays it counts: CSPICE reads exactly
that many records and has no way of knowing how long they are.
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 dskxsi(
&self,
pri: bool,
target: &str,
srflst: &[i32],
et: f64,
fixref: &str,
vertex: [f64; 3],
raydir: [f64; 3],
) -> ([f64; 3], i32, DLADSC, DSKDSC, [f64; 1], [i32; 1], bool)
Available on non-crate feature lock only.
pub fn dskxsi( &self, pri: bool, target: &str, srflst: &[i32], et: f64, fixref: &str, vertex: [f64; 3], raydir: [f64; 3], ) -> ([f64; 3], i32, DLADSC, DSKDSC, [f64; 1], [i32; 1], bool)
lock only.Compute a ray-surface intercept using data provided by multiple loaded DSK segments, and return information about the source of the data defining the surface on which the intercept was found.
srflst is the list of surface IDs to consider; leave it empty to let CSPICE choose.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn dskxv(
&self,
pri: bool,
target: &str,
srflst: &[i32],
et: f64,
fixref: &str,
vtxarr: &[[f64; 3]],
dirarr: &[[f64; 3]],
) -> (Vec<[f64; 3]>, Vec<bool>)
Available on non-crate feature lock only.
pub fn dskxv( &self, pri: bool, target: &str, srflst: &[i32], et: f64, fixref: &str, vtxarr: &[[f64; 3]], dirarr: &[[f64; 3]], ) -> (Vec<[f64; 3]>, Vec<bool>)
lock only.Compute ray-surface intercepts for a set of rays, using data provided by multiple loaded DSK segments.
Returns one intercept and one flag per ray.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn dskmi2(
&self,
vrtces: &[[f64; 3]],
plates: &[[i32; 3]],
finscl: f64,
corscl: i32,
worksz: usize,
voxpsz: usize,
voxlsz: usize,
makvtl: bool,
spxisz: usize,
) -> (Vec<f64>, Vec<i32>)
Available on non-crate feature lock only.
pub fn dskmi2( &self, vrtces: &[[f64; 3]], plates: &[[i32; 3]], finscl: f64, corscl: i32, worksz: usize, voxpsz: usize, voxlsz: usize, makvtl: bool, spxisz: usize, ) -> (Vec<f64>, Vec<i32>)
lock only.Make a spatial index for a DSK type 2 segment, returning its double precision and integer components.
spxisz is the size to allocate for the integer component; see the
C documentation for how to
size it and the work array.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn dskw02(
&self,
handle: i32,
center: i32,
surfce: i32,
dclass: i32,
frame: &str,
corsys: i32,
corpar: &[f64],
mncor1: f64,
mxcor1: f64,
mncor2: f64,
mxcor2: f64,
mncor3: f64,
mxcor3: f64,
first: f64,
last: f64,
vrtces: &[[f64; 3]],
plates: &[[i32; 3]],
spaixd: &[f64],
spaixi: &[i32],
)
Available on non-crate feature lock only.
pub fn dskw02( &self, handle: i32, center: i32, surfce: i32, dclass: i32, frame: &str, corsys: i32, corpar: &[f64], mncor1: f64, mxcor1: f64, mncor2: f64, mxcor2: f64, mncor3: f64, mxcor3: f64, first: f64, last: f64, vrtces: &[[f64; 3]], plates: &[[i32; 3]], spaixd: &[f64], spaixi: &[i32], )
lock only.Write a type 2 segment to a DSK file.
§Panics
Panics if corpar holds fewer than DSK_NSYPAR values: CSPICE reads that many whatever the
coordinate system.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn vtmvg(
&self,
v1: &[f64],
matrix: &[f64],
v2: &[f64],
nrow: usize,
ncol: usize,
) -> f64
Available on non-crate feature lock only.
pub fn vtmvg( &self, v1: &[f64], matrix: &[f64], v2: &[f64], nrow: usize, ncol: usize, ) -> f64
lock only.The quadratic form v1 * matrix * v2, in arbitrary dimension.
matrix is nrow by ncol, stored row by row.
§Panics
Panics if the lengths do not match the dimensions.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn mxmg(
&self,
m1: &[f64],
m2: &[f64],
nr1: usize,
nc1r2: usize,
nc2: usize,
) -> Vec<f64>
Available on non-crate feature lock only.
pub fn mxmg( &self, m1: &[f64], m2: &[f64], nr1: usize, nc1r2: usize, nc2: usize, ) -> Vec<f64>
lock only.Multiply a nr1 by nc1r2 matrix with a nc1r2 by nc2 one, giving nr1 by nc2.
The matrices are stored row by row.
§Panics
Panics if the slice lengths do not match the dimensions.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn mtxmg(
&self,
m1: &[f64],
m2: &[f64],
nc1: usize,
nr1r2: usize,
nc2: usize,
) -> Vec<f64>
Available on non-crate feature lock only.
pub fn mtxmg( &self, m1: &[f64], m2: &[f64], nc1: usize, nr1r2: usize, nc2: usize, ) -> Vec<f64>
lock only.Multiply the transpose of a nr1r2 by nc1 matrix with a nr1r2 by nc2 one, giving nc1 by
nc2.
The matrices are stored row by row.
§Panics
Panics if the slice lengths do not match the dimensions.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn mxmtg(
&self,
m1: &[f64],
m2: &[f64],
nr1: usize,
nc1c2: usize,
nr2: usize,
) -> Vec<f64>
Available on non-crate feature lock only.
pub fn mxmtg( &self, m1: &[f64], m2: &[f64], nr1: usize, nc1c2: usize, nr2: usize, ) -> Vec<f64>
lock only.Multiply a nr1 by nc1c2 matrix with the transpose of a nr2 by nc1c2 one, giving nr1 by
nr2.
The matrices are stored row by row.
§Panics
Panics if the slice lengths do not match the dimensions.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn azlrec(
&self,
range: f64,
az: f64,
el: f64,
azccw: bool,
elplsz: bool,
) -> [f64; 3]
Available on non-crate feature lock only.
pub fn azlrec( &self, range: f64, az: f64, el: f64, azccw: bool, elplsz: bool, ) -> [f64; 3]
lock only.Convert from range, azimuth and elevation to rectangular coordinates.
azccw says whether azimuth increases counterclockwise, elplsz whether elevation is positive
toward +z.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn twovec(
&self,
axdef: [f64; 3],
indexa: i32,
plndef: [f64; 3],
indexp: i32,
) -> [[f64; 3]; 3]
Available on non-crate feature lock only.
pub fn twovec( &self, axdef: [f64; 3], indexa: i32, plndef: [f64; 3], indexp: i32, ) -> [[f64; 3]; 3]
lock only.Find the transformation to the right-handed frame having a given vector as a specified axis and a second given vector lying in a specified coordinate plane.
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.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkcpo(
&self,
target: &str,
et: f64,
outref: &str,
refloc: &str,
abcorr: &str,
obssta: [f64; 6],
obsctr: &str,
obsref: &str,
) -> ([f64; 6], f64)
Available on non-crate feature lock only.
pub fn spkcpo( &self, target: &str, et: f64, outref: &str, refloc: &str, abcorr: &str, obssta: [f64; 6], obsctr: &str, obsref: &str, ) -> ([f64; 6], f64)
lock only.Return the state of a specified target relative to an observer that is described by a constant position in a specified reference frame.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkcpt(
&self,
trgpos: [f64; 3],
trgctr: &str,
trgref: &str,
et: f64,
outref: &str,
refloc: &str,
abcorr: &str,
obsrvr: &str,
) -> ([f64; 6], f64)
Available on non-crate feature lock only.
pub fn spkcpt( &self, trgpos: [f64; 3], trgctr: &str, trgref: &str, et: f64, outref: &str, refloc: &str, abcorr: &str, obsrvr: &str, ) -> ([f64; 6], f64)
lock only.Return the state of a target that is described by a constant position in a specified reference frame, relative to a specified observer.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkcvo(
&self,
target: &str,
et: f64,
outref: &str,
refloc: &str,
abcorr: &str,
obssta: [f64; 6],
obsepc: f64,
obsctr: &str,
obsref: &str,
) -> ([f64; 6], f64)
Available on non-crate feature lock only.
pub fn spkcvo( &self, target: &str, et: f64, outref: &str, refloc: &str, abcorr: &str, obssta: [f64; 6], obsepc: f64, obsctr: &str, obsref: &str, ) -> ([f64; 6], f64)
lock only.Return the state of a specified target relative to an observer that is described by a constant velocity in a specified reference frame.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkcvt(
&self,
trgsta: [f64; 6],
trgepc: f64,
trgctr: &str,
trgref: &str,
et: f64,
outref: &str,
refloc: &str,
abcorr: &str,
obsrvr: &str,
) -> ([f64; 6], f64)
Available on non-crate feature lock only.
pub fn spkcvt( &self, trgsta: [f64; 6], trgepc: f64, trgctr: &str, trgref: &str, et: f64, outref: &str, refloc: &str, abcorr: &str, obsrvr: &str, ) -> ([f64; 6], f64)
lock only.Return the state of a target that is described by a constant velocity in a specified reference frame, relative to a specified observer.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkw09(
&self,
handle: i32,
body: i32,
center: i32,
frame: &str,
first: f64,
last: f64,
segid: &str,
degree: i32,
n: i32,
states: &[[f64; 6]],
epochs: &[f64],
)
Available on non-crate feature lock only.
pub fn spkw09( &self, handle: i32, body: i32, center: i32, frame: &str, first: f64, last: f64, segid: &str, degree: i32, n: i32, states: &[[f64; 6]], epochs: &[f64], )
lock only.Write a type 9 segment to an SPK file.
§Panics
Panics if n is negative, or larger than states or epochs: CSPICE reads exactly n records
from each and has no way of knowing how long they are.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn sincpt(
&self,
method: &str,
target: &str,
et: f64,
fixref: &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, fixref: &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 subpnt(
&self,
method: &str,
target: &str,
et: f64,
fixref: &str,
abcorr: &str,
obsrvr: &str,
) -> ([f64; 3], f64, [f64; 3])
Available on non-crate feature lock only.
pub fn subpnt( &self, method: &str, target: &str, et: f64, fixref: &str, abcorr: &str, obsrvr: &str, ) -> ([f64; 3], f64, [f64; 3])
lock only.Compute the rectangular coordinates of the sub-observer point on a target body at a specified epoch, optionally corrected for light time and stellar aberration.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn subslr(
&self,
method: &str,
target: &str,
et: f64,
fixref: &str,
abcorr: &str,
obsrvr: &str,
) -> ([f64; 3], f64, [f64; 3])
Available on non-crate feature lock only.
pub fn subslr( &self, method: &str, target: &str, et: f64, fixref: &str, abcorr: &str, obsrvr: &str, ) -> ([f64; 3], f64, [f64; 3])
lock only.Compute the rectangular coordinates of the sub-solar point on a target body at a specified epoch, optionally corrected for light time and stellar aberration.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ilumin(
&self,
method: &str,
target: &str,
et: f64,
fixref: &str,
abcorr: &str,
obsrvr: &str,
spoint: [f64; 3],
) -> (f64, [f64; 3], f64, f64, f64)
Available on non-crate feature lock only.
pub fn ilumin( &self, method: &str, target: &str, et: f64, fixref: &str, abcorr: &str, obsrvr: &str, spoint: [f64; 3], ) -> (f64, [f64; 3], f64, f64, f64)
lock only.Find the illumination angles—phase, solar incidence, and emission—at a specified surface point of a target body.
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.Determine 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 edterm(
&self,
trmtyp: &str,
source: &str,
target: &str,
et: f64,
fixfrm: &str,
abcorr: &str,
obsrvr: &str,
npts: usize,
) -> (f64, [f64; 3], Vec<[f64; 3]>)
Available on non-crate feature lock only.
pub fn edterm( &self, trmtyp: &str, source: &str, target: &str, et: f64, fixfrm: &str, abcorr: &str, obsrvr: &str, npts: usize, ) -> (f64, [f64; 3], Vec<[f64; 3]>)
lock only.Compute a set of points on the umbral or penumbral terminator of a specified target body, where the target shape is modelled as an ellipsoid.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn limbpt(
&self,
method: &str,
target: &str,
et: f64,
fixref: &str,
abcorr: &str,
corloc: &str,
obsrvr: &str,
refvec: [f64; 3],
rolstp: f64,
ncuts: usize,
schstp: f64,
soltol: f64,
maxn: usize,
) -> (Vec<i32>, Vec<[f64; 3]>, Vec<f64>, Vec<[f64; 3]>)
Available on non-crate feature lock only.
pub fn limbpt( &self, method: &str, target: &str, et: f64, fixref: &str, abcorr: &str, corloc: &str, obsrvr: &str, refvec: [f64; 3], rolstp: f64, ncuts: usize, schstp: f64, soltol: f64, maxn: usize, ) -> (Vec<i32>, Vec<[f64; 3]>, Vec<f64>, Vec<[f64; 3]>)
lock only.Find limb points on a target body, on cuts of a half-plane pencil rotating about the observer-target vector.
Returns, per cut, the number of points found, then the points themselves, the epoch associated with each, and the tangent vector from the observer to each.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn termpt(
&self,
method: &str,
ilusrc: &str,
target: &str,
et: f64,
fixref: &str,
abcorr: &str,
corloc: &str,
obsrvr: &str,
refvec: [f64; 3],
rolstp: f64,
ncuts: usize,
schstp: f64,
soltol: f64,
maxn: usize,
) -> (Vec<i32>, Vec<[f64; 3]>, Vec<f64>, Vec<[f64; 3]>)
Available on non-crate feature lock only.
pub fn termpt( &self, method: &str, ilusrc: &str, target: &str, et: f64, fixref: &str, abcorr: &str, corloc: &str, obsrvr: &str, refvec: [f64; 3], rolstp: f64, ncuts: usize, schstp: f64, soltol: f64, maxn: usize, ) -> (Vec<i32>, Vec<[f64; 3]>, Vec<f64>, Vec<[f64; 3]>)
lock only.Find terminator points on a target body, on cuts of a half-plane pencil rotating about the observer-target vector.
Shaped like limbpt, with the illumination source named separately.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn wnsumd(&self, window: &mut Cell<f64>) -> (f64, f64, f64, i32, i32)
Available on non-crate feature lock only.
pub fn wnsumd(&self, window: &mut Cell<f64>) -> (f64, f64, f64, i32, i32)
lock only.Summarize a window: total measure, average and standard deviation of the interval lengths, and the indices of the shortest and longest intervals.
The two indices point at the left endpoints in the flat endpoint array, so they run
0, 2, 4, ... rather than 0, 1, 2, ...; the nth interval is reported as 2 * n. Ties go
to the first interval of that length.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn getelm<S: AsRef<str>>(
&self,
frstyr: i32,
lines: &[S],
) -> (f64, [f64; 10])
Available on non-crate feature lock only.
pub fn getelm<S: AsRef<str>>( &self, frstyr: i32, lines: &[S], ) -> (f64, [f64; 10])
lock only.Parse the two lines of a NORAD two-line element set into the epoch and the element set CSPICE uses.
frstyr is the first year of the century the two digit years in the set belong to; 1957, the start
of the space age, is the usual choice.
§Panics
Panics if lines does not hold exactly two lines.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn evsgp4(&self, et: f64, geophs: [f64; 8], elems: [f64; 10]) -> [f64; 6]
Available on non-crate feature lock only.
pub fn evsgp4(&self, et: f64, geophs: [f64; 8], elems: [f64; 10]) -> [f64; 6]
lock only.Evaluate a two-line element set with the SGP4 propagator.
geophs holds the eight geophysical constants the propagator needs, in the order
J2, J3, J4, KE, QO, SO, ER, AE; they normally come from a geophysical constants kernel.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn reordl(&self, iorder: &[i32], array: &mut [SpiceBoolean])
Available on non-crate feature lock only.
pub fn reordl(&self, iorder: &[i32], array: &mut [SpiceBoolean])
lock only.Reorder an array of logical flags in place.
§Panics
Panics if the order vector is not as long as the array.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn azlcpo(
&self,
method: &str,
target: &str,
et: f64,
abcorr: &str,
azccw: bool,
elplsz: bool,
obspos: [f64; 3],
obsctr: &str,
obsref: &str,
) -> ([f64; 6], f64)
Available on non-crate feature lock only.
pub fn azlcpo( &self, method: &str, target: &str, et: f64, abcorr: &str, azccw: bool, elplsz: bool, obspos: [f64; 3], obsctr: &str, obsref: &str, ) -> ([f64; 6], f64)
lock only.Return the azimuth/elevation coordinates of a specified target relative to an “observer,” where the observer has constant position in a specified reference frame. The observer’s position is provided by the calling program rather than by loaded SPK files.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn eqncpv(
&self,
et: f64,
epoch: f64,
eqel: [f64; 9],
rapol: f64,
decpol: f64,
) -> [f64; 6]
Available on non-crate feature lock only.
pub fn eqncpv( &self, et: f64, epoch: f64, eqel: [f64; 9], rapol: f64, decpol: f64, ) -> [f64; 6]
lock only.Compute the state (position and velocity) of an object whose trajectory is described via equinoctial elements relative to some fixed plane (usually the equatorial plane of some planet).
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn return_c(&self) -> bool
Available on non-crate feature lock only.
pub fn return_c(&self) -> bool
lock only.Whether a routine should return immediately because the toolkit is in an error state.
Named return_c rather than return, which is a keyword in Rust. It is the only routine in
the toolkit whose name has to change, and SpiceyPy renames it the same way for the same reason.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn illum(
&self,
target: &str,
et: f64,
abcorr: &str,
obsrvr: &str,
spoint: [f64; 3],
) -> (f64, f64, f64)
Available on non-crate feature lock only.
pub fn illum( &self, target: &str, et: f64, abcorr: &str, obsrvr: &str, spoint: [f64; 3], ) -> (f64, f64, f64)
lock only.Deprecated: This routine has been superseded by the CSPICE routine ilumin_c. This routine is supported for purposes of backward compatibility only.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ltime(&self, etobs: f64, obs: i32, dir: &str, targ: i32) -> (f64, f64)
Available on non-crate feature lock only.
pub fn ltime(&self, etobs: f64, obs: i32, dir: &str, targ: i32) -> (f64, f64)
lock only.Compute the transmission (or reception) time of a signal at a specified target, given the reception (or transmission) time at a specified observer. Also return the elapsed time between transmission and reception.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn srfxpt(
&self,
method: &str,
target: &str,
et: f64,
abcorr: &str,
obsrvr: &str,
dref: &str,
dvec: [f64; 3],
) -> ([f64; 3], f64, f64, [f64; 3], bool)
Available on non-crate feature lock only.
pub fn srfxpt( &self, method: &str, target: &str, et: f64, abcorr: &str, obsrvr: &str, dref: &str, dvec: [f64; 3], ) -> ([f64; 3], f64, f64, [f64; 3], bool)
lock only.Deprecated: This routine has been superseded by the CSPICE routine sincpt_c. This routine is supported for purposes of backward compatibility only.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn subpt(
&self,
method: &str,
target: &str,
et: f64,
abcorr: &str,
obsrvr: &str,
) -> ([f64; 3], f64)
Available on non-crate feature lock only.
pub fn subpt( &self, method: &str, target: &str, et: f64, abcorr: &str, obsrvr: &str, ) -> ([f64; 3], f64)
lock only.Deprecated: This routine has been superseded by the CSPICE routine subpnt_c. This routine is supported for purposes of backward compatibility only.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn tangpt(
&self,
method: &str,
target: &str,
et: f64,
fixref: &str,
abcorr: &str,
corloc: &str,
obsrvr: &str,
dref: &str,
dvec: [f64; 3],
) -> ([f64; 3], f64, f64, [f64; 3], f64, [f64; 3])
Available on non-crate feature lock only.
pub fn tangpt( &self, method: &str, target: &str, et: f64, fixref: &str, abcorr: &str, corloc: &str, obsrvr: &str, dref: &str, dvec: [f64; 3], ) -> ([f64; 3], f64, f64, [f64; 3], f64, [f64; 3])
lock only.Compute, for a given observer, ray emanating from the observer, and target, the “tangent point”: the point on the ray nearest to the target’s surface. Also compute the point on the target’s surface nearest to the tangent point.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn twovxf(
&self,
axdef: [f64; 6],
indexa: i32,
plndef: [f64; 6],
indexp: i32,
) -> [[f64; 6]; 6]
Available on non-crate feature lock only.
pub fn twovxf( &self, axdef: [f64; 6], indexa: i32, plndef: [f64; 6], indexp: i32, ) -> [[f64; 6]; 6]
lock only.Find the state transformation from a base frame to the right-handed frame defined by two state vectors: one state vector defining a specified axis and a second state vector defining a specified coordinate plane.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ckfrot(&self, inst: i32, et: f64) -> ([[f64; 3]; 3], i32, bool)
Available on non-crate feature lock only.
pub fn ckfrot(&self, inst: i32, et: f64) -> ([[f64; 3]; 3], i32, bool)
lock only.Find the position rotation matrix from a C-kernel (CK) frame with the specified frame class ID (CK ID) to the base frame of the highest priority CK segment containing orientation data for this CK frame at the time requested.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ckfxfm(&self, inst: i32, et: f64) -> ([[f64; 6]; 6], i32, bool)
Available on non-crate feature lock only.
pub fn ckfxfm(&self, inst: i32, et: f64) -> ([[f64; 6]; 6], i32, bool)
lock only.Find the state transformation matrix from a C-kernel (CK) frame with the specified frame class ID (CK ID) to the base frame of the highest priority CK segment containing orientation and angular velocity data for this CK frame at the time requested.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn dafgs(&self) -> Vec<f64>
Available on non-crate feature lock only.
pub fn dafgs(&self) -> Vec<f64>
lock only.Return the summary of the current array in the current DAF.
At most DAF_MAXSUM words are returned, which is the largest a DAF summary can be.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn dasrdc(
&self,
handle: i32,
first: i32,
last: i32,
bpos: i32,
epos: i32,
) -> Vec<String>
Available on non-crate feature lock only.
pub fn dasrdc( &self, handle: i32, first: i32, last: i32, bpos: i32, epos: i32, ) -> Vec<String>
lock only.Read characters from a DAS, into the substring bpos ..= epos of each line.
Returns one line per substring the range covers, each epos + 1 characters long, of which only
bpos ..= epos come from the file.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkacs(
&self,
targ: i32,
et: f64,
frame: &str,
abcorr: &str,
obs: i32,
) -> ([f64; 6], f64, f64)
Available on non-crate feature lock only.
pub fn spkacs( &self, targ: i32, et: f64, frame: &str, abcorr: &str, obs: i32, ) -> ([f64; 6], f64, f64)
lock only.Return the state (position and velocity) of a target body relative to an observer, optionally corrected for light time and stellar aberration, expressed relative to an inertial reference frame.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkaps(
&self,
targ: i32,
et: f64,
frame: &str,
abcorr: &str,
stobs: [f64; 6],
accobs: [f64; 3],
) -> ([f64; 6], f64, f64)
Available on non-crate feature lock only.
pub fn spkaps( &self, targ: i32, et: f64, frame: &str, abcorr: &str, stobs: [f64; 6], accobs: [f64; 3], ) -> ([f64; 6], f64, f64)
lock only.Return the state (position and velocity) of a target body relative to an observer specified by its state and acceleration relative to the solar system barycenter. The returned state may be optionally corrected for light time and stellar aberration. All input and output vectors are expressed relative to an inertial reference frame.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkltc(
&self,
targ: i32,
et: f64,
frame: &str,
abcorr: &str,
stobs: [f64; 6],
) -> ([f64; 6], f64, f64)
Available on non-crate feature lock only.
pub fn spkltc( &self, targ: i32, et: f64, frame: &str, abcorr: &str, stobs: [f64; 6], ) -> ([f64; 6], f64, f64)
lock only.Return the state (position and velocity) of a target body relative to an observer, optionally corrected for light time, expressed relative to an inertial reference frame.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkw15(
&self,
handle: i32,
body: i32,
center: i32,
frame: &str,
first: f64,
last: f64,
segid: &str,
epoch: f64,
tp: [f64; 3],
pa: [f64; 3],
p: f64,
ecc: f64,
j2flg: f64,
pv: [f64; 3],
gm: f64,
j2: f64,
radius: f64,
)
Available on non-crate feature lock only.
pub fn spkw15( &self, handle: i32, body: i32, center: i32, frame: &str, first: f64, last: f64, segid: &str, epoch: f64, tp: [f64; 3], pa: [f64; 3], p: f64, ecc: f64, j2flg: f64, pv: [f64; 3], gm: f64, j2: f64, radius: f64, )
lock only.Write an SPK segment of type 15 given a type 15 data record.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkw05(
&self,
handle: i32,
body: i32,
center: i32,
frame: &str,
first: f64,
last: f64,
segid: &str,
gm: f64,
n: i32,
states: &[[f64; 6]],
epochs: &[f64],
)
Available on non-crate feature lock only.
pub fn spkw05( &self, handle: i32, body: i32, center: i32, frame: &str, first: f64, last: f64, segid: &str, gm: f64, n: i32, states: &[[f64; 6]], epochs: &[f64], )
lock only.Write a type 5 segment: discrete states propagated with two body dynamics.
§Panics
Panics if n is larger than states or epochs.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkw13(
&self,
handle: i32,
body: i32,
center: i32,
frame: &str,
first: f64,
last: f64,
segid: &str,
degree: i32,
n: i32,
states: &[[f64; 6]],
epochs: &[f64],
)
Available on non-crate feature lock only.
pub fn spkw13( &self, handle: i32, body: i32, center: i32, frame: &str, first: f64, last: f64, segid: &str, degree: i32, n: i32, states: &[[f64; 6]], epochs: &[f64], )
lock only.Write a type 13 segment: Hermite interpolation of unequally spaced states.
§Panics
Panics if n is larger than states or epochs.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkw08(
&self,
handle: i32,
body: i32,
center: i32,
frame: &str,
first: f64,
last: f64,
segid: &str,
degree: i32,
n: i32,
states: &[[f64; 6]],
epoch0: f64,
step: f64,
)
Available on non-crate feature lock only.
pub fn spkw08( &self, handle: i32, body: i32, center: i32, frame: &str, first: f64, last: f64, segid: &str, degree: i32, n: i32, states: &[[f64; 6]], epoch0: f64, step: f64, )
lock only.Write a type 8 segment: Lagrange interpolation of evenly spaced states.
§Panics
Panics if n is larger than states.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkw12(
&self,
handle: i32,
body: i32,
center: i32,
frame: &str,
first: f64,
last: f64,
segid: &str,
degree: i32,
n: i32,
states: &[[f64; 6]],
epoch0: f64,
step: f64,
)
Available on non-crate feature lock only.
pub fn spkw12( &self, handle: i32, body: i32, center: i32, frame: &str, first: f64, last: f64, segid: &str, degree: i32, n: i32, states: &[[f64; 6]], epoch0: f64, step: f64, )
lock only.Write a type 12 segment: Hermite interpolation of evenly spaced states.
§Panics
Panics if n is larger than states.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkw18(
&self,
handle: i32,
subtyp: i32,
body: i32,
center: i32,
frame: &str,
first: f64,
last: f64,
segid: &str,
degree: i32,
n: i32,
packts: &[f64],
epochs: &[f64],
)
Available on non-crate feature lock only.
pub fn spkw18( &self, handle: i32, subtyp: i32, body: i32, center: i32, frame: &str, first: f64, last: f64, segid: &str, degree: i32, n: i32, packts: &[f64], epochs: &[f64], )
lock only.Write a type 18 segment: Hermite or Lagrange interpolation of packets of state data.
packts holds one packet per epoch, laid out row by row.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn spkw20(
&self,
handle: i32,
body: i32,
center: i32,
frame: &str,
first: f64,
last: f64,
segid: &str,
intlen: f64,
n: i32,
polydg: i32,
cdata: &[f64],
dscale: f64,
tscale: f64,
initjd: f64,
initfr: f64,
)
Available on non-crate feature lock only.
pub fn spkw20( &self, handle: i32, body: i32, center: i32, frame: &str, first: f64, last: f64, segid: &str, intlen: f64, n: i32, polydg: i32, cdata: &[f64], dscale: f64, tscale: f64, initjd: f64, initfr: f64, )
lock only.Write a type 20 segment: Chebyshev polynomials for velocity, with the position at the interval start.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ckw01(
&self,
handle: i32,
begtime: f64,
endtime: f64,
inst: i32,
frame: &str,
avflag: bool,
segid: &str,
nrec: i32,
sclkdp: &[f64],
quats: &[[f64; 4]],
avvs: &[[f64; 3]],
)
Available on non-crate feature lock only.
pub fn ckw01( &self, handle: i32, begtime: f64, endtime: f64, inst: i32, frame: &str, avflag: bool, segid: &str, nrec: i32, sclkdp: &[f64], quats: &[[f64; 4]], avvs: &[[f64; 3]], )
lock only.Write a type 1 segment to a CK file: discrete pointing with angular velocity.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ckw02(
&self,
handle: i32,
begtim: f64,
endtim: f64,
inst: i32,
frame: &str,
segid: &str,
nrec: i32,
start: &[f64],
stop: &[f64],
quats: &[[f64; 4]],
avvs: &[[f64; 3]],
rates: &[f64],
)
Available on non-crate feature lock only.
pub fn ckw02( &self, handle: i32, begtim: f64, endtim: f64, inst: i32, frame: &str, segid: &str, nrec: i32, start: &[f64], stop: &[f64], quats: &[[f64; 4]], avvs: &[[f64; 3]], rates: &[f64], )
lock only.Write a type 2 segment to a CK file: constant angular velocity over each interval.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ckw05(
&self,
handle: i32,
subtyp: i32,
degree: i32,
begtim: f64,
endtim: f64,
inst: i32,
frame: &str,
avflag: bool,
segid: &str,
n: i32,
sclkdp: &[f64],
packets: &[f64],
rate: f64,
nints: i32,
starts: &[f64],
)
Available on non-crate feature lock only.
pub fn ckw05( &self, handle: i32, subtyp: i32, degree: i32, begtim: f64, endtim: f64, inst: i32, frame: &str, avflag: bool, segid: &str, n: i32, sclkdp: &[f64], packets: &[f64], rate: f64, nints: i32, starts: &[f64], )
lock only.Write a type 5 segment to a CK file: interpolated quaternion packets.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn dskd02(
&self,
handle: i32,
dladsc: DLADSC,
item: i32,
start: i32,
room: usize,
) -> Vec<f64>
Available on non-crate feature lock only.
pub fn dskd02( &self, handle: i32, dladsc: DLADSC, item: i32, start: i32, room: usize, ) -> Vec<f64>
lock only.Fetch double precision data from a type 2 DSK segment.
item is one of the dsk02 keywords and at most room values are returned.
start counts from zero, unlike most of the toolkit: the vertex indices of the
first plate are at start 0, even though plate IDs themselves start at 1.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn dski02(
&self,
handle: i32,
dladsc: DLADSC,
item: i32,
start: i32,
room: usize,
) -> Vec<i32>
Available on non-crate feature lock only.
pub fn dski02( &self, handle: i32, dladsc: DLADSC, item: i32, start: i32, room: usize, ) -> Vec<i32>
lock only.Fetch integer data from a type 2 DSK segment.
item is one of the dsk02 keywords and at most room values are returned.
start counts from zero, unlike most of the toolkit: the vertex indices of the
first plate are at start 0, even though plate IDs themselves start at 1.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn rdtext(&self, file: &str, lenout: usize) -> (String, bool)
Available on non-crate feature lock only.
pub fn rdtext(&self, file: &str, lenout: usize) -> (String, bool)
lock only.Read the next line of a text file, opening it if it is not already open.
Returns the line and whether the end of the file has been reached.
The file stays open until it has been read to the end, and CSPICE refuses to load a file it already
has open, so an abandoned partial read makes that file unloadable. The C API has no counterpart to
Fortran’s CLTEXT to close one early.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn illumg(
&self,
method: &str,
target: &str,
ilusrc: &str,
et: f64,
fixref: &str,
abcorr: &str,
obsrvr: &str,
spoint: [f64; 3],
) -> (f64, [f64; 3], f64, f64, f64)
Available on non-crate feature lock only.
pub fn illumg( &self, method: &str, target: &str, ilusrc: &str, et: f64, fixref: &str, abcorr: &str, obsrvr: &str, spoint: [f64; 3], ) -> (f64, [f64; 3], f64, f64, f64)
lock only.Find the illumination angles at a surface point, with the illumination source named separately.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn kxtrct<S: AsRef<str>>(
&self,
keywd: &str,
terms: &[S],
string: &str,
stringlen: usize,
substrlen: usize,
) -> (String, bool, String)
Available on non-crate feature lock only.
pub fn kxtrct<S: AsRef<str>>( &self, keywd: &str, terms: &[S], string: &str, stringlen: usize, substrlen: usize, ) -> (String, bool, String)
lock only.Extract the substring of a word that follows a keyword, from a list of terminating keywords.
Returns the remaining string, whether the keyword was found, and the substring.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfocce(
&self,
occtyp: &str,
front: &str,
fshape: &str,
fframe: &str,
back: &str,
bshape: &str,
bframe: &str,
abcorr: &str,
obsrvr: &str,
tol: f64,
udstep: UdStep,
udrefn: UdRefn,
rpt: bool,
udrepi: UdRepi,
udrepu: UdRepu,
udrepf: UdRepf,
bail: bool,
udbail: UdBail,
cnfine: &mut Cell<f64>,
result: &mut Cell<f64>,
)
Available on non-crate feature lock only.
pub fn gfocce( &self, occtyp: &str, front: &str, fshape: &str, fframe: &str, back: &str, bshape: &str, bframe: &str, abcorr: &str, obsrvr: &str, tol: f64, udstep: UdStep, udrefn: UdRefn, rpt: bool, udrepi: UdRepi, udrepu: UdRepu, udrepf: UdRepf, bail: bool, udbail: UdBail, cnfine: &mut Cell<f64>, result: &mut Cell<f64>, )
lock only.Search for times when an occultation occurs, with the search progress and stepping under the caller’s control.
crate::neat::gfoclt is the form to reach for unless the stepping needs to be customised.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gffove(
&self,
inst: &str,
tshape: &str,
raydir: [f64; 3],
target: &str,
tframe: &str,
abcorr: &str,
obsrvr: &str,
tol: f64,
udstep: UdStep,
udrefn: UdRefn,
rpt: bool,
udrepi: UdRepi,
udrepu: UdRepu,
udrepf: UdRepf,
bail: bool,
udbail: UdBail,
cnfine: &mut Cell<f64>,
result: &mut Cell<f64>,
)
Available on non-crate feature lock only.
pub fn gffove( &self, inst: &str, tshape: &str, raydir: [f64; 3], target: &str, tframe: &str, abcorr: &str, obsrvr: &str, tol: f64, udstep: UdStep, udrefn: UdRefn, rpt: bool, udrepi: UdRepi, udrepu: UdRepu, udrepf: UdRepf, bail: bool, udbail: UdBail, cnfine: &mut Cell<f64>, result: &mut Cell<f64>, )
lock only.Source§impl SpiceLock
impl SpiceLock
Sourcepub fn gfevnt<S: AsRef<str>, T: AsRef<str>>(
&self,
udstep: UdStep,
udrefn: UdRefn,
gquant: &str,
qpnams: &[S],
qcpars: &[T],
qdpars: &[f64],
qipars: &[i32],
qlpars: &[bool],
op: &str,
refval: f64,
tol: f64,
adjust: f64,
rpt: bool,
udrepi: UdRepi,
udrepu: UdRepu,
udrepf: UdRepf,
nintvls: i32,
bail: bool,
udbail: UdBail,
cnfine: &mut Cell<f64>,
result: &mut Cell<f64>,
)
Available on non-crate feature lock only.
pub fn gfevnt<S: AsRef<str>, T: AsRef<str>>( &self, udstep: UdStep, udrefn: UdRefn, gquant: &str, qpnams: &[S], qcpars: &[T], qdpars: &[f64], qipars: &[i32], qlpars: &[bool], op: &str, refval: f64, tol: f64, adjust: f64, rpt: bool, udrepi: UdRepi, udrepu: UdRepu, udrepf: UdRepf, nintvls: i32, bail: bool, udbail: UdBail, cnfine: &mut Cell<f64>, result: &mut Cell<f64>, )
lock only.Search for times when a geometric quantity named by a string meets a condition.
The quantity and its parameters are given by name, which is what makes this the most general of the searches and the most awkward to call; the specific searches above are easier where they apply.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ekbseg<S: AsRef<str>, T: AsRef<str>>(
&self,
handle: i32,
tabnam: &str,
cnames: &[S],
decls: &[T],
) -> i32
Available on non-crate feature lock only.
pub fn ekbseg<S: AsRef<str>, T: AsRef<str>>( &self, handle: i32, tabnam: &str, cnames: &[S], decls: &[T], ) -> i32
lock only.Start a segment of an open events kernel, returning its number.
cnames names the columns and decls declares them, so the two have the same length.
Source§impl SpiceLock
impl SpiceLock
Source§impl SpiceLock
impl SpiceLock
Source§impl SpiceLock
impl SpiceLock
Source§impl SpiceLock
impl SpiceLock
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ekrced(
&self,
handle: i32,
segno: i32,
recno: i32,
column: &str,
maxvals: usize,
) -> (Vec<f64>, bool)
Available on non-crate feature lock only.
pub fn ekrced( &self, handle: i32, segno: i32, recno: i32, column: &str, maxvals: usize, ) -> (Vec<f64>, bool)
lock only.Read a double precision entry of a record of a segment of an open events kernel.
maxvals is the room to make for the entry, in values; CSPICE writes as many as the
entry holds, which is at most the size the column declares.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ekrcei(
&self,
handle: i32,
segno: i32,
recno: i32,
column: &str,
maxvals: usize,
) -> (Vec<i32>, bool)
Available on non-crate feature lock only.
pub fn ekrcei( &self, handle: i32, segno: i32, recno: i32, column: &str, maxvals: usize, ) -> (Vec<i32>, bool)
lock only.Read an integer entry of a record of a segment of an open events kernel.
maxvals is the room to make for the entry, in values; CSPICE writes as many as the
entry holds, which is at most the size the column declares.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ekrcec(
&self,
handle: i32,
segno: i32,
recno: i32,
column: &str,
maxvals: usize,
lenout: usize,
) -> (Vec<String>, bool)
Available on non-crate feature lock only.
pub fn ekrcec( &self, handle: i32, segno: i32, recno: i32, column: &str, maxvals: usize, lenout: usize, ) -> (Vec<String>, bool)
lock only.Read a character entry of a record of a segment of an open events kernel.
maxvals is the room to make for the entry, in values, and lenout the room for each of them.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn ekpsel(
&self,
query: &str,
msglen: usize,
tablen: usize,
collen: usize,
) -> (Vec<i32>, Vec<i32>, Vec<SpiceEKDataType>, Vec<SpiceEKExprClass>, Vec<String>, Vec<String>, bool, String)
Available on non-crate feature lock only.
pub fn ekpsel( &self, query: &str, msglen: usize, tablen: usize, collen: usize, ) -> (Vec<i32>, Vec<i32>, Vec<SpiceEKDataType>, Vec<SpiceEKExprClass>, Vec<String>, Vec<String>, bool, String)
lock only.Parse the SELECT clause of a query, reporting in full on each item it selects.
Returns, for each selected item, where its expression begins and ends in query, its data type,
its class, the table it is taken from and the column it names; then whether the query could not be
parsed, and the message saying why.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn maxd(&self, values: &[f64]) -> f64
Available on non-crate feature lock only.
pub fn maxd(&self, values: &[f64]) -> f64
lock only.The largest of a set of double precision numbers.
The C routine is variadic, which Rust cannot hand a list whose length is only known while it runs; folding the two argument form over the slice gives the same answer for any length. An empty slice gives zero, as the C routine does for a count of none.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn maxi(&self, values: &[i32]) -> i32
Available on non-crate feature lock only.
pub fn maxi(&self, values: &[i32]) -> i32
lock only.The largest of a set of integers.
The C routine is variadic, which Rust cannot hand a list whose length is only known while it runs; folding the two argument form over the slice gives the same answer for any length. An empty slice gives zero, as the C routine does for a count of none.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn mind(&self, values: &[f64]) -> f64
Available on non-crate feature lock only.
pub fn mind(&self, values: &[f64]) -> f64
lock only.The smallest of a set of double precision numbers.
The C routine is variadic, which Rust cannot hand a list whose length is only known while it runs; folding the two argument form over the slice gives the same answer for any length. An empty slice gives zero, as the C routine does for a count of none.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn mini(&self, values: &[i32]) -> i32
Available on non-crate feature lock only.
pub fn mini(&self, values: &[i32]) -> i32
lock only.The smallest of a set of integers.
The C routine is variadic, which Rust cannot hand a list whose length is only known while it runs; folding the two argument form over the slice gives the same answer for any length. An empty slice gives zero, as the C routine does for a count of none.
Source§impl SpiceLock
impl SpiceLock
Sourcepub fn putcml<S: AsRef<str>>(&self, argv: &[S])
Available on non-crate feature lock only.
pub fn putcml<S: AsRef<str>>(&self, argv: &[S])
lock only.Store the command line arguments, so that getcml can hand them back.
CSPICE keeps the pointers rather than the strings, so the copy this makes is leaked on purpose: it has to outlive every later call. The toolkit refuses a second call, for the same reason.