_NavSTATUS.py
Go to the documentation of this file.
00001 """autogenerated by genpy from ublox_msgs/NavSTATUS.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 NavSTATUS(genpy.Message):
00009   _md5sum = "c59712aa2e07ac37df60d9b92f97d104"
00010   _type = "ublox_msgs/NavSTATUS"
00011   _has_header = False #flag to mark the presence of a Header object
00012   _full_text = """# NAV-STATUS (0x01 0x03)
00013 # Receiver Navigation Status
00014 #
00015 # See important comments concerning validity of position and velocity given in
00016 # section Navigation Output Filters.
00017 #
00018 
00019 uint8 CLASS_ID = 1
00020 uint8 MESSAGE_ID = 3
00021 
00022 uint32 iTOW             # GPS Millisecond time of week [ms]
00023 
00024 uint8 gpsFix            # GPSfix Type, range 0..5
00025 uint8 GPS_NO_FIX = 0
00026 uint8 GPS_DEAD_RECKONING_ONLY = 1
00027 uint8 GPS_2D_FIX = 2
00028 uint8 GPS_3D_FIX = 3
00029 uint8 GPS_GPS_DEAD_RECKONING_COMBINED = 4
00030 uint8 GPS_TIME_ONLY_FIX = 6
00031 
00032 uint8 flags             # Navigation Status Flags
00033 uint8 FLAGS_GPSFIXOK = 1      # i.e. within DOP & ACC Masks
00034 uint8 FLAGS_DIFFSOLN = 2      # DGPS used
00035 uint8 FLAGS_WKNSET = 4        # Week Number valid
00036 uint8 FLAGS_TOWSET = 8        # Time of Week valid
00037 
00038 uint8 fixStat           # Fix Status Information
00039 # DGPS Input Status:
00040 uint8 DGPSISTAT_MASK = 1
00041 uint8 DGPSISTAT_NONE = 0        # none
00042 uint8 DGPSISTAT_PR_PRR = 1      # PR+PRR Correction
00043 # map matching status:
00044 uint8 MAPMATCHING_MASK = 192
00045 uint8 MAPMATCHING_NONE = 0      # none
00046 uint8 MAPMATCHING_VALID = 64    # valid, i.e. map matching data was received, but was too old
00047 uint8 MAPMATCHING_USED = 128    # used, map matching data was applied
00048 uint8 MAPMATCHING_DR = 192      # DR, map matching was the reason to enable the dead reckoning gpsFix type instead of publishing no fix
00049 
00050 uint8 flags2            # further information about navigation output
00051 # power safe mode state (Only for FW version >= 7.01; undefined otherwise)
00052 uint8 PSMSTATE_ACQUISITION = 0                # ACQUISITION [or when psm disabled]
00053 uint8 PSMSTATE_TRACKING = 1                   # TRACKING
00054 uint8 PSMSTATE_POWER_OPTIMIZED_TRACKING = 2   # POWER OPTIMIZED TRACKING
00055 uint8 PSMSTATE_INACTIVE = 3                   # INACTIVE
00056 
00057 uint32 ttff             # Time to first fix (millisecond time tag)
00058 uint32 msss             # Milliseconds since Startup / Reset
00059 
00060 """
00061   # Pseudo-constants
00062   CLASS_ID = 1
00063   MESSAGE_ID = 3
00064   GPS_NO_FIX = 0
00065   GPS_DEAD_RECKONING_ONLY = 1
00066   GPS_2D_FIX = 2
00067   GPS_3D_FIX = 3
00068   GPS_GPS_DEAD_RECKONING_COMBINED = 4
00069   GPS_TIME_ONLY_FIX = 6
00070   FLAGS_GPSFIXOK = 1
00071   FLAGS_DIFFSOLN = 2
00072   FLAGS_WKNSET = 4
00073   FLAGS_TOWSET = 8
00074   DGPSISTAT_MASK = 1
00075   DGPSISTAT_NONE = 0
00076   DGPSISTAT_PR_PRR = 1
00077   MAPMATCHING_MASK = 192
00078   MAPMATCHING_NONE = 0
00079   MAPMATCHING_VALID = 64
00080   MAPMATCHING_USED = 128
00081   MAPMATCHING_DR = 192
00082   PSMSTATE_ACQUISITION = 0
00083   PSMSTATE_TRACKING = 1
00084   PSMSTATE_POWER_OPTIMIZED_TRACKING = 2
00085   PSMSTATE_INACTIVE = 3
00086 
00087   __slots__ = ['iTOW','gpsFix','flags','fixStat','flags2','ttff','msss']
00088   _slot_types = ['uint32','uint8','uint8','uint8','uint8','uint32','uint32']
00089 
00090   def __init__(self, *args, **kwds):
00091     """
00092     Constructor. Any message fields that are implicitly/explicitly
00093     set to None will be assigned a default value. The recommend
00094     use is keyword arguments as this is more robust to future message
00095     changes.  You cannot mix in-order arguments and keyword arguments.
00096 
00097     The available fields are:
00098        iTOW,gpsFix,flags,fixStat,flags2,ttff,msss
00099 
00100     :param args: complete set of field values, in .msg order
00101     :param kwds: use keyword arguments corresponding to message field names
00102     to set specific fields.
00103     """
00104     if args or kwds:
00105       super(NavSTATUS, self).__init__(*args, **kwds)
00106       #message fields cannot be None, assign default values for those that are
00107       if self.iTOW is None:
00108         self.iTOW = 0
00109       if self.gpsFix is None:
00110         self.gpsFix = 0
00111       if self.flags is None:
00112         self.flags = 0
00113       if self.fixStat is None:
00114         self.fixStat = 0
00115       if self.flags2 is None:
00116         self.flags2 = 0
00117       if self.ttff is None:
00118         self.ttff = 0
00119       if self.msss is None:
00120         self.msss = 0
00121     else:
00122       self.iTOW = 0
00123       self.gpsFix = 0
00124       self.flags = 0
00125       self.fixStat = 0
00126       self.flags2 = 0
00127       self.ttff = 0
00128       self.msss = 0
00129 
00130   def _get_types(self):
00131     """
00132     internal API method
00133     """
00134     return self._slot_types
00135 
00136   def serialize(self, buff):
00137     """
00138     serialize message into buffer
00139     :param buff: buffer, ``StringIO``
00140     """
00141     try:
00142       _x = self
00143       buff.write(_struct_I4B2I.pack(_x.iTOW, _x.gpsFix, _x.flags, _x.fixStat, _x.flags2, _x.ttff, _x.msss))
00144     except struct.error as se: self._check_types(se)
00145     except TypeError as te: self._check_types(te)
00146 
00147   def deserialize(self, str):
00148     """
00149     unpack serialized message in str into this message instance
00150     :param str: byte array of serialized message, ``str``
00151     """
00152     try:
00153       end = 0
00154       _x = self
00155       start = end
00156       end += 16
00157       (_x.iTOW, _x.gpsFix, _x.flags, _x.fixStat, _x.flags2, _x.ttff, _x.msss,) = _struct_I4B2I.unpack(str[start:end])
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_I4B2I.pack(_x.iTOW, _x.gpsFix, _x.flags, _x.fixStat, _x.flags2, _x.ttff, _x.msss))
00172     except struct.error as se: self._check_types(se)
00173     except TypeError as te: self._check_types(te)
00174 
00175   def deserialize_numpy(self, str, numpy):
00176     """
00177     unpack serialized message in str into this message instance using numpy for array types
00178     :param str: byte array of serialized message, ``str``
00179     :param numpy: numpy python module
00180     """
00181     try:
00182       end = 0
00183       _x = self
00184       start = end
00185       end += 16
00186       (_x.iTOW, _x.gpsFix, _x.flags, _x.fixStat, _x.flags2, _x.ttff, _x.msss,) = _struct_I4B2I.unpack(str[start:end])
00187       return self
00188     except struct.error as e:
00189       raise genpy.DeserializationError(e) #most likely buffer underfill
00190 
00191 _struct_I = genpy.struct_I
00192 _struct_I4B2I = struct.Struct("<I4B2I")
 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