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


ublox_msgs
Author(s): Johannes Meyer
autogenerated on Mon Jul 15 2013 16:55:23