gondola_core/
constants.rs1pub static GENERIC_ONLINE_FILE_PATTERN : &str = r"Run\d+_\d+\.(\d{6})_(\d{6})(UTC)?(\.tofsum|\.tof)?\.gaps$";
13pub static GENERIC_ONLINE_FILE_PATTERN_CAPTURE : &str = r"Run(?P<run>\d+)_(?P<subrun>\d+)\.(?P<utctime>\d{6}_\d{6})(UTC)?(\.tofsum|\.tof)?\.gaps$";
14pub static GENERIC_TELEMETRY_FILE_PATTERN_CAPTURE : &str = r"RAW(?P<utctime>\d{6}_\d{6})(UTC)?.bin$";
15
16pub static HUMAN_TIMESTAMP_FORMAT : &str = "%y%m%d_%H%M%S%Z";
18
19pub const GPS_TIMESTAMP48_REFERENCE : u64 = 1766880000 * 100_000_000;
35
36pub const fn expand_gps_timestamp48(ts48 : u64) -> u64 {
40 const PERIOD : u64 = 1 << 48;
41 let ts48 = ts48 & (PERIOD - 1);
42 let full = (GPS_TIMESTAMP48_REFERENCE & !(PERIOD - 1)) | ts48;
43 if full > GPS_TIMESTAMP48_REFERENCE + PERIOD/2 {
44 full - PERIOD
45 } else if full + PERIOD/2 < GPS_TIMESTAMP48_REFERENCE {
46 full + PERIOD
47 } else {
48 full
49 }
50}
51
52#[test]
53fn expand_gps_timestamp48_flight() {
54 const PERIOD : u64 = 1 << 48;
55 let t0 : u64 = 1765756800 * 100_000_000;
57 assert_eq!(expand_gps_timestamp48(t0 % PERIOD), t0);
58 let t1 : u64 = 1768003199 * 100_000_000;
60 assert_eq!(expand_gps_timestamp48(t1 % PERIOD), t1);
61 let tr : u64 = 0x274 * PERIOD;
63 assert_eq!(expand_gps_timestamp48((tr - 1) % PERIOD), tr - 1);
64 assert_eq!(expand_gps_timestamp48(tr % PERIOD), tr);
65}
66
67pub const C_LIGHT_PADDLE : f32 = 15.4;
71
72pub const C_LIGHT_CABLE : f32 = 24.6;
76
77pub const N_LTBS : usize = 25;
79
80pub const N_CHN_PER_LTB : usize = 16;
82
83pub const NCHN : usize = 9;
85
86pub const NWORDS : usize = 1024;
88
89pub const MASK_CMD_8BIT : u32 = 0x000000FF;
92pub const MASK_CMD_16BIT : u32 = 0x0000FFFF;
93pub const MASK_CMD_24BIT : u32 = 0x00FFFFFF;
94pub const MASK_CMD_32BIT : u32 = 0xFFFFFFFF;
95pub const PAD_CMD_32BIT : u32 = 0x00000000;
98
99pub const SILI_RADIUS : f32 = 5.0;
101
102pub const LIFTOF_LOGO_SHOW : &str = "
106 ___ ___ ___
107 /\\__\\ /\\ \\ /\\__\\
108 ___ /:/ _/_ ___ /::\\ \\ /:/ _/_
109 /\\__\\ /:/ /\\__\\ /\\__\\ /:/\\:\\ \\ /:/ /\\__\\
110 ___ ___ /:/__/ /:/ /:/ / /:/ / /:/ \\:\\ \\ /:/ /:/ /
111 /\\ \\ /\\__\\ /::\\ \\ /:/_/:/ / /:/__/ /:/__/ \\:\\__\\ /:/_/:/ /
112 \\:\\ \\ /:/ / \\/\\:\\ \\__ \\:\\/:/ / /::\\ \\ \\:\\ \\ /:/ / \\:\\/:/ /
113 \\:\\ /:/ / ~~\\:\\/\\__\\ \\::/__/ /:/\\:\\ \\ \\:\\ /:/ / \\::/__/
114 \\:\\/:/ / \\::/ / \\:\\ \\ \\/__\\:\\ \\ \\:\\/:/ / \\:\\ \\
115 \\::/ / /:/ / \\:\\__\\ \\:\\__\\ \\::/ / \\:\\__\\
116 \\/__/ \\/__/ \\/__/ \\/__/ \\/__/ \\/__/
117
118 (LIFTOF - liftof is for tof, Version 0.11.x 'PAKII', Aug 2025)
119 >> with undying support from the Hawaiian islands \u{1f30a}\u{1f308}\u{1f965}\u{1f334}
120
121 * Documentation
122 ==> GitHub https://github.com/GAPS-Collab/gaps-online-software/tree/PAKII-0.11
123 ==> API docs https://gaps-collab.github.io/gaps-online-software/
124
125 ";
126
127
128
129