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