$search
00001 """autogenerated by genmsg_py from NavDOP.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class NavDOP(roslib.message.Message): 00007 _md5sum = "19fe2210fc48e52c1c14b7d2c567407f" 00008 _type = "ublox_msgs/NavDOP" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# NAV-DOP (0x01 0x04) 00011 # Dilution of precision 00012 # 00013 # - DOP values are dimensionless. 00014 # - All DOP values are scaled by a factor of 100. If the unit transmits a value of e.g. 156, the 00015 # DOP value is 1.56. 00016 # 00017 00018 uint8 CLASS_ID = 1 00019 uint8 MESSAGE_ID = 4 00020 00021 uint32 iTOW # GPS Millisecond Time of Week [ms] 00022 00023 uint16 gDOP # Geometric DOP 00024 uint16 pDOP # Position DOP 00025 uint16 tDOP # Time DOP 00026 uint16 vDOP # Vertical DOP 00027 uint16 hDOP # Horizontal DOP 00028 uint16 nDOP # Northing DOP 00029 uint16 eDOP # Easting DOP 00030 00031 """ 00032 # Pseudo-constants 00033 CLASS_ID = 1 00034 MESSAGE_ID = 4 00035 00036 __slots__ = ['iTOW','gDOP','pDOP','tDOP','vDOP','hDOP','nDOP','eDOP'] 00037 _slot_types = ['uint32','uint16','uint16','uint16','uint16','uint16','uint16','uint16'] 00038 00039 def __init__(self, *args, **kwds): 00040 """ 00041 Constructor. Any message fields that are implicitly/explicitly 00042 set to None will be assigned a default value. The recommend 00043 use is keyword arguments as this is more robust to future message 00044 changes. You cannot mix in-order arguments and keyword arguments. 00045 00046 The available fields are: 00047 iTOW,gDOP,pDOP,tDOP,vDOP,hDOP,nDOP,eDOP 00048 00049 @param args: complete set of field values, in .msg order 00050 @param kwds: use keyword arguments corresponding to message field names 00051 to set specific fields. 00052 """ 00053 if args or kwds: 00054 super(NavDOP, self).__init__(*args, **kwds) 00055 #message fields cannot be None, assign default values for those that are 00056 if self.iTOW is None: 00057 self.iTOW = 0 00058 if self.gDOP is None: 00059 self.gDOP = 0 00060 if self.pDOP is None: 00061 self.pDOP = 0 00062 if self.tDOP is None: 00063 self.tDOP = 0 00064 if self.vDOP is None: 00065 self.vDOP = 0 00066 if self.hDOP is None: 00067 self.hDOP = 0 00068 if self.nDOP is None: 00069 self.nDOP = 0 00070 if self.eDOP is None: 00071 self.eDOP = 0 00072 else: 00073 self.iTOW = 0 00074 self.gDOP = 0 00075 self.pDOP = 0 00076 self.tDOP = 0 00077 self.vDOP = 0 00078 self.hDOP = 0 00079 self.nDOP = 0 00080 self.eDOP = 0 00081 00082 def _get_types(self): 00083 """ 00084 internal API method 00085 """ 00086 return self._slot_types 00087 00088 def serialize(self, buff): 00089 """ 00090 serialize message into buffer 00091 @param buff: buffer 00092 @type buff: StringIO 00093 """ 00094 try: 00095 _x = self 00096 buff.write(_struct_I7H.pack(_x.iTOW, _x.gDOP, _x.pDOP, _x.tDOP, _x.vDOP, _x.hDOP, _x.nDOP, _x.eDOP)) 00097 except struct.error as se: self._check_types(se) 00098 except TypeError as te: self._check_types(te) 00099 00100 def deserialize(self, str): 00101 """ 00102 unpack serialized message in str into this message instance 00103 @param str: byte array of serialized message 00104 @type str: str 00105 """ 00106 try: 00107 end = 0 00108 _x = self 00109 start = end 00110 end += 18 00111 (_x.iTOW, _x.gDOP, _x.pDOP, _x.tDOP, _x.vDOP, _x.hDOP, _x.nDOP, _x.eDOP,) = _struct_I7H.unpack(str[start:end]) 00112 return self 00113 except struct.error as e: 00114 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00115 00116 00117 def serialize_numpy(self, buff, numpy): 00118 """ 00119 serialize message with numpy array types into buffer 00120 @param buff: buffer 00121 @type buff: StringIO 00122 @param numpy: numpy python module 00123 @type numpy module 00124 """ 00125 try: 00126 _x = self 00127 buff.write(_struct_I7H.pack(_x.iTOW, _x.gDOP, _x.pDOP, _x.tDOP, _x.vDOP, _x.hDOP, _x.nDOP, _x.eDOP)) 00128 except struct.error as se: self._check_types(se) 00129 except TypeError as te: self._check_types(te) 00130 00131 def deserialize_numpy(self, str, numpy): 00132 """ 00133 unpack serialized message in str into this message instance using numpy for array types 00134 @param str: byte array of serialized message 00135 @type str: str 00136 @param numpy: numpy python module 00137 @type numpy: module 00138 """ 00139 try: 00140 end = 0 00141 _x = self 00142 start = end 00143 end += 18 00144 (_x.iTOW, _x.gDOP, _x.pDOP, _x.tDOP, _x.vDOP, _x.hDOP, _x.nDOP, _x.eDOP,) = _struct_I7H.unpack(str[start:end]) 00145 return self 00146 except struct.error as e: 00147 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00148 00149 _struct_I = roslib.message.struct_I 00150 _struct_I7H = struct.Struct("<I7H")