00001 """autogenerated by genpy from ublox_msgs/NavVELNED.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007
00008 class NavVELNED(genpy.Message):
00009 _md5sum = "b03402bb86164e74f01e04bff1850150"
00010 _type = "ublox_msgs/NavVELNED"
00011 _has_header = False
00012 _full_text = """# NAV-VELNED (0x01 0x12)
00013 # Velocity Solution in NED
00014 #
00015 # See important comments concerning validity of velocity given in section
00016 # Navigation Output Filters.
00017 #
00018
00019 uint8 CLASS_ID = 1
00020 uint8 MESSAGE_ID = 18
00021
00022 uint32 iTOW # GPS Millisecond time of week [ms]
00023
00024 int32 velN # NED north velocity [cm/s]
00025 int32 velE # NED east velocity [cm/s]
00026 int32 velD # NED down velocity [cm/s]
00027 uint32 speed # Speed (3-D) [cm/s]
00028 uint32 gSpeed # Ground Speed (2-D) [cm/s]
00029 int32 heading # Heading of motion 2-D [deg / 1e-5]
00030 uint32 sAcc # Speed Accuracy Estimate [cm/s]
00031 uint32 cAcc # Course / Heading Accuracy Estimate [deg / 1e-5]
00032
00033 """
00034
00035 CLASS_ID = 1
00036 MESSAGE_ID = 18
00037
00038 __slots__ = ['iTOW','velN','velE','velD','speed','gSpeed','heading','sAcc','cAcc']
00039 _slot_types = ['uint32','int32','int32','int32','uint32','uint32','int32','uint32','uint32']
00040
00041 def __init__(self, *args, **kwds):
00042 """
00043 Constructor. Any message fields that are implicitly/explicitly
00044 set to None will be assigned a default value. The recommend
00045 use is keyword arguments as this is more robust to future message
00046 changes. You cannot mix in-order arguments and keyword arguments.
00047
00048 The available fields are:
00049 iTOW,velN,velE,velD,speed,gSpeed,heading,sAcc,cAcc
00050
00051 :param args: complete set of field values, in .msg order
00052 :param kwds: use keyword arguments corresponding to message field names
00053 to set specific fields.
00054 """
00055 if args or kwds:
00056 super(NavVELNED, self).__init__(*args, **kwds)
00057
00058 if self.iTOW is None:
00059 self.iTOW = 0
00060 if self.velN is None:
00061 self.velN = 0
00062 if self.velE is None:
00063 self.velE = 0
00064 if self.velD is None:
00065 self.velD = 0
00066 if self.speed is None:
00067 self.speed = 0
00068 if self.gSpeed is None:
00069 self.gSpeed = 0
00070 if self.heading is None:
00071 self.heading = 0
00072 if self.sAcc is None:
00073 self.sAcc = 0
00074 if self.cAcc is None:
00075 self.cAcc = 0
00076 else:
00077 self.iTOW = 0
00078 self.velN = 0
00079 self.velE = 0
00080 self.velD = 0
00081 self.speed = 0
00082 self.gSpeed = 0
00083 self.heading = 0
00084 self.sAcc = 0
00085 self.cAcc = 0
00086
00087 def _get_types(self):
00088 """
00089 internal API method
00090 """
00091 return self._slot_types
00092
00093 def serialize(self, buff):
00094 """
00095 serialize message into buffer
00096 :param buff: buffer, ``StringIO``
00097 """
00098 try:
00099 _x = self
00100 buff.write(_struct_I3i2Ii2I.pack(_x.iTOW, _x.velN, _x.velE, _x.velD, _x.speed, _x.gSpeed, _x.heading, _x.sAcc, _x.cAcc))
00101 except struct.error as se: self._check_types(se)
00102 except TypeError as te: self._check_types(te)
00103
00104 def deserialize(self, str):
00105 """
00106 unpack serialized message in str into this message instance
00107 :param str: byte array of serialized message, ``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 genpy.DeserializationError(e)
00118
00119
00120 def serialize_numpy(self, buff, numpy):
00121 """
00122 serialize message with numpy array types into buffer
00123 :param buff: buffer, ``StringIO``
00124 :param numpy: numpy python module
00125 """
00126 try:
00127 _x = self
00128 buff.write(_struct_I3i2Ii2I.pack(_x.iTOW, _x.velN, _x.velE, _x.velD, _x.speed, _x.gSpeed, _x.heading, _x.sAcc, _x.cAcc))
00129 except struct.error as se: self._check_types(se)
00130 except TypeError as te: self._check_types(te)
00131
00132 def deserialize_numpy(self, str, numpy):
00133 """
00134 unpack serialized message in str into this message instance using numpy for array types
00135 :param str: byte array of serialized message, ``str``
00136 :param numpy: numpy python module
00137 """
00138 try:
00139 end = 0
00140 _x = self
00141 start = end
00142 end += 36
00143 (_x.iTOW, _x.velN, _x.velE, _x.velD, _x.speed, _x.gSpeed, _x.heading, _x.sAcc, _x.cAcc,) = _struct_I3i2Ii2I.unpack(str[start:end])
00144 return self
00145 except struct.error as e:
00146 raise genpy.DeserializationError(e)
00147
00148 _struct_I = genpy.struct_I
00149 _struct_I3i2Ii2I = struct.Struct("<I3i2Ii2I")