$search
00001 """autogenerated by genmsg_py from NavPOSLLH.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class NavPOSLLH(roslib.message.Message): 00007 _md5sum = "01aab2c75cd9f8c402a0689e82f04f01" 00008 _type = "ublox_msgs/NavPOSLLH" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# NAV-POSLLH (0x01 0x02) 00011 # Geodetic Position Solution 00012 # 00013 # See important comments concerning validity of position given in section 00014 # Navigation Output Filters. 00015 # This message outputs the Geodetic position in the currently selected Ellipsoid. The default is 00016 # the WGS84 Ellipsoid, but can be changed with the message CFG-DAT. 00017 # 00018 00019 uint8 CLASS_ID = 1 00020 uint8 MESSAGE_ID = 2 00021 00022 uint32 iTOW # GPS Millisecond Time of Week [ms] 00023 00024 int32 lon # Longitude [deg/1e-7] 00025 int32 lat # Latitude [deg/1e-7] 00026 int32 height # Height above Ellipsoid [mm] 00027 int32 hMSL # Height above mean sea level [mm] 00028 uint32 hAcc # Horizontal Accuracy Estimate [mm] 00029 uint32 vAcc # Vertical Accuracy Estimate [mm] 00030 00031 """ 00032 # Pseudo-constants 00033 CLASS_ID = 1 00034 MESSAGE_ID = 2 00035 00036 __slots__ = ['iTOW','lon','lat','height','hMSL','hAcc','vAcc'] 00037 _slot_types = ['uint32','int32','int32','int32','int32','uint32','uint32'] 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,lon,lat,height,hMSL,hAcc,vAcc 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(NavPOSLLH, 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.lon is None: 00059 self.lon = 0 00060 if self.lat is None: 00061 self.lat = 0 00062 if self.height is None: 00063 self.height = 0 00064 if self.hMSL is None: 00065 self.hMSL = 0 00066 if self.hAcc is None: 00067 self.hAcc = 0 00068 if self.vAcc is None: 00069 self.vAcc = 0 00070 else: 00071 self.iTOW = 0 00072 self.lon = 0 00073 self.lat = 0 00074 self.height = 0 00075 self.hMSL = 0 00076 self.hAcc = 0 00077 self.vAcc = 0 00078 00079 def _get_types(self): 00080 """ 00081 internal API method 00082 """ 00083 return self._slot_types 00084 00085 def serialize(self, buff): 00086 """ 00087 serialize message into buffer 00088 @param buff: buffer 00089 @type buff: StringIO 00090 """ 00091 try: 00092 _x = self 00093 buff.write(_struct_I4i2I.pack(_x.iTOW, _x.lon, _x.lat, _x.height, _x.hMSL, _x.hAcc, _x.vAcc)) 00094 except struct.error as se: self._check_types(se) 00095 except TypeError as te: self._check_types(te) 00096 00097 def deserialize(self, str): 00098 """ 00099 unpack serialized message in str into this message instance 00100 @param str: byte array of serialized message 00101 @type str: str 00102 """ 00103 try: 00104 end = 0 00105 _x = self 00106 start = end 00107 end += 28 00108 (_x.iTOW, _x.lon, _x.lat, _x.height, _x.hMSL, _x.hAcc, _x.vAcc,) = _struct_I4i2I.unpack(str[start:end]) 00109 return self 00110 except struct.error as e: 00111 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00112 00113 00114 def serialize_numpy(self, buff, numpy): 00115 """ 00116 serialize message with numpy array types into buffer 00117 @param buff: buffer 00118 @type buff: StringIO 00119 @param numpy: numpy python module 00120 @type numpy module 00121 """ 00122 try: 00123 _x = self 00124 buff.write(_struct_I4i2I.pack(_x.iTOW, _x.lon, _x.lat, _x.height, _x.hMSL, _x.hAcc, _x.vAcc)) 00125 except struct.error as se: self._check_types(se) 00126 except TypeError as te: self._check_types(te) 00127 00128 def deserialize_numpy(self, str, numpy): 00129 """ 00130 unpack serialized message in str into this message instance using numpy for array types 00131 @param str: byte array of serialized message 00132 @type str: str 00133 @param numpy: numpy python module 00134 @type numpy: module 00135 """ 00136 try: 00137 end = 0 00138 _x = self 00139 start = end 00140 end += 28 00141 (_x.iTOW, _x.lon, _x.lat, _x.height, _x.hMSL, _x.hAcc, _x.vAcc,) = _struct_I4i2I.unpack(str[start:end]) 00142 return self 00143 except struct.error as e: 00144 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00145 00146 _struct_I = roslib.message.struct_I 00147 _struct_I4i2I = struct.Struct("<I4i2I")