$search
00001 """autogenerated by genmsg_py from NavVELNED.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class NavVELNED(roslib.message.Message): 00007 _md5sum = "b03402bb86164e74f01e04bff1850150" 00008 _type = "ublox_msgs/NavVELNED" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# NAV-VELNED (0x01 0x12) 00011 # Velocity Solution in NED 00012 # 00013 # See important comments concerning validity of velocity given in section 00014 # Navigation Output Filters. 00015 # 00016 00017 uint8 CLASS_ID = 1 00018 uint8 MESSAGE_ID = 18 00019 00020 uint32 iTOW # GPS Millisecond time of week [ms] 00021 00022 int32 velN # NED north velocity [cm/s] 00023 int32 velE # NED east velocity [cm/s] 00024 int32 velD # NED down velocity [cm/s] 00025 uint32 speed # Speed (3-D) [cm/s] 00026 uint32 gSpeed # Ground Speed (2-D) [cm/s] 00027 int32 heading # Heading of motion 2-D [deg / 1e-5] 00028 uint32 sAcc # Speed Accuracy Estimate [cm/s] 00029 uint32 cAcc # Course / Heading Accuracy Estimate [deg / 1e-5] 00030 00031 """ 00032 # Pseudo-constants 00033 CLASS_ID = 1 00034 MESSAGE_ID = 18 00035 00036 __slots__ = ['iTOW','velN','velE','velD','speed','gSpeed','heading','sAcc','cAcc'] 00037 _slot_types = ['uint32','int32','int32','int32','uint32','uint32','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,velN,velE,velD,speed,gSpeed,heading,sAcc,cAcc 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(NavVELNED, 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.velN is None: 00059 self.velN = 0 00060 if self.velE is None: 00061 self.velE = 0 00062 if self.velD is None: 00063 self.velD = 0 00064 if self.speed is None: 00065 self.speed = 0 00066 if self.gSpeed is None: 00067 self.gSpeed = 0 00068 if self.heading is None: 00069 self.heading = 0 00070 if self.sAcc is None: 00071 self.sAcc = 0 00072 if self.cAcc is None: 00073 self.cAcc = 0 00074 else: 00075 self.iTOW = 0 00076 self.velN = 0 00077 self.velE = 0 00078 self.velD = 0 00079 self.speed = 0 00080 self.gSpeed = 0 00081 self.heading = 0 00082 self.sAcc = 0 00083 self.cAcc = 0 00084 00085 def _get_types(self): 00086 """ 00087 internal API method 00088 """ 00089 return self._slot_types 00090 00091 def serialize(self, buff): 00092 """ 00093 serialize message into buffer 00094 @param buff: buffer 00095 @type buff: StringIO 00096 """ 00097 try: 00098 _x = self 00099 buff.write(_struct_I3i2Ii2I.pack(_x.iTOW, _x.velN, _x.velE, _x.velD, _x.speed, _x.gSpeed, _x.heading, _x.sAcc, _x.cAcc)) 00100 except struct.error as se: self._check_types(se) 00101 except TypeError as te: self._check_types(te) 00102 00103 def deserialize(self, str): 00104 """ 00105 unpack serialized message in str into this message instance 00106 @param str: byte array of serialized message 00107 @type str: str 00108 """ 00109 try: 00110 end = 0 00111 _x = self 00112 start = end 00113 end += 36 00114 (_x.iTOW, _x.velN, _x.velE, _x.velD, _x.speed, _x.gSpeed, _x.heading, _x.sAcc, _x.cAcc,) = _struct_I3i2Ii2I.unpack(str[start:end]) 00115 return self 00116 except struct.error as e: 00117 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00118 00119 00120 def serialize_numpy(self, buff, numpy): 00121 """ 00122 serialize message with numpy array types into buffer 00123 @param buff: buffer 00124 @type buff: StringIO 00125 @param numpy: numpy python module 00126 @type numpy module 00127 """ 00128 try: 00129 _x = self 00130 buff.write(_struct_I3i2Ii2I.pack(_x.iTOW, _x.velN, _x.velE, _x.velD, _x.speed, _x.gSpeed, _x.heading, _x.sAcc, _x.cAcc)) 00131 except struct.error as se: self._check_types(se) 00132 except TypeError as te: self._check_types(te) 00133 00134 def deserialize_numpy(self, str, numpy): 00135 """ 00136 unpack serialized message in str into this message instance using numpy for array types 00137 @param str: byte array of serialized message 00138 @type str: str 00139 @param numpy: numpy python module 00140 @type numpy: module 00141 """ 00142 try: 00143 end = 0 00144 _x = self 00145 start = end 00146 end += 36 00147 (_x.iTOW, _x.velN, _x.velE, _x.velD, _x.speed, _x.gSpeed, _x.heading, _x.sAcc, _x.cAcc,) = _struct_I3i2Ii2I.unpack(str[start:end]) 00148 return self 00149 except struct.error as e: 00150 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00151 00152 _struct_I = roslib.message.struct_I 00153 _struct_I3i2Ii2I = struct.Struct("<I3i2Ii2I")