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