00001 """autogenerated by genpy from ublox_msgs/RxmRAW.msg. Do not edit."""
00002 import sys
00003 python3 = True if sys.hexversion > 0x03000000 else False
00004 import genpy
00005 import struct
00006
00007 import ublox_msgs.msg
00008
00009 class RxmRAW(genpy.Message):
00010 _md5sum = "1933e39502131517c68160a4906d1675"
00011 _type = "ublox_msgs/RxmRAW"
00012 _has_header = False
00013 _full_text = """# RXM-RAW (0x02 0x10)
00014 # Raw Measurement Data
00015 #
00016 # This message contains all information needed to be able to generate a RINEX file.
00017 #
00018
00019 uint8 CLASS_ID = 2
00020 uint8 MESSAGE_ID = 16
00021
00022 int32 iTOW # Measurement integer millisecond GPS time of week (Receiver Time) [ms]
00023 int16 week # Measurement GPS week number (Receiver Time) [weeks]
00024
00025 uint8 numSV # # of satellites following
00026 uint8 reserved1 # Reserved
00027
00028 RxmRAW_SV[] sv
00029
00030 ================================================================================
00031 MSG: ublox_msgs/RxmRAW_SV
00032 # see message RxmRAW
00033 #
00034
00035 float64 cpMes # Carrier phase measurement [L1 cycles]
00036 float64 prMes # Pseudorange measurement [m]
00037 float32 doMes # Doppler measurement [Hz]
00038
00039 uint8 sv # Space Vehicle Number
00040 int8 mesQI # Nav Measurements Quality Indicator
00041 # >=4 : PR+DO OK
00042 # >=5 : PR+DO+CP OK
00043 # <6 : likely loss of carrier lock in previous interval
00044 int8 cno # Signal strength C/No. [dbHz]
00045 uint8 lli # Loss of lock indicator (RINEX definition)
00046
00047 """
00048
00049 CLASS_ID = 2
00050 MESSAGE_ID = 16
00051
00052 __slots__ = ['iTOW','week','numSV','reserved1','sv']
00053 _slot_types = ['int32','int16','uint8','uint8','ublox_msgs/RxmRAW_SV[]']
00054
00055 def __init__(self, *args, **kwds):
00056 """
00057 Constructor. Any message fields that are implicitly/explicitly
00058 set to None will be assigned a default value. The recommend
00059 use is keyword arguments as this is more robust to future message
00060 changes. You cannot mix in-order arguments and keyword arguments.
00061
00062 The available fields are:
00063 iTOW,week,numSV,reserved1,sv
00064
00065 :param args: complete set of field values, in .msg order
00066 :param kwds: use keyword arguments corresponding to message field names
00067 to set specific fields.
00068 """
00069 if args or kwds:
00070 super(RxmRAW, self).__init__(*args, **kwds)
00071
00072 if self.iTOW is None:
00073 self.iTOW = 0
00074 if self.week is None:
00075 self.week = 0
00076 if self.numSV is None:
00077 self.numSV = 0
00078 if self.reserved1 is None:
00079 self.reserved1 = 0
00080 if self.sv is None:
00081 self.sv = []
00082 else:
00083 self.iTOW = 0
00084 self.week = 0
00085 self.numSV = 0
00086 self.reserved1 = 0
00087 self.sv = []
00088
00089 def _get_types(self):
00090 """
00091 internal API method
00092 """
00093 return self._slot_types
00094
00095 def serialize(self, buff):
00096 """
00097 serialize message into buffer
00098 :param buff: buffer, ``StringIO``
00099 """
00100 try:
00101 _x = self
00102 buff.write(_struct_ih2B.pack(_x.iTOW, _x.week, _x.numSV, _x.reserved1))
00103 length = len(self.sv)
00104 buff.write(_struct_I.pack(length))
00105 for val1 in self.sv:
00106 _x = val1
00107 buff.write(_struct_2dfB2bB.pack(_x.cpMes, _x.prMes, _x.doMes, _x.sv, _x.mesQI, _x.cno, _x.lli))
00108 except struct.error as se: self._check_types(se)
00109 except TypeError as te: self._check_types(te)
00110
00111 def deserialize(self, str):
00112 """
00113 unpack serialized message in str into this message instance
00114 :param str: byte array of serialized message, ``str``
00115 """
00116 try:
00117 if self.sv is None:
00118 self.sv = None
00119 end = 0
00120 _x = self
00121 start = end
00122 end += 8
00123 (_x.iTOW, _x.week, _x.numSV, _x.reserved1,) = _struct_ih2B.unpack(str[start:end])
00124 start = end
00125 end += 4
00126 (length,) = _struct_I.unpack(str[start:end])
00127 self.sv = []
00128 for i in range(0, length):
00129 val1 = ublox_msgs.msg.RxmRAW_SV()
00130 _x = val1
00131 start = end
00132 end += 24
00133 (_x.cpMes, _x.prMes, _x.doMes, _x.sv, _x.mesQI, _x.cno, _x.lli,) = _struct_2dfB2bB.unpack(str[start:end])
00134 self.sv.append(val1)
00135 return self
00136 except struct.error as e:
00137 raise genpy.DeserializationError(e)
00138
00139
00140 def serialize_numpy(self, buff, numpy):
00141 """
00142 serialize message with numpy array types into buffer
00143 :param buff: buffer, ``StringIO``
00144 :param numpy: numpy python module
00145 """
00146 try:
00147 _x = self
00148 buff.write(_struct_ih2B.pack(_x.iTOW, _x.week, _x.numSV, _x.reserved1))
00149 length = len(self.sv)
00150 buff.write(_struct_I.pack(length))
00151 for val1 in self.sv:
00152 _x = val1
00153 buff.write(_struct_2dfB2bB.pack(_x.cpMes, _x.prMes, _x.doMes, _x.sv, _x.mesQI, _x.cno, _x.lli))
00154 except struct.error as se: self._check_types(se)
00155 except TypeError as te: self._check_types(te)
00156
00157 def deserialize_numpy(self, str, numpy):
00158 """
00159 unpack serialized message in str into this message instance using numpy for array types
00160 :param str: byte array of serialized message, ``str``
00161 :param numpy: numpy python module
00162 """
00163 try:
00164 if self.sv is None:
00165 self.sv = None
00166 end = 0
00167 _x = self
00168 start = end
00169 end += 8
00170 (_x.iTOW, _x.week, _x.numSV, _x.reserved1,) = _struct_ih2B.unpack(str[start:end])
00171 start = end
00172 end += 4
00173 (length,) = _struct_I.unpack(str[start:end])
00174 self.sv = []
00175 for i in range(0, length):
00176 val1 = ublox_msgs.msg.RxmRAW_SV()
00177 _x = val1
00178 start = end
00179 end += 24
00180 (_x.cpMes, _x.prMes, _x.doMes, _x.sv, _x.mesQI, _x.cno, _x.lli,) = _struct_2dfB2bB.unpack(str[start:end])
00181 self.sv.append(val1)
00182 return self
00183 except struct.error as e:
00184 raise genpy.DeserializationError(e)
00185
00186 _struct_I = genpy.struct_I
00187 _struct_2dfB2bB = struct.Struct("<2dfB2bB")
00188 _struct_ih2B = struct.Struct("<ih2B")