$search
00001 """autogenerated by genmsg_py from NavSOL.msg. Do not edit.""" 00002 import roslib.message 00003 import struct 00004 00005 00006 class NavSOL(roslib.message.Message): 00007 _md5sum = "1cf640142041f69c0d0e9f5d8a03729e" 00008 _type = "ublox_msgs/NavSOL" 00009 _has_header = False #flag to mark the presence of a Header object 00010 _full_text = """# NAV-SOL (0x01 0x06) 00011 # Navigation Solution Information 00012 # 00013 # This message combines Position, velocity and time solution in ECEF, including accuracy 00014 # figures 00015 # 00016 00017 uint8 CLASS_ID = 1 00018 uint8 MESSAGE_ID = 6 00019 00020 uint32 iTOW # GPS Millisecond time of week [ms] 00021 int32 fTOW # Fractional Nanoseconds remainder of rounded 00022 # ms above, range -500000 .. 500000 [ns] 00023 int16 week # GPS week (GPS time) 00024 00025 uint8 gpsFix # GPSfix Type, range 0..5 00026 uint8 GPS_NO_FIX = 0 00027 uint8 GPS_DEAD_RECKONING_ONLY = 1 00028 uint8 GPS_2D_FIX = 2 00029 uint8 GPS_3D_FIX = 3 00030 uint8 GPS_GPS_DEAD_RECKONING_COMBINED = 4 00031 uint8 GPS_TIME_ONLY_FIX = 6 00032 00033 uint8 flags # Fix Status Flags 00034 uint8 FLAGS_GPSFIXOK = 1 # i.e. within DOP & ACC Masks 00035 uint8 FLAGS_DIFFSOLN = 2 # DGPS used 00036 uint8 FLAGS_WKNSET = 4 # Week Number valid 00037 uint8 FLAGS_TOWSET = 8 # Time of Week valid 00038 00039 int32 ecefX # ECEF X coordinate [cm] 00040 int32 ecefY # ECEF Y coordinate [cm] 00041 int32 ecefZ # ECEF Z coordinate [cm] 00042 uint32 pAcc # 3D Position Accuracy Estimate [cm] 00043 int32 ecefVX # ECEF X velocity [cm/s] 00044 int32 ecefVY # ECEF Y velocity [cm/s] 00045 int32 ecefVZ # ECEF Z velocity [cm/s] 00046 uint32 sAcc # Speed Accuracy Estimate [cm/s] 00047 uint16 pDOP # Position DOP [cm] 00048 uint8 reserved1 # Reserved 00049 uint8 numSV # Number of SVs used in Nav Solution 00050 uint32 reserved2 # Reserved 00051 00052 """ 00053 # Pseudo-constants 00054 CLASS_ID = 1 00055 MESSAGE_ID = 6 00056 GPS_NO_FIX = 0 00057 GPS_DEAD_RECKONING_ONLY = 1 00058 GPS_2D_FIX = 2 00059 GPS_3D_FIX = 3 00060 GPS_GPS_DEAD_RECKONING_COMBINED = 4 00061 GPS_TIME_ONLY_FIX = 6 00062 FLAGS_GPSFIXOK = 1 00063 FLAGS_DIFFSOLN = 2 00064 FLAGS_WKNSET = 4 00065 FLAGS_TOWSET = 8 00066 00067 __slots__ = ['iTOW','fTOW','week','gpsFix','flags','ecefX','ecefY','ecefZ','pAcc','ecefVX','ecefVY','ecefVZ','sAcc','pDOP','reserved1','numSV','reserved2'] 00068 _slot_types = ['uint32','int32','int16','uint8','uint8','int32','int32','int32','uint32','int32','int32','int32','uint32','uint16','uint8','uint8','uint32'] 00069 00070 def __init__(self, *args, **kwds): 00071 """ 00072 Constructor. Any message fields that are implicitly/explicitly 00073 set to None will be assigned a default value. The recommend 00074 use is keyword arguments as this is more robust to future message 00075 changes. You cannot mix in-order arguments and keyword arguments. 00076 00077 The available fields are: 00078 iTOW,fTOW,week,gpsFix,flags,ecefX,ecefY,ecefZ,pAcc,ecefVX,ecefVY,ecefVZ,sAcc,pDOP,reserved1,numSV,reserved2 00079 00080 @param args: complete set of field values, in .msg order 00081 @param kwds: use keyword arguments corresponding to message field names 00082 to set specific fields. 00083 """ 00084 if args or kwds: 00085 super(NavSOL, self).__init__(*args, **kwds) 00086 #message fields cannot be None, assign default values for those that are 00087 if self.iTOW is None: 00088 self.iTOW = 0 00089 if self.fTOW is None: 00090 self.fTOW = 0 00091 if self.week is None: 00092 self.week = 0 00093 if self.gpsFix is None: 00094 self.gpsFix = 0 00095 if self.flags is None: 00096 self.flags = 0 00097 if self.ecefX is None: 00098 self.ecefX = 0 00099 if self.ecefY is None: 00100 self.ecefY = 0 00101 if self.ecefZ is None: 00102 self.ecefZ = 0 00103 if self.pAcc is None: 00104 self.pAcc = 0 00105 if self.ecefVX is None: 00106 self.ecefVX = 0 00107 if self.ecefVY is None: 00108 self.ecefVY = 0 00109 if self.ecefVZ is None: 00110 self.ecefVZ = 0 00111 if self.sAcc is None: 00112 self.sAcc = 0 00113 if self.pDOP is None: 00114 self.pDOP = 0 00115 if self.reserved1 is None: 00116 self.reserved1 = 0 00117 if self.numSV is None: 00118 self.numSV = 0 00119 if self.reserved2 is None: 00120 self.reserved2 = 0 00121 else: 00122 self.iTOW = 0 00123 self.fTOW = 0 00124 self.week = 0 00125 self.gpsFix = 0 00126 self.flags = 0 00127 self.ecefX = 0 00128 self.ecefY = 0 00129 self.ecefZ = 0 00130 self.pAcc = 0 00131 self.ecefVX = 0 00132 self.ecefVY = 0 00133 self.ecefVZ = 0 00134 self.sAcc = 0 00135 self.pDOP = 0 00136 self.reserved1 = 0 00137 self.numSV = 0 00138 self.reserved2 = 0 00139 00140 def _get_types(self): 00141 """ 00142 internal API method 00143 """ 00144 return self._slot_types 00145 00146 def serialize(self, buff): 00147 """ 00148 serialize message into buffer 00149 @param buff: buffer 00150 @type buff: StringIO 00151 """ 00152 try: 00153 _x = self 00154 buff.write(_struct_Iih2B3iI3iIH2BI.pack(_x.iTOW, _x.fTOW, _x.week, _x.gpsFix, _x.flags, _x.ecefX, _x.ecefY, _x.ecefZ, _x.pAcc, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc, _x.pDOP, _x.reserved1, _x.numSV, _x.reserved2)) 00155 except struct.error as se: self._check_types(se) 00156 except TypeError as te: self._check_types(te) 00157 00158 def deserialize(self, str): 00159 """ 00160 unpack serialized message in str into this message instance 00161 @param str: byte array of serialized message 00162 @type str: str 00163 """ 00164 try: 00165 end = 0 00166 _x = self 00167 start = end 00168 end += 52 00169 (_x.iTOW, _x.fTOW, _x.week, _x.gpsFix, _x.flags, _x.ecefX, _x.ecefY, _x.ecefZ, _x.pAcc, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc, _x.pDOP, _x.reserved1, _x.numSV, _x.reserved2,) = _struct_Iih2B3iI3iIH2BI.unpack(str[start:end]) 00170 return self 00171 except struct.error as e: 00172 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00173 00174 00175 def serialize_numpy(self, buff, numpy): 00176 """ 00177 serialize message with numpy array types into buffer 00178 @param buff: buffer 00179 @type buff: StringIO 00180 @param numpy: numpy python module 00181 @type numpy module 00182 """ 00183 try: 00184 _x = self 00185 buff.write(_struct_Iih2B3iI3iIH2BI.pack(_x.iTOW, _x.fTOW, _x.week, _x.gpsFix, _x.flags, _x.ecefX, _x.ecefY, _x.ecefZ, _x.pAcc, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc, _x.pDOP, _x.reserved1, _x.numSV, _x.reserved2)) 00186 except struct.error as se: self._check_types(se) 00187 except TypeError as te: self._check_types(te) 00188 00189 def deserialize_numpy(self, str, numpy): 00190 """ 00191 unpack serialized message in str into this message instance using numpy for array types 00192 @param str: byte array of serialized message 00193 @type str: str 00194 @param numpy: numpy python module 00195 @type numpy: module 00196 """ 00197 try: 00198 end = 0 00199 _x = self 00200 start = end 00201 end += 52 00202 (_x.iTOW, _x.fTOW, _x.week, _x.gpsFix, _x.flags, _x.ecefX, _x.ecefY, _x.ecefZ, _x.pAcc, _x.ecefVX, _x.ecefVY, _x.ecefVZ, _x.sAcc, _x.pDOP, _x.reserved1, _x.numSV, _x.reserved2,) = _struct_Iih2B3iI3iIH2BI.unpack(str[start:end]) 00203 return self 00204 except struct.error as e: 00205 raise roslib.message.DeserializationError(e) #most likely buffer underfill 00206 00207 _struct_I = roslib.message.struct_I 00208 _struct_Iih2B3iI3iIH2BI = struct.Struct("<Iih2B3iI3iIH2BI")