1 from enum
import Enum, IntEnum
9 DID_PREINTEGRATED_IMU = 3
14 DID_ASCII_BCAST_PERIOD = 8
26 DID_INTERNAL_DIAGNOSTIC = 20
27 DID_GPS1_RTK_POS_REL = 21
28 DID_GPS1_RTK_POS_MISC = 22
32 DID_SENSORS_TC_BIAS = 26
39 DID_NVR_MANAGE_USERPAGE = 33
40 DID_NVR_USERPAGE_SN = 34
41 DID_NVR_USERPAGE_G0 = 35
42 DID_NVR_USERPAGE_G1 = 36
51 DID_SYS_SENSORS_SIGMA = 45
52 DID_SENSORS_ADC_SIGMA = 46
55 DID_INL2_COVARIANCE_LD = 49
58 DID_MAGNETOMETER_1 = 52
62 DID_COMMUNICATIONS_LOOPBACK = 56
65 DID_INL2_MAG_OBS_INFO = 59
68 DID_NVR_USERPAGE_INTERNAL = 62
69 DID_MANUFACTURING_INFO = 63
73 DID_INL2_VARIANCE = 67
74 DID_STROBE_IN_TIME = 68
77 DID_WHEEL_ENCODER = 71
78 DID_DIAGNOSTIC_MESSAGE = 72
83 DID_RTK_PHASE_RESIDUAL = 77
84 DID_RTK_CODE_RESIDUAL = 78
88 DID_EVB_DEBUG_ARRAY = 82
89 DID_EVB_RTOS_INFO = 83
90 DID_DUAL_IMU_RAW_MAG = 84
92 DID_PREINTEGRATED_IMU_MAG = 86
94 DID_POSITION_MEASUREMENT = 88
97 DID_GPS1_RTK_CMP_REL = 91
98 DID_GPS1_RTK_CMP_MISC = 92
105 DID_DEV_INFO :
"devInfo",
106 DID_SYS_FAULT :
"sysFault",
107 DID_PREINTEGRATED_IMU :
"preintegratedImu",
110 DID_GPS1_UBX_POS :
"gps1UbxPos",
111 DID_CONFIG :
"config",
112 DID_ASCII_BCAST_PERIOD :
"asciiBcastPeriod",
114 DID_SYS_PARAMS :
"sysParams",
115 DID_SYS_SENSORS :
"sysSensors",
116 DID_FLASH_CONFIG :
"flashConfig",
117 DID_GPS1_POS :
"gps1Pos",
118 DID_GPS2_POS :
"gps2Pos",
119 DID_GPS1_SAT :
"gps1Sat",
120 DID_GPS2_SAT :
"gps2Sat",
121 DID_GPS1_VERSION :
"gps1Version",
122 DID_GPS2_VERSION :
"gps2Version",
123 DID_MAG_CAL :
"magCal",
124 DID_INTERNAL_DIAGNOSTIC :
"internalDiagnostic",
125 DID_GPS1_RTK_POS_REL :
"gps1RtkPosRel",
126 DID_GPS1_RTK_CMP_REL :
"gps1RtkCmpRel",
127 DID_GPS1_RTK_POS_MISC:
"gps1RtkPosMisc",
128 DID_GPS1_RTK_CMP_MISC:
"gps1RtkCmpMisc",
129 DID_FEATURE_BITS :
"featureBits",
130 DID_SENSORS_IS1 :
"sensorsIs1",
131 DID_SENSORS_IS2 :
"sensorsIs2",
132 DID_SENSORS_TC_BIAS :
"sensorsTcBias",
134 DID_SENSORS_ADC :
"sensorsAdc",
136 DID_GPS1_VEL :
"gps1Vel",
137 DID_GPS2_VEL :
"gps2Vel",
138 DID_HDW_PARAMS :
"hdwParams",
139 DID_NVR_MANAGE_USERPAGE :
"nvrManageUserpage",
140 DID_NVR_USERPAGE_SN :
"nvrUserpageSn",
141 DID_NVR_USERPAGE_G0 :
"nvrUserpageG0",
142 DID_NVR_USERPAGE_G1 :
"nvrUserpageG1",
143 DID_DEBUG_STRING :
"debugString",
144 DID_RTOS_INFO :
"rtosInfo",
145 DID_DEBUG_ARRAY :
"debugArray",
146 DID_SENSORS_CAL1 :
"sensorsCal1",
147 DID_SENSORS_CAL2 :
"sensorsCal2",
148 DID_CAL_SC :
"calSc",
149 DID_CAL_SC1 :
"calSc1",
150 DID_CAL_SC2 :
"calSc2",
151 DID_SYS_SENSORS_SIGMA :
"sysSensorsSigma",
152 DID_SENSORS_ADC_SIGMA :
"sensorsAdcSigma",
153 DID_INS_DEV_1 :
"insDev1",
154 DID_INL2_STATES :
"inl2States",
155 DID_INL2_COVARIANCE_LD :
"inl2CovarianceLd",
156 DID_INL2_STATUS :
"inl2Status",
157 DID_INL2_MISC :
"inl2Misc",
158 DID_MAGNETOMETER_1 :
"magnetometer1",
159 DID_BAROMETER :
"barometer",
160 DID_GPS1_RTK_POS :
"gps1RtkPos",
161 DID_COMMUNICATIONS_LOOPBACK :
"communicationsLoopback",
162 DID_DUAL_IMU_RAW :
"dualImuRaw",
163 DID_DUAL_IMU :
"dualImu",
164 DID_INL2_MAG_OBS_INFO :
"inl2MagObsInfo",
165 DID_GPS_BASE_RAW :
"gpsBaseRaw",
166 DID_GPS_RTK_OPT :
"gpsRtkOpt",
167 DID_NVR_USERPAGE_INTERNAL :
"nvrUserpageInternal",
168 DID_MANUFACTURING_INFO :
"manufacturingInfo",
172 DID_INL2_VARIANCE :
"inl2Variance",
173 DID_STROBE_IN_TIME :
"strobeInTime",
174 DID_GPS1_RAW :
"gps1Raw",
175 DID_GPS2_RAW :
"gps2Raw",
176 DID_WHEEL_ENCODER :
"wheelEncoder",
177 DID_DIAGNOSTIC_MESSAGE :
"diagnosticMessage",
178 DID_SURVEY_IN :
"surveyIn",
180 DID_PORT_MONITOR :
"portMonitor",
181 DID_RTK_STATE :
"rtkState",
182 DID_RTK_PHASE_RESIDUAL :
"rtkPhaseResidual",
183 DID_RTK_CODE_RESIDUAL :
"rtkCodeResidual",
184 DID_RTK_DEBUG :
"rtkDebug",
185 DID_EVB_STATUS :
"evbStatus",
186 DID_EVB_CONFIG :
"evbConfig",
187 DID_EVB_DEBUG_ARRAY :
"evbDebugArray",
188 DID_EVB_RTOS_INFO :
"evbRtosInfo",
189 DID_RTK_DEBUG_2:
"rtkDebug2",
190 DID_CAN_CONFIG:
"canconfig",
194 """ Navigation Fix Type """ 195 NAV_FIX_STATUS_NONE = 0x00000000
196 NAV_FIX_STATUS_3D = 0x00000001
197 NAV_FIX_STATUS_RTK_FLOAT = 0x00000002
198 NAV_FIX_STATUS_RTK_FIX = 0x00000003
204 INS_STATUS_NAV_FIX_STATUS_MASK = 0x07000000
205 INS_STATUS_NAV_FIX_STATUS_OFFSET = 24
206 return eNavFixStatus((insStatus&INS_STATUS_NAV_FIX_STATUS_MASK)>>INS_STATUS_NAV_FIX_STATUS_OFFSET)
218 TASK_COMMUNICATIONS = 2
225 raw_data_type_observation = 1
226 raw_data_type_ephemeris = 2
227 raw_data_type_glonass_ephemeris = 3
228 raw_data_type_sbas = 4
229 raw_data_type_base_station_antenna_position = 5
230 raw_data_type_ionosphere_model_utc_alm = 6
235 """RTK base portion of INS status""" 236 INS_STATUS_RTK_BASE_ERR_NO_OBSERV = 0x08000000
237 INS_STATUS_RTK_BASE_ERR_NO_POSITION = 0x10000000
238 INS_STATUS_RTK_BASE_POSITION_MOVING = 0x20000000
242 INS_STATUS_RTK_BASE_MASK = 0x38300000
243 status = insStatus & INS_STATUS_RTK_BASE_MASK
245 return eInsStatusRtkBase
251 HARDWARE_RESET = 0x00000000
252 USER_RESET = 0x00000001
253 ENABLE_BOOTLOADER = 0x00000002
256 SOFT_RESET = 0x00000010
257 FLASH_MIGRATION_EVENT = 0x00000020
258 FLASH_MIGRATION_COMPLETED = 0x00000040
261 HARD_FAULT = 0x00010000
262 USAGE_FAULT = 0x00020000
263 MEM_MANGE = 0x00040000
264 BUS_FAULT = 0x00080000
265 MALLOC_FAILED = 0x00100000
266 STACK_OVERFLOW = 0x00200000
267 INVALID_CODE_OPERATION = 0x00400000
268 FLASH_MIGRATION_MARKER_UPDATED = 0x00800000
271 MASK_GENERAL_ERROR = 0xFFFFFFF0
272 return self.value & MASK_GENERAL_ERROR
275 MASK_CRITICAL_ERROR = 0xFFFF0000
276 return self.value & MASK_CRITICAL_ERROR
281 CFG_SYS_CMD_SAVE_PERSISTENT_MESSAGES = 1
282 CFG_SYS_CMD_ENABLE_BOOTLOADER_AND_RESET = 2
283 CFG_SYS_CMD_ENABLE_SENSOR_STATS = 3
284 CFG_SYS_CMD_ENABLE_RTOS_STATS = 4
285 CFG_SYS_CMD_ENABLE_GPS_LOW_LEVEL_CONFIG = 10
286 CFG_SYS_CMD_CLEAR_GPS_ASSIST_FROM_FLASH = 97
287 CFG_SYS_CMD_SAVE_GPS_ASSIST_TO_FLASH_RESET = 98
288 CFG_SYS_CMD_SOFTWARE_RESET = 99
def is_critical_error(self)
def from_ins_status(insStatus)
def from_ins_status(insStatus)
def is_general_error(self)