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
#[doc(hidden)]
pub mod flight_patterns;
mod state;
pub use self::state::UavState;
pub use self::flight_patterns::PatternType;
use signal::SignalConfig;
#[derive(Copy, Clone, Serialize, Deserialize)]
pub struct UavConfig {
pub capture_rate: f32,
pub speed: f32,
pub controller: UavController,
pub receiver: SignalConfig,
}
#[derive(Copy, Clone, Serialize, Deserialize)]
pub struct UavController {
pub pattern_size: [f32; 2],
pub pattern_center: [f32; 2],
pub pattern_type: PatternType,
}
impl UavController {
pub fn new(size: [f32; 2], center: [f32; 2], pattern_type: PatternType) -> UavController {
UavController {
pattern_size: size,
pattern_center: center,
pattern_type: pattern_type,
}
}
}