$search
00001 """autogenerated by genmsg_py from NavDGPS.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import ublox_msgs.msg 00006 00007 class NavDGPS(roslib.message.Message): 00008 _md5sum = "b0aba8454084620f2a8eb7ff6445368c" 00009 _type = "ublox_msgs/NavDGPS" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """# NAV-DGPS (0x01 0x31) 00012 # DGPS Data Used for NAV 00013 # 00014 # This message outputs the Correction data as it has been applied to the current NAV 00015 # Solution. See also the notes on the RTCM protocol. 00016 # 00017 00018 uint8 CLASS_ID = 1 00019 uint8 MESSAGE_ID = 31 00020 00021 uint32 iTOW # GPS Millisecond time of week [ms] 00022 00023 int32 age # Age of newest correction data [ms] 00024 int16 baseId # DGPS Base Station ID 00025 int16 baseHealth # DGPS Base Station Health Status 00026 int8 numCh # Number of channels for which correction data is following 00027 00028 uint8 status # DGPS Correction Type Status 00029 uint8 DGPS_CORRECTION_NONE = 0 00030 uint8 DGPS_CORRECTION_PR_PRR = 1 00031 00032 uint16 reserved1 # Reserved 00033 00034 NavDGPS_SV[] sv 00035 00036 ================================================================================ 00037 MSG: ublox_msgs/NavDGPS_SV 00038 # see message NavDGPS 00039 00040 uint8 svid # Satellite ID 00041 00042 uint8 flags # Bitmask / Channel Number 00043 uint8 CHANNEL1 = 1 00044 uint8 CHANNEL2 = 2 00045 uint8 CHANNEL3 = 3 00046 uint8 CHANNEL4 = 4 00047 uint8 CHANNEL5 = 5 00048 uint8 CHANNEL6 = 6 00049 uint8 CHANNEL7 = 7 00050 uint8 CHANNEL8 = 8 00051 uint8 DGPS = 16 00052 00053 uint16 ageC # Age of latest correction data [ms] 00054 float32 prc # Pseudo Range Correction [m] 00055 float32 prrc # Pseudo Range Rate Correction [m/s] 00056 00057 00058 """ 00059 # Pseudo-constants 00060 CLASS_ID = 1 00061 MESSAGE_ID = 31 00062 DGPS_CORRECTION_NONE = 0 00063 DGPS_CORRECTION_PR_PRR = 1 00064 00065 __slots__ = ['iTOW','age','baseId','baseHealth','numCh','status','reserved1','sv'] 00066 _slot_types = ['uint32','int32','int16','int16','int8','uint8','uint16','ublox_msgs/NavDGPS_SV[]'] 00067 00068 def __init__(self, *args, **kwds): 00069 """ 00070 Constructor. Any message fields that are implicitly/explicitly 00071 set to None will be assigned a default value. The recommend 00072 use is keyword arguments as this is more robust to future message 00073 changes. You cannot mix in-order arguments and keyword arguments. 00074 00075 The available fields are: 00076 iTOW,age,baseId,baseHealth,numCh,status,reserved1,sv 00077 00078 @param args: complete set of field values, in .msg order 00079 @param kwds: use keyword arguments corresponding to message field names 00080 to set specific fields. 00081 """ 00082 if args or kwds: 00083 super(NavDGPS, self).__init__(*args, **kwds) 00084 #message fields cannot be None, assign default values for those that are 00085 if self.iTOW is None: 00086 self.iTOW = 0 00087 if self.age is None: 00088 self.age = 0 00089 if self.baseId is None: 00090 self.baseId = 0 00091 if self.baseHealth is None: 00092 self.baseHealth = 0 00093 if self.numCh is None: 00094 self.numCh = 0 00095 if self.status is None: 00096 self.status = 0 00097 if self.reserved1 is None: 00098 self.reserved1 = 0 00099 if self.sv is None: 00100 self.sv = [] 00101 else: 00102 self.iTOW = 0 00103 self.age = 0 00104 self.baseId = 0 00105 self.baseHealth = 0 00106 self.numCh = 0 00107 self.status = 0 00108 self.reserved1 = 0 00109 self.sv = [] 00110 00111 def _get_types(self): 00112 """ 00113 internal API method 00114 """ 00115 return self._slot_types 00116 00117 def serialize(self, buff): 00118 """ 00119 serialize message into buffer 00120 @param buff: buffer 00121 @type buff: StringIO 00122 """ 00123 try: 00124 _x = self 00125 buff.write(_struct_Ii2hbBH.pack(_x.iTOW, _x.age, _x.baseId, _x.baseHealth, _x.numCh, _x.status, _x.reserved1)) 00126 length = len(self.sv) 00127 buff.write(_struct_I.pack(length)) 00128 for val1 in self.sv: 00129 _x = val1 00130 buff.write(_struct_2BH2f.pack(_x.svid, _x.flags, _x.ageC, _x.prc, _x.prrc)) 00131 except struct.error as se: self._check_types(se) 00132 except TypeError as te: self._check_types(te) 00133 00134 def deserialize(self, str): 00135 """ 00136 unpack serialized message in str into this message instance 00137 @param str: byte array of serialized message 00138 @type str: str 00139 """ 00140 try: 00141 end = 0 00142 _x = self 00143 start = end 00144 end += 16 00145 (_x.iTOW, _x.age, _x.baseId, _x.baseHealth, _x.numCh, _x.status, _x.reserved1,) = _struct_Ii2hbBH.unpack(str[start:end]) 00146 start = end 00147 end += 4 00148 (length,) = _struct_I.unpack(str[start:end]) 00149 self.sv = [] 00150 for i in range(0, length): 00151 val1 = ublox_msgs.msg.NavDGPS_SV() 00152 _x = val1 00153 start = end 00154 end += 12 00155 (_x.svid, _x.flags, _x.ageC, _x.prc, _x.prrc,) = _struct_2BH2f.unpack(str[start:end]) 00156 self.sv.append(val1) 00157 return self 00158 except struct.error as e: 00159 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00160 00161 00162 def serialize_numpy(self, buff, numpy): 00163 """ 00164 serialize message with numpy array types into buffer 00165 @param buff: buffer 00166 @type buff: StringIO 00167 @param numpy: numpy python module 00168 @type numpy module 00169 """ 00170 try: 00171 _x = self 00172 buff.write(_struct_Ii2hbBH.pack(_x.iTOW, _x.age, _x.baseId, _x.baseHealth, _x.numCh, _x.status, _x.reserved1)) 00173 length = len(self.sv) 00174 buff.write(_struct_I.pack(length)) 00175 for val1 in self.sv: 00176 _x = val1 00177 buff.write(_struct_2BH2f.pack(_x.svid, _x.flags, _x.ageC, _x.prc, _x.prrc)) 00178 except struct.error as se: self._check_types(se) 00179 except TypeError as te: self._check_types(te) 00180 00181 def deserialize_numpy(self, str, numpy): 00182 """ 00183 unpack serialized message in str into this message instance using numpy for array types 00184 @param str: byte array of serialized message 00185 @type str: str 00186 @param numpy: numpy python module 00187 @type numpy: module 00188 """ 00189 try: 00190 end = 0 00191 _x = self 00192 start = end 00193 end += 16 00194 (_x.iTOW, _x.age, _x.baseId, _x.baseHealth, _x.numCh, _x.status, _x.reserved1,) = _struct_Ii2hbBH.unpack(str[start:end]) 00195 start = end 00196 end += 4 00197 (length,) = _struct_I.unpack(str[start:end]) 00198 self.sv = [] 00199 for i in range(0, length): 00200 val1 = ublox_msgs.msg.NavDGPS_SV() 00201 _x = val1 00202 start = end 00203 end += 12 00204 (_x.svid, _x.flags, _x.ageC, _x.prc, _x.prrc,) = _struct_2BH2f.unpack(str[start:end]) 00205 self.sv.append(val1) 00206 return self 00207 except struct.error as e: 00208 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00209 00210 _struct_I = roslib.message.struct_I 00211 _struct_2BH2f = struct.Struct("<2BH2f") 00212 _struct_Ii2hbBH = struct.Struct("<Ii2hbBH")