1use serde::{Deserialize, Serialize};
2
3#[derive(Serialize, Deserialize, Debug, Clone)]
4pub struct Config {
5 pub voxel_size: f32,
7 pub max_range: f32,
8 pub min_range: f32,
9 pub max_points_per_voxel: u16,
10
11 pub min_motion_th: f64,
13 pub initial_threshold: f64,
14
15 pub max_num_iterations: u16,
17 pub convergence_criterion: f64,
18 pub max_num_threads: u8,
19
20 pub deskew: bool,
22}
23impl Config {
24 pub fn default_values() -> Config {
25 Config {
26 voxel_size: 1.0,
27 max_range: 100.0,
28 min_range: 1.0,
29 max_points_per_voxel: 20,
30
31 min_motion_th: 0.1,
33 initial_threshold: 2.0,
34
35 max_num_iterations: 500,
37 convergence_criterion: 0.0001,
38 max_num_threads: 0,
39
40 deskew: false,
42 }
43 }
44}