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
//
// GENERATED FILE
//
use super::*;
use f2rust_std::*;
//$Procedure ZZCORSXF ( Correct state transformation matrix )
pub fn ZZCORSXF(XMIT: bool, DLT: f64, XFORM: &[f64], CORXFM: &mut [f64]) {
let XFORM = DummyArray2D::new(XFORM, 1..=6, 1..=6);
let mut CORXFM = DummyArrayMut2D::new(CORXFM, 1..=6, 1..=6);
let mut LTSIGN: f64 = 0.0;
let mut SCALE: f64 = 0.0;
//
// Local variables
//
//
// Determine the sign of the light time correction.
//
if XMIT {
LTSIGN = 1.0;
} else {
LTSIGN = -1.0;
}
//
// Since the only block we're changing is
// the lower left, first copy the input matrix
// to the output matrix.
//
MOVED(XFORM.as_slice(), 36, CORXFM.as_slice_mut());
//
// Adjust the rotation derivative block for
// the rate of change of light time. All
// that's required is to scale the block by
//
// 1 + LTSIGN*DLT
//
//
SCALE = (1.0 + (LTSIGN * DLT));
for COL in 1..=3 {
//
// Scale the vector starting at index
// (4,COL) in place.
//
VSCLIP(SCALE, CORXFM.subarray_mut([4, COL]));
}
}