$search
00001 """autogenerated by genmsg_py from CfgNAV5.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class CfgNAV5(roslib.message.Message): 00007 _md5sum = "7c6e2419d1dd6532b8f09e39a02e167c" 00008 _type = "ublox_msgs/CfgNAV5" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# CFG-NAV5 (0x06 0x24) 00011 # Navigation Engine Settings 00012 # 00013 00014 uint8 CLASS_ID = 6 00015 uint8 MESSAGE_ID = 36 00016 00017 uint16 mask # Parameters Bitmask. Only the masked 00018 # parameters will be applied. 00019 uint16 MASK_DYN = 1 # Apply dynamic model settings 00020 uint16 MASK_MIN_EL = 2 # Apply minimum elevation settings 00021 uint16 MASK_FIX_MODE = 4 # Apply fix mode settings 00022 uint16 MASK_DR_LIM = 8 # Apply DR limit settings 00023 uint16 MASK_POS_MASK = 16 # Apply position mask settings 00024 uint16 MASK_TIME_MASK = 32 # Apply time mask settings 00025 uint16 MASK_STATIC_HOLD_MASK = 64 # Apply static hold settings 00026 uint16 MASK_DGPS_MASK = 128 # Apply DGPS settings, firmware 7 and newer only 00027 00028 uint8 dynModel # Dynamic Platform model: 00029 uint8 DYN_MODEL_PORTABLE = 0 # Portable 00030 uint8 DYN_MODEL_STATIONARY = 2 # Stationary 00031 uint8 DYN_MODEL_PEDESTRIAN = 3 # Pedestrian 00032 uint8 DYN_MODEL_AUTOMOTIVE = 4 # Automotive 00033 uint8 DYN_MODEL_SEA = 5 # Sea 00034 uint8 DYN_MODEL_AIRBORNE_1G = 6 # Airborne with <1g Acceleration 00035 uint8 DYN_MODEL_AIRBORNE_2G = 7 # Airborne with <2g Acceleration 00036 uint8 DYN_MODEL_AIRBORNE_4G = 8 # Airborne with <4g Acceleration 00037 00038 uint8 fixMode # Position Fixing Mode. 00039 uint8 FIX_MODE_2D_ONLY = 1 # 2D only 00040 uint8 FIX_MODE_3D_ONLY = 2 # 3D only 00041 uint8 FIX_MODE_AUTO = 3 # Auto 2D/3D 00042 00043 int32 fixedAlt # Fixed altitude (mean sea level) for 2D fix mode. [m / 0.01] 00044 uint32 fixedAltVar # Fixed altitude variance for 2D mode. [m^2 / 0.0001] 00045 int8 minElev # Minimum Elevation for a GNSS satellite to be used in NAV [deg] 00046 uint8 drLimit # Maximum time to perform dead reckoning [s] 00047 # (linear extrapolation) in case of GPS signal loss 00048 uint16 pDop # Position DOP Mask to use [1 / 0.1] 00049 uint16 tDop # Time DOP Mask to use [1 / 0.1] 00050 uint16 pAcc # Position Accuracy Mask [m] 00051 uint16 tAcc # Time Accuracy Mask [m] 00052 uint8 staticHoldThresh # Static hold threshold [cm/s] 00053 uint8 dgpsTimeOut # DGPS timeout, firmware 7 and newer only [s] 00054 uint32 reserved2 # Always set to zero 00055 uint32 reserved3 # Always set to zero 00056 uint32 reserved4 # Always set to zero 00057 00058 """ 00059 # Pseudo-constants 00060 CLASS_ID = 6 00061 MESSAGE_ID = 36 00062 MASK_DYN = 1 00063 MASK_MIN_EL = 2 00064 MASK_FIX_MODE = 4 00065 MASK_DR_LIM = 8 00066 MASK_POS_MASK = 16 00067 MASK_TIME_MASK = 32 00068 MASK_STATIC_HOLD_MASK = 64 00069 MASK_DGPS_MASK = 128 00070 DYN_MODEL_PORTABLE = 0 00071 DYN_MODEL_STATIONARY = 2 00072 DYN_MODEL_PEDESTRIAN = 3 00073 DYN_MODEL_AUTOMOTIVE = 4 00074 DYN_MODEL_SEA = 5 00075 DYN_MODEL_AIRBORNE_1G = 6 00076 DYN_MODEL_AIRBORNE_2G = 7 00077 DYN_MODEL_AIRBORNE_4G = 8 00078 FIX_MODE_2D_ONLY = 1 00079 FIX_MODE_3D_ONLY = 2 00080 FIX_MODE_AUTO = 3 00081 00082 __slots__ = ['mask','dynModel','fixMode','fixedAlt','fixedAltVar','minElev','drLimit','pDop','tDop','pAcc','tAcc','staticHoldThresh','dgpsTimeOut','reserved2','reserved3','reserved4'] 00083 _slot_types = ['uint16','uint8','uint8','int32','uint32','int8','uint8','uint16','uint16','uint16','uint16','uint8','uint8','uint32','uint32','uint32'] 00084 00085 def __init__(self, *args, **kwds): 00086 """ 00087 Constructor. Any message fields that are implicitly/explicitly 00088 set to None will be assigned a default value. The recommend 00089 use is keyword arguments as this is more robust to future message 00090 changes. You cannot mix in-order arguments and keyword arguments. 00091 00092 The available fields are: 00093 mask,dynModel,fixMode,fixedAlt,fixedAltVar,minElev,drLimit,pDop,tDop,pAcc,tAcc,staticHoldThresh,dgpsTimeOut,reserved2,reserved3,reserved4 00094 00095 @param args: complete set of field values, in .msg order 00096 @param kwds: use keyword arguments corresponding to message field names 00097 to set specific fields. 00098 """ 00099 if args or kwds: 00100 super(CfgNAV5, self).__init__(*args, **kwds) 00101 #message fields cannot be None, assign default values for those that are 00102 if self.mask is None: 00103 self.mask = 0 00104 if self.dynModel is None: 00105 self.dynModel = 0 00106 if self.fixMode is None: 00107 self.fixMode = 0 00108 if self.fixedAlt is None: 00109 self.fixedAlt = 0 00110 if self.fixedAltVar is None: 00111 self.fixedAltVar = 0 00112 if self.minElev is None: 00113 self.minElev = 0 00114 if self.drLimit is None: 00115 self.drLimit = 0 00116 if self.pDop is None: 00117 self.pDop = 0 00118 if self.tDop is None: 00119 self.tDop = 0 00120 if self.pAcc is None: 00121 self.pAcc = 0 00122 if self.tAcc is None: 00123 self.tAcc = 0 00124 if self.staticHoldThresh is None: 00125 self.staticHoldThresh = 0 00126 if self.dgpsTimeOut is None: 00127 self.dgpsTimeOut = 0 00128 if self.reserved2 is None: 00129 self.reserved2 = 0 00130 if self.reserved3 is None: 00131 self.reserved3 = 0 00132 if self.reserved4 is None: 00133 self.reserved4 = 0 00134 else: 00135 self.mask = 0 00136 self.dynModel = 0 00137 self.fixMode = 0 00138 self.fixedAlt = 0 00139 self.fixedAltVar = 0 00140 self.minElev = 0 00141 self.drLimit = 0 00142 self.pDop = 0 00143 self.tDop = 0 00144 self.pAcc = 0 00145 self.tAcc = 0 00146 self.staticHoldThresh = 0 00147 self.dgpsTimeOut = 0 00148 self.reserved2 = 0 00149 self.reserved3 = 0 00150 self.reserved4 = 0 00151 00152 def _get_types(self): 00153 """ 00154 internal API method 00155 """ 00156 return self._slot_types 00157 00158 def serialize(self, buff): 00159 """ 00160 serialize message into buffer 00161 @param buff: buffer 00162 @type buff: StringIO 00163 """ 00164 try: 00165 _x = self 00166 buff.write(_struct_H2BiIbB4H2B3I.pack(_x.mask, _x.dynModel, _x.fixMode, _x.fixedAlt, _x.fixedAltVar, _x.minElev, _x.drLimit, _x.pDop, _x.tDop, _x.pAcc, _x.tAcc, _x.staticHoldThresh, _x.dgpsTimeOut, _x.reserved2, _x.reserved3, _x.reserved4)) 00167 except struct.error as se: self._check_types(se) 00168 except TypeError as te: self._check_types(te) 00169 00170 def deserialize(self, str): 00171 """ 00172 unpack serialized message in str into this message instance 00173 @param str: byte array of serialized message 00174 @type str: str 00175 """ 00176 try: 00177 end = 0 00178 _x = self 00179 start = end 00180 end += 36 00181 (_x.mask, _x.dynModel, _x.fixMode, _x.fixedAlt, _x.fixedAltVar, _x.minElev, _x.drLimit, _x.pDop, _x.tDop, _x.pAcc, _x.tAcc, _x.staticHoldThresh, _x.dgpsTimeOut, _x.reserved2, _x.reserved3, _x.reserved4,) = _struct_H2BiIbB4H2B3I.unpack(str[start:end]) 00182 return self 00183 except struct.error as e: 00184 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00185 00186 00187 def serialize_numpy(self, buff, numpy): 00188 """ 00189 serialize message with numpy array types into buffer 00190 @param buff: buffer 00191 @type buff: StringIO 00192 @param numpy: numpy python module 00193 @type numpy module 00194 """ 00195 try: 00196 _x = self 00197 buff.write(_struct_H2BiIbB4H2B3I.pack(_x.mask, _x.dynModel, _x.fixMode, _x.fixedAlt, _x.fixedAltVar, _x.minElev, _x.drLimit, _x.pDop, _x.tDop, _x.pAcc, _x.tAcc, _x.staticHoldThresh, _x.dgpsTimeOut, _x.reserved2, _x.reserved3, _x.reserved4)) 00198 except struct.error as se: self._check_types(se) 00199 except TypeError as te: self._check_types(te) 00200 00201 def deserialize_numpy(self, str, numpy): 00202 """ 00203 unpack serialized message in str into this message instance using numpy for array types 00204 @param str: byte array of serialized message 00205 @type str: str 00206 @param numpy: numpy python module 00207 @type numpy: module 00208 """ 00209 try: 00210 end = 0 00211 _x = self 00212 start = end 00213 end += 36 00214 (_x.mask, _x.dynModel, _x.fixMode, _x.fixedAlt, _x.fixedAltVar, _x.minElev, _x.drLimit, _x.pDop, _x.tDop, _x.pAcc, _x.tAcc, _x.staticHoldThresh, _x.dgpsTimeOut, _x.reserved2, _x.reserved3, _x.reserved4,) = _struct_H2BiIbB4H2B3I.unpack(str[start:end]) 00215 return self 00216 except struct.error as e: 00217 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00218 00219 _struct_I = roslib.message.struct_I 00220 _struct_H2BiIbB4H2B3I = struct.Struct("<H2BiIbB4H2B3I")