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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
use bitflags::bitflags;
#[cfg(feature = "serde")]
use super::SerializeUbxPacketFields;
#[cfg(feature = "serde")]
use crate::serde::ser::SerializeMap;
use crate::{
error::ParserError, ubx_checksum, MemWriter, MemWriterError, UbxPacketCreator, UbxPacketMeta,
};
use ublox_derive::{ubx_extend_bitflags, ubx_packet_recv_send};
/// Navigation Engine Expert Settings
#[ubx_packet_recv_send]
#[ubx(
class = 0x06,
id = 0x23,
fixed_payload_len = 40,
flags = "default_for_builder"
)]
struct CfgNavX5 {
/// Only version 2 supported
version: u16,
/// Only the masked parameters will be applied
#[ubx(map_type = CfgNavX5Params1)]
mask1: u16,
#[ubx(map_type = CfgNavX5Params2)]
mask2: u32,
/// Reserved
reserved1: [u8; 2],
/// Minimum number of satellites for navigation
min_svs: u8,
///Maximum number of satellites for navigation
max_svs: u8,
/// Minimum satellite signal level for navigation
min_cno_dbhz: u8,
/// Reserved
reserved2: u8,
/// initial fix must be 3D
ini_fix_3d: u8,
/// Reserved
reserved3: [u8; 2],
/// issue acknowledgements for assistance message input
ack_aiding: u8,
/// GPS week rollover number
wkn_rollover: u16,
/// Permanently attenuated signal compensation
sig_atten_comp_mode: u8,
/// Reserved
reserved4: u8,
reserved5: [u8; 2],
reserved6: [u8; 2],
/// Use Precise Point Positioning (only available with the PPP product variant)
use_ppp: u8,
/// AssistNow Autonomous configuration
aop_cfg: u8,
/// Reserved
reserved7: [u8; 2],
/// Maximum acceptable (modeled) AssistNow Autonomous orbit error
aop_orb_max_err: u16,
/// Reserved
reserved8: [u8; 4],
reserved9: [u8; 3],
/// Enable/disable ADR/UDR sensor fusion
use_adr: u8,
}
#[ubx_extend_bitflags]
#[ubx(from, into_raw, rest_reserved)]
bitflags! {
/// `CfgNavX51` parameters bitmask
#[derive(Default, Debug)]
pub struct CfgNavX5Params1: u16 {
/// apply min/max SVs settings
const MIN_MAX = 0x4;
/// apply minimum C/N0 setting
const MIN_CNO = 0x8;
/// apply initial 3D fix settings
const INITIAL_3D_FIX = 0x40;
/// apply GPS weeknumber rollover settings
const WKN_ROLL = 0x200;
/// apply assistance acknowledgement settings
const AID_ACK = 0x400;
/// apply usePPP flag
const USE_PPP = 0x2000;
/// apply aopCfg (useAOP flag) and aopOrbMaxErr settings (AssistNow Autonomous)
const AOP_CFG = 0x4000;
}
}
#[ubx_extend_bitflags]
#[ubx(from, into_raw, rest_reserved)]
bitflags! {
/// `CfgNavX5Params2` parameters bitmask
#[derive(Default, Debug)]
pub struct CfgNavX5Params2: u32 {
/// apply ADR/UDR sensor fusion on/off setting
const USE_ADR = 0x40;
/// apply signal attenuation compensation feature settings
const USE_SIG_ATTEN_COMP = 0x80;
}
}