00001 """autogenerated by genpy from ublox_msgs/NavVELECEF.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 NavVELECEF(genpy.Message):
00009 _md5sum = "97299f597364a39a6c0e96ed2ee4e702"
00010 _type = "ublox_msgs/NavVELECEF"
00011 _has_header = False
00012 _full_text = """# NAV-VELECEF (0x01 0x11)
00013 # Velocity Solution in ECEF
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 = 17
00021
00022 uint32 iTOW # GPS Millisecond time of week [ms]
00023
00024 int32 ecefVX # ECEF X velocity [cm/s]
00025 int32 ecefVY # ECEF Y velocity [cm/s]
00026 int32 ecefVZ # ECEF Z velocity [cm/s]
00027 uint32 sAcc # Speed Accuracy Estimate [cm/s]
00028
00029 """
00030
00031 CLASS_ID = 1
00032 MESSAGE_ID = 17
00033
00034 __slots__ = ['iTOW','ecefVX','ecefVY','ecefVZ','sAcc']
00035 _slot_types = ['uint32','int32','int32','int32','uint32']
00036
00037 def __init__(self, *args, **kwds):
00038 """
00039 Constructor. Any message fields that are implicitly/explicitly
00040 set to None will be assigned a default value. The recommend
00041 use is keyword arguments as this is more robust to future message
00042 changes. You cannot mix in-order arguments and keyword arguments.
00043
00044 The available fields are:
00045 iTOW,ecefVX,ecefVY,ecefVZ,sAcc
00046
00047 :param args: complete set of field values, in .msg order
00048 :param kwds: use keyword arguments corresponding to message field names
00049 to set specific fields.
00050 """
00051 if args or kwds:
00052 super(NavVELECEF, self).__init__(*args, **kwds)
00053
00054 if self.iTOW is None:
00055 self.iTOW = 0
00056 if self.ecefVX is None:
00057 self.ecefVX = 0
00058 if self.ecefVY is None:
00059 self.ecefVY = 0
00060 if self.ecefVZ is None:
00061 self.ecefVZ = 0
00062 if self.sAcc is None:
00063 self.sAcc = 0
00064 else:
00065 self.iTOW = 0
00066 self.ecefVX = 0
00067 self.ecefVY = 0
00068 self.ecefVZ = 0
00069 self.sAcc = 0
00070
00071 def _get_types(self):
00072 """
00073 internal API method
00074 """
00075 return self._slot_types
00076
00077 def serialize(self, buff):
00078 """
00079 serialize message into buffer
00080 :param buff: buffer, ``StringIO``
00081 """
00082 try:
00083 _x = self
00084 buff.write(_struct_I3iI.pack(_x.iTOW, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc))
00085 except struct.error as se: self._check_types(se)
00086 except TypeError as te: self._check_types(te)
00087
00088 def deserialize(self, str):
00089 """
00090 unpack serialized message in str into this message instance
00091 :param str: byte array of serialized message, ``str``
00092 """
00093 try:
00094 end = 0
00095 _x = self
00096 start = end
00097 end += 20
00098 (_x.iTOW, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc,) = _struct_I3iI.unpack(str[start:end])
00099 return self
00100 except struct.error as e:
00101 raise genpy.DeserializationError(e)
00102
00103
00104 def serialize_numpy(self, buff, numpy):
00105 """
00106 serialize message with numpy array types into buffer
00107 :param buff: buffer, ``StringIO``
00108 :param numpy: numpy python module
00109 """
00110 try:
00111 _x = self
00112 buff.write(_struct_I3iI.pack(_x.iTOW, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc))
00113 except struct.error as se: self._check_types(se)
00114 except TypeError as te: self._check_types(te)
00115
00116 def deserialize_numpy(self, str, numpy):
00117 """
00118 unpack serialized message in str into this message instance using numpy for array types
00119 :param str: byte array of serialized message, ``str``
00120 :param numpy: numpy python module
00121 """
00122 try:
00123 end = 0
00124 _x = self
00125 start = end
00126 end += 20
00127 (_x.iTOW, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc,) = _struct_I3iI.unpack(str[start:end])
00128 return self
00129 except struct.error as e:
00130 raise genpy.DeserializationError(e)
00131
00132 _struct_I = genpy.struct_I
00133 _struct_I3iI = struct.Struct("<I3iI")