1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
//
// GENERATED FILE
//
use super::*;
use f2rust_std::*;
//
//--- The user defined functions required by GFUDS.
//
// gfq for udfunc
// gfdecr for udqdec
// gfrrdc for udqdec
//
//$Procedure GFQ ( Scalar function - range rate )
pub fn GFQ(ET: &mut f64, VALUE: &mut f64, ctx: &mut Context) -> f2rust_std::Result<()> {
let mut TARG: i32 = 0;
let mut OBS: i32 = 0;
let mut REF = [b' '; 12 as usize];
let mut ABCORR = [b' '; 12 as usize];
let mut STATE = StackArray::<f64, 6>::new(1..=6);
let mut LT: f64 = 0.0;
//
// Local variables.
//
//
// Initialization. Retrieve the vector from the Sun to
// the Moon in the J2000 frame, without aberration
// correction.
//
TARG = 301;
fstr::assign(&mut REF, b"J2000");
fstr::assign(&mut ABCORR, b"NONE");
OBS = 10;
spicelib::SPKEZ(
TARG,
*ET,
&REF,
&ABCORR,
OBS,
STATE.as_slice_mut(),
&mut LT,
ctx,
)?;
//
// Calculate the scalar range rate corresponding the
// STATE vector.
//
*VALUE = spicelib::DVNORM(STATE.as_slice());
Ok(())
}