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