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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
//
// GENERATED FILE
//
use super::*;
use f2rust_std::*;
const NABCOR: i32 = 15;
const ABATSZ: i32 = 6;
const GEOIDX: i32 = 1;
const LTIDX: i32 = (GEOIDX + 1);
const STLIDX: i32 = (LTIDX + 1);
const CNVIDX: i32 = (STLIDX + 1);
const XMTIDX: i32 = (CNVIDX + 1);
const RELIDX: i32 = (XMTIDX + 1);
const CORLEN: i32 = 5;
//$Procedure ZZCOREPC ( Correct epoch for aberration )
pub fn ZZCOREPC(
ABCORR: &[u8],
ET: f64,
LT: f64,
ETCORR: &mut f64,
ctx: &mut Context,
) -> f2rust_std::Result<()> {
let mut CORBLK = StackArray::<bool, 6>::new(1..=ABATSZ);
//
// SPICELIB functions
//
//
// Local parameters
//
//
// Local variables
//
if RETURN(ctx) {
return Ok(());
}
CHKIN(b"ZZCOREPC", ctx)?;
//
// Parse the aberration correction string. Obtain a correction
// attribute block.
//
ZZPRSCOR(ABCORR, CORBLK.as_slice_mut(), ctx)?;
if CORBLK[LTIDX] {
//
// Light time corrections are used. The output epoch
// must be adjusted according to whether the correction
// is for received or transmitted radiation.
//
if CORBLK[XMTIDX] {
//
// This is the transmission case.
//
*ETCORR = (ET + LT);
} else {
//
// This is the reception case.
//
*ETCORR = (ET - LT);
}
} else {
//
// Light time corrections are not used.
//
*ETCORR = ET;
}
CHKOUT(b"ZZCOREPC", ctx)?;
Ok(())
}