$search
00001 """autogenerated by genmsg_py from NavSVINFO.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 import ublox_msgs.msg 00006 00007 class NavSVINFO(roslib.message.Message): 00008 _md5sum = "92fe4aa48b81d4da7a58f2d2e63a7ca7" 00009 _type = "ublox_msgs/NavSVINFO" 00010 _has_header = False #flag to mark the presence of a Header object 00011 _full_text = """# NAV-SVINFO (0x01 0x30) 00012 # Space Vehicle Information 00013 # 00014 00015 uint8 CLASS_ID = 1 00016 uint8 MESSAGE_ID = 48 00017 00018 uint32 iTOW # GPS Millisecond time of week [ms] 00019 00020 uint8 numCh # Number of channels 00021 00022 uint8 globalFlags # Bitmask 00023 uint8 CHIPGEN_ANTARIS = 0 # Antaris, Antaris 4 00024 uint8 CHIPGEN_UBLOX5 = 1 # u-blox 5 00025 uint8 CHIPGEN_UBLOX6 = 2 # u-blox 6 00026 00027 uint16 reserved2 # Reserved 00028 00029 NavSVINFO_SV[] sv 00030 00031 ================================================================================ 00032 MSG: ublox_msgs/NavSVINFO_SV 00033 # see message NavSVINFO 00034 # 00035 00036 uint8 chn # Channel number, 255 for SVs not assigned to a channel 00037 uint8 svid # Satellite ID 00038 00039 uint8 flags # Bitmask 00040 uint8 FLAGS_SVUSED = 1 # SV is used for navigation 00041 uint8 FLAGS_DIFFCORR = 2 # Differential correction data is available for this SV 00042 uint8 FLAGS_ORBITAVAIL = 4 # Orbit information is available for this SV (Ephemeris or Almanach) 00043 uint8 FLAGS_ORBITEPH = 8 # Orbit information is Ephemeris 00044 uint8 FLAGS_UNHEALTHY = 16 # SV is unhealthy / shall not be used 00045 uint8 FLAGS_ORBIT_ALM = 32 # Orbit information is Almanac Plus 00046 uint8 FLAGS_ORBIT_AOP = 64 # Orbit information is AssistNow Autonomous 00047 uint8 FLAGS_SMOOTHED = 128 # Carrier smoothed pseudorange used 00048 00049 uint8 quality # Bitfield 00050 # qualityInd: Signal Quality indicator (range 0..7). The following list shows the meaning of the different QI values: 00051 uint8 QUALITY_IDLE = 0 # This channel is idle 00052 uint8 QUALITY_SEARCHING = 1 # Channel is searching 00053 uint8 QUALITY_AQUIRED = 2 # Signal aquired 00054 uint8 QUALITY_DETECTED = 3 # Signal detected but unusable 00055 uint8 QUALITY_CODE_LOCK = 4 # Code Lock on Signal 00056 uint8 QUALITY_CODE_AND_CARRIER_LOCKED1 = 5 # Code and Carrier locked 00057 uint8 QUALITY_CODE_AND_CARRIER_LOCKED2 = 6 # Code and Carrier locked 00058 uint8 QUALITY_CODE_AND_CARRIER_LOCKED3 = 7 # Code and Carrier locked 00059 00060 uint8 cno # Carrier to Noise Ratio (Signal Strength) [dbHz] 00061 int8 elev # Elevation in integer degrees [deg] 00062 int16 azim # Azimuth in integer degrees [deg] 00063 int32 prRes # Pseudo range residual in centimetres [cm] 00064 00065 """ 00066 # Pseudo-constants 00067 CLASS_ID = 1 00068 MESSAGE_ID = 48 00069 CHIPGEN_ANTARIS = 0 00070 CHIPGEN_UBLOX5 = 1 00071 CHIPGEN_UBLOX6 = 2 00072 00073 __slots__ = ['iTOW','numCh','globalFlags','reserved2','sv'] 00074 _slot_types = ['uint32','uint8','uint8','uint16','ublox_msgs/NavSVINFO_SV[]'] 00075 00076 def __init__(self, *args, **kwds): 00077 """ 00078 Constructor. Any message fields that are implicitly/explicitly 00079 set to None will be assigned a default value. The recommend 00080 use is keyword arguments as this is more robust to future message 00081 changes. You cannot mix in-order arguments and keyword arguments. 00082 00083 The available fields are: 00084 iTOW,numCh,globalFlags,reserved2,sv 00085 00086 @param args: complete set of field values, in .msg order 00087 @param kwds: use keyword arguments corresponding to message field names 00088 to set specific fields. 00089 """ 00090 if args or kwds: 00091 super(NavSVINFO, self).__init__(*args, **kwds) 00092 #message fields cannot be None, assign default values for those that are 00093 if self.iTOW is None: 00094 self.iTOW = 0 00095 if self.numCh is None: 00096 self.numCh = 0 00097 if self.globalFlags is None: 00098 self.globalFlags = 0 00099 if self.reserved2 is None: 00100 self.reserved2 = 0 00101 if self.sv is None: 00102 self.sv = [] 00103 else: 00104 self.iTOW = 0 00105 self.numCh = 0 00106 self.globalFlags = 0 00107 self.reserved2 = 0 00108 self.sv = [] 00109 00110 def _get_types(self): 00111 """ 00112 internal API method 00113 """ 00114 return self._slot_types 00115 00116 def serialize(self, buff): 00117 """ 00118 serialize message into buffer 00119 @param buff: buffer 00120 @type buff: StringIO 00121 """ 00122 try: 00123 _x = self 00124 buff.write(_struct_I2BH.pack(_x.iTOW, _x.numCh, _x.globalFlags, _x.reserved2)) 00125 length = len(self.sv) 00126 buff.write(_struct_I.pack(length)) 00127 for val1 in self.sv: 00128 _x = val1 00129 buff.write(_struct_5Bbhi.pack(_x.chn, _x.svid, _x.flags, _x.quality, _x.cno, _x.elev, _x.azim, _x.prRes)) 00130 except struct.error as se: self._check_types(se) 00131 except TypeError as te: self._check_types(te) 00132 00133 def deserialize(self, str): 00134 """ 00135 unpack serialized message in str into this message instance 00136 @param str: byte array of serialized message 00137 @type str: str 00138 """ 00139 try: 00140 end = 0 00141 _x = self 00142 start = end 00143 end += 8 00144 (_x.iTOW, _x.numCh, _x.globalFlags, _x.reserved2,) = _struct_I2BH.unpack(str[start:end]) 00145 start = end 00146 end += 4 00147 (length,) = _struct_I.unpack(str[start:end]) 00148 self.sv = [] 00149 for i in range(0, length): 00150 val1 = ublox_msgs.msg.NavSVINFO_SV() 00151 _x = val1 00152 start = end 00153 end += 12 00154 (_x.chn, _x.svid, _x.flags, _x.quality, _x.cno, _x.elev, _x.azim, _x.prRes,) = _struct_5Bbhi.unpack(str[start:end]) 00155 self.sv.append(val1) 00156 return self 00157 except struct.error as e: 00158 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00159 00160 00161 def serialize_numpy(self, buff, numpy): 00162 """ 00163 serialize message with numpy array types into buffer 00164 @param buff: buffer 00165 @type buff: StringIO 00166 @param numpy: numpy python module 00167 @type numpy module 00168 """ 00169 try: 00170 _x = self 00171 buff.write(_struct_I2BH.pack(_x.iTOW, _x.numCh, _x.globalFlags, _x.reserved2)) 00172 length = len(self.sv) 00173 buff.write(_struct_I.pack(length)) 00174 for val1 in self.sv: 00175 _x = val1 00176 buff.write(_struct_5Bbhi.pack(_x.chn, _x.svid, _x.flags, _x.quality, _x.cno, _x.elev, _x.azim, _x.prRes)) 00177 except struct.error as se: self._check_types(se) 00178 except TypeError as te: self._check_types(te) 00179 00180 def deserialize_numpy(self, str, numpy): 00181 """ 00182 unpack serialized message in str into this message instance using numpy for array types 00183 @param str: byte array of serialized message 00184 @type str: str 00185 @param numpy: numpy python module 00186 @type numpy: module 00187 """ 00188 try: 00189 end = 0 00190 _x = self 00191 start = end 00192 end += 8 00193 (_x.iTOW, _x.numCh, _x.globalFlags, _x.reserved2,) = _struct_I2BH.unpack(str[start:end]) 00194 start = end 00195 end += 4 00196 (length,) = _struct_I.unpack(str[start:end]) 00197 self.sv = [] 00198 for i in range(0, length): 00199 val1 = ublox_msgs.msg.NavSVINFO_SV() 00200 _x = val1 00201 start = end 00202 end += 12 00203 (_x.chn, _x.svid, _x.flags, _x.quality, _x.cno, _x.elev, _x.azim, _x.prRes,) = _struct_5Bbhi.unpack(str[start:end]) 00204 self.sv.append(val1) 00205 return self 00206 except struct.error as e: 00207 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00208 00209 _struct_I = roslib.message.struct_I 00210 _struct_5Bbhi = struct.Struct("<5Bbhi") 00211 _struct_I2BH = struct.Struct("<I2BH")