00001
00002 #ifndef CLEARPATH_SENSORS_MESSAGE_GPSSTATUS_H
00003 #define CLEARPATH_SENSORS_MESSAGE_GPSSTATUS_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "std_msgs/Header.h"
00014
00015 namespace clearpath_sensors
00016 {
00017 template <class ContainerAllocator>
00018 struct GPSStatus_ : public ros::Message
00019 {
00020 typedef GPSStatus_<ContainerAllocator> Type;
00021
00022 GPSStatus_()
00023 : header()
00024 , satellites_used(0)
00025 , satellite_used_prn()
00026 , satellites_visible(0)
00027 , satellite_visible_prn()
00028 , satellite_visible_z()
00029 , satellite_visible_azimuth()
00030 , satellite_visible_snr()
00031 , status(0)
00032 , motion_source(0)
00033 , orientation_source(0)
00034 , position_source(0)
00035 {
00036 }
00037
00038 GPSStatus_(const ContainerAllocator& _alloc)
00039 : header(_alloc)
00040 , satellites_used(0)
00041 , satellite_used_prn(_alloc)
00042 , satellites_visible(0)
00043 , satellite_visible_prn(_alloc)
00044 , satellite_visible_z(_alloc)
00045 , satellite_visible_azimuth(_alloc)
00046 , satellite_visible_snr(_alloc)
00047 , status(0)
00048 , motion_source(0)
00049 , orientation_source(0)
00050 , position_source(0)
00051 {
00052 }
00053
00054 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00055 ::std_msgs::Header_<ContainerAllocator> header;
00056
00057 typedef uint16_t _satellites_used_type;
00058 uint16_t satellites_used;
00059
00060 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _satellite_used_prn_type;
00061 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > satellite_used_prn;
00062
00063 typedef uint16_t _satellites_visible_type;
00064 uint16_t satellites_visible;
00065
00066 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _satellite_visible_prn_type;
00067 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > satellite_visible_prn;
00068
00069 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _satellite_visible_z_type;
00070 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > satellite_visible_z;
00071
00072 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _satellite_visible_azimuth_type;
00073 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > satellite_visible_azimuth;
00074
00075 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _satellite_visible_snr_type;
00076 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > satellite_visible_snr;
00077
00078 typedef int16_t _status_type;
00079 int16_t status;
00080
00081 typedef uint16_t _motion_source_type;
00082 uint16_t motion_source;
00083
00084 typedef uint16_t _orientation_source_type;
00085 uint16_t orientation_source;
00086
00087 typedef uint16_t _position_source_type;
00088 uint16_t position_source;
00089
00090 enum { STATUS_NO_FIX = -1 };
00091 enum { STATUS_FIX = 0 };
00092 enum { STATUS_SBAS_FIX = 1 };
00093 enum { STATUS_GBAS_FIX = 2 };
00094 enum { STATUS_DGPS_FIX = 18 };
00095 enum { STATUS_WAAS_FIX = 33 };
00096 enum { SOURCE_NONE = 0 };
00097 enum { SOURCE_GPS = 1 };
00098 enum { SOURCE_POINTS = 2 };
00099 enum { SOURCE_DOPPLER = 4 };
00100 enum { SOURCE_ALTIMETER = 8 };
00101 enum { SOURCE_MAGNETIC = 16 };
00102 enum { SOURCE_GYRO = 32 };
00103 enum { SOURCE_ACCEL = 64 };
00104
00105 ROS_DEPRECATED uint32_t get_satellite_used_prn_size() const { return (uint32_t)satellite_used_prn.size(); }
00106 ROS_DEPRECATED void set_satellite_used_prn_size(uint32_t size) { satellite_used_prn.resize((size_t)size); }
00107 ROS_DEPRECATED void get_satellite_used_prn_vec(std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) const { vec = this->satellite_used_prn; }
00108 ROS_DEPRECATED void set_satellite_used_prn_vec(const std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) { this->satellite_used_prn = vec; }
00109 ROS_DEPRECATED uint32_t get_satellite_visible_prn_size() const { return (uint32_t)satellite_visible_prn.size(); }
00110 ROS_DEPRECATED void set_satellite_visible_prn_size(uint32_t size) { satellite_visible_prn.resize((size_t)size); }
00111 ROS_DEPRECATED void get_satellite_visible_prn_vec(std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) const { vec = this->satellite_visible_prn; }
00112 ROS_DEPRECATED void set_satellite_visible_prn_vec(const std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) { this->satellite_visible_prn = vec; }
00113 ROS_DEPRECATED uint32_t get_satellite_visible_z_size() const { return (uint32_t)satellite_visible_z.size(); }
00114 ROS_DEPRECATED void set_satellite_visible_z_size(uint32_t size) { satellite_visible_z.resize((size_t)size); }
00115 ROS_DEPRECATED void get_satellite_visible_z_vec(std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) const { vec = this->satellite_visible_z; }
00116 ROS_DEPRECATED void set_satellite_visible_z_vec(const std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) { this->satellite_visible_z = vec; }
00117 ROS_DEPRECATED uint32_t get_satellite_visible_azimuth_size() const { return (uint32_t)satellite_visible_azimuth.size(); }
00118 ROS_DEPRECATED void set_satellite_visible_azimuth_size(uint32_t size) { satellite_visible_azimuth.resize((size_t)size); }
00119 ROS_DEPRECATED void get_satellite_visible_azimuth_vec(std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) const { vec = this->satellite_visible_azimuth; }
00120 ROS_DEPRECATED void set_satellite_visible_azimuth_vec(const std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) { this->satellite_visible_azimuth = vec; }
00121 ROS_DEPRECATED uint32_t get_satellite_visible_snr_size() const { return (uint32_t)satellite_visible_snr.size(); }
00122 ROS_DEPRECATED void set_satellite_visible_snr_size(uint32_t size) { satellite_visible_snr.resize((size_t)size); }
00123 ROS_DEPRECATED void get_satellite_visible_snr_vec(std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) const { vec = this->satellite_visible_snr; }
00124 ROS_DEPRECATED void set_satellite_visible_snr_vec(const std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) { this->satellite_visible_snr = vec; }
00125 private:
00126 static const char* __s_getDataType_() { return "clearpath_sensors/GPSStatus"; }
00127 public:
00128 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00129
00130 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00131
00132 private:
00133 static const char* __s_getMD5Sum_() { return "313baa8951fdd056c78bf61b1b07d249"; }
00134 public:
00135 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00136
00137 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00138
00139 private:
00140 static const char* __s_getMessageDefinition_() { return "Header header\n\
00141 \n\
00142 # Satellites used in solution\n\
00143 uint16 satellites_used # Number of satellites\n\
00144 int32[] satellite_used_prn # PRN identifiers\n\
00145 \n\
00146 # Satellites visible\n\
00147 uint16 satellites_visible\n\
00148 int32[] satellite_visible_prn # PRN identifiers\n\
00149 int32[] satellite_visible_z # Elevation of satellites\n\
00150 int32[] satellite_visible_azimuth # Azimuth of satellites\n\
00151 int32[] satellite_visible_snr # Signal-to-noise ratios (dB)\n\
00152 \n\
00153 # Measurement status\n\
00154 int16 STATUS_NO_FIX=-1 # Unable to fix position\n\
00155 int16 STATUS_FIX=0 # Normal fix\n\
00156 int16 STATUS_SBAS_FIX=1 # Fixed using a satellite-based augmentation system\n\
00157 int16 STATUS_GBAS_FIX=2 # or a ground-based augmentation system\n\
00158 int16 STATUS_DGPS_FIX=18 # Fixed with DGPS\n\
00159 int16 STATUS_WAAS_FIX=33 # Fixed with WAAS\n\
00160 int16 status\n\
00161 \n\
00162 uint16 SOURCE_NONE=0 # No information is available\n\
00163 uint16 SOURCE_GPS=1 # Using standard GPS location [only valid for position_source]\n\
00164 uint16 SOURCE_POINTS=2 # Motion/orientation fix is derived from successive points\n\
00165 uint16 SOURCE_DOPPLER=4 # Motion is derived using the Doppler effect\n\
00166 uint16 SOURCE_ALTIMETER=8 # Using an altimeter\n\
00167 uint16 SOURCE_MAGNETIC=16 # Using magnetic sensors\n\
00168 uint16 SOURCE_GYRO=32 # Using gyroscopes\n\
00169 uint16 SOURCE_ACCEL=64 # Using accelerometers\n\
00170 \n\
00171 uint16 motion_source # Source for speed, climb and track\n\
00172 uint16 orientation_source # Source for device orientation\n\
00173 uint16 position_source # Source for position\n\
00174 \n\
00175 \n\
00176 ================================================================================\n\
00177 MSG: std_msgs/Header\n\
00178 # Standard metadata for higher-level stamped data types.\n\
00179 # This is generally used to communicate timestamped data \n\
00180 # in a particular coordinate frame.\n\
00181 # \n\
00182 # sequence ID: consecutively increasing ID \n\
00183 uint32 seq\n\
00184 #Two-integer timestamp that is expressed as:\n\
00185 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00186 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00187 # time-handling sugar is provided by the client library\n\
00188 time stamp\n\
00189 #Frame this data is associated with\n\
00190 # 0: no frame\n\
00191 # 1: global frame\n\
00192 string frame_id\n\
00193 \n\
00194 "; }
00195 public:
00196 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00197
00198 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00199
00200 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00201 {
00202 ros::serialization::OStream stream(write_ptr, 1000000000);
00203 ros::serialization::serialize(stream, header);
00204 ros::serialization::serialize(stream, satellites_used);
00205 ros::serialization::serialize(stream, satellite_used_prn);
00206 ros::serialization::serialize(stream, satellites_visible);
00207 ros::serialization::serialize(stream, satellite_visible_prn);
00208 ros::serialization::serialize(stream, satellite_visible_z);
00209 ros::serialization::serialize(stream, satellite_visible_azimuth);
00210 ros::serialization::serialize(stream, satellite_visible_snr);
00211 ros::serialization::serialize(stream, status);
00212 ros::serialization::serialize(stream, motion_source);
00213 ros::serialization::serialize(stream, orientation_source);
00214 ros::serialization::serialize(stream, position_source);
00215 return stream.getData();
00216 }
00217
00218 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00219 {
00220 ros::serialization::IStream stream(read_ptr, 1000000000);
00221 ros::serialization::deserialize(stream, header);
00222 ros::serialization::deserialize(stream, satellites_used);
00223 ros::serialization::deserialize(stream, satellite_used_prn);
00224 ros::serialization::deserialize(stream, satellites_visible);
00225 ros::serialization::deserialize(stream, satellite_visible_prn);
00226 ros::serialization::deserialize(stream, satellite_visible_z);
00227 ros::serialization::deserialize(stream, satellite_visible_azimuth);
00228 ros::serialization::deserialize(stream, satellite_visible_snr);
00229 ros::serialization::deserialize(stream, status);
00230 ros::serialization::deserialize(stream, motion_source);
00231 ros::serialization::deserialize(stream, orientation_source);
00232 ros::serialization::deserialize(stream, position_source);
00233 return stream.getData();
00234 }
00235
00236 ROS_DEPRECATED virtual uint32_t serializationLength() const
00237 {
00238 uint32_t size = 0;
00239 size += ros::serialization::serializationLength(header);
00240 size += ros::serialization::serializationLength(satellites_used);
00241 size += ros::serialization::serializationLength(satellite_used_prn);
00242 size += ros::serialization::serializationLength(satellites_visible);
00243 size += ros::serialization::serializationLength(satellite_visible_prn);
00244 size += ros::serialization::serializationLength(satellite_visible_z);
00245 size += ros::serialization::serializationLength(satellite_visible_azimuth);
00246 size += ros::serialization::serializationLength(satellite_visible_snr);
00247 size += ros::serialization::serializationLength(status);
00248 size += ros::serialization::serializationLength(motion_source);
00249 size += ros::serialization::serializationLength(orientation_source);
00250 size += ros::serialization::serializationLength(position_source);
00251 return size;
00252 }
00253
00254 typedef boost::shared_ptr< ::clearpath_sensors::GPSStatus_<ContainerAllocator> > Ptr;
00255 typedef boost::shared_ptr< ::clearpath_sensors::GPSStatus_<ContainerAllocator> const> ConstPtr;
00256 };
00257 typedef ::clearpath_sensors::GPSStatus_<std::allocator<void> > GPSStatus;
00258
00259 typedef boost::shared_ptr< ::clearpath_sensors::GPSStatus> GPSStatusPtr;
00260 typedef boost::shared_ptr< ::clearpath_sensors::GPSStatus const> GPSStatusConstPtr;
00261
00262
00263 template<typename ContainerAllocator>
00264 std::ostream& operator<<(std::ostream& s, const ::clearpath_sensors::GPSStatus_<ContainerAllocator> & v)
00265 {
00266 ros::message_operations::Printer< ::clearpath_sensors::GPSStatus_<ContainerAllocator> >::stream(s, "", v);
00267 return s;}
00268
00269 }
00270
00271 namespace ros
00272 {
00273 namespace message_traits
00274 {
00275 template<class ContainerAllocator>
00276 struct MD5Sum< ::clearpath_sensors::GPSStatus_<ContainerAllocator> > {
00277 static const char* value()
00278 {
00279 return "313baa8951fdd056c78bf61b1b07d249";
00280 }
00281
00282 static const char* value(const ::clearpath_sensors::GPSStatus_<ContainerAllocator> &) { return value(); }
00283 static const uint64_t static_value1 = 0x313baa8951fdd056ULL;
00284 static const uint64_t static_value2 = 0xc78bf61b1b07d249ULL;
00285 };
00286
00287 template<class ContainerAllocator>
00288 struct DataType< ::clearpath_sensors::GPSStatus_<ContainerAllocator> > {
00289 static const char* value()
00290 {
00291 return "clearpath_sensors/GPSStatus";
00292 }
00293
00294 static const char* value(const ::clearpath_sensors::GPSStatus_<ContainerAllocator> &) { return value(); }
00295 };
00296
00297 template<class ContainerAllocator>
00298 struct Definition< ::clearpath_sensors::GPSStatus_<ContainerAllocator> > {
00299 static const char* value()
00300 {
00301 return "Header header\n\
00302 \n\
00303 # Satellites used in solution\n\
00304 uint16 satellites_used # Number of satellites\n\
00305 int32[] satellite_used_prn # PRN identifiers\n\
00306 \n\
00307 # Satellites visible\n\
00308 uint16 satellites_visible\n\
00309 int32[] satellite_visible_prn # PRN identifiers\n\
00310 int32[] satellite_visible_z # Elevation of satellites\n\
00311 int32[] satellite_visible_azimuth # Azimuth of satellites\n\
00312 int32[] satellite_visible_snr # Signal-to-noise ratios (dB)\n\
00313 \n\
00314 # Measurement status\n\
00315 int16 STATUS_NO_FIX=-1 # Unable to fix position\n\
00316 int16 STATUS_FIX=0 # Normal fix\n\
00317 int16 STATUS_SBAS_FIX=1 # Fixed using a satellite-based augmentation system\n\
00318 int16 STATUS_GBAS_FIX=2 # or a ground-based augmentation system\n\
00319 int16 STATUS_DGPS_FIX=18 # Fixed with DGPS\n\
00320 int16 STATUS_WAAS_FIX=33 # Fixed with WAAS\n\
00321 int16 status\n\
00322 \n\
00323 uint16 SOURCE_NONE=0 # No information is available\n\
00324 uint16 SOURCE_GPS=1 # Using standard GPS location [only valid for position_source]\n\
00325 uint16 SOURCE_POINTS=2 # Motion/orientation fix is derived from successive points\n\
00326 uint16 SOURCE_DOPPLER=4 # Motion is derived using the Doppler effect\n\
00327 uint16 SOURCE_ALTIMETER=8 # Using an altimeter\n\
00328 uint16 SOURCE_MAGNETIC=16 # Using magnetic sensors\n\
00329 uint16 SOURCE_GYRO=32 # Using gyroscopes\n\
00330 uint16 SOURCE_ACCEL=64 # Using accelerometers\n\
00331 \n\
00332 uint16 motion_source # Source for speed, climb and track\n\
00333 uint16 orientation_source # Source for device orientation\n\
00334 uint16 position_source # Source for position\n\
00335 \n\
00336 \n\
00337 ================================================================================\n\
00338 MSG: std_msgs/Header\n\
00339 # Standard metadata for higher-level stamped data types.\n\
00340 # This is generally used to communicate timestamped data \n\
00341 # in a particular coordinate frame.\n\
00342 # \n\
00343 # sequence ID: consecutively increasing ID \n\
00344 uint32 seq\n\
00345 #Two-integer timestamp that is expressed as:\n\
00346 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00347 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00348 # time-handling sugar is provided by the client library\n\
00349 time stamp\n\
00350 #Frame this data is associated with\n\
00351 # 0: no frame\n\
00352 # 1: global frame\n\
00353 string frame_id\n\
00354 \n\
00355 ";
00356 }
00357
00358 static const char* value(const ::clearpath_sensors::GPSStatus_<ContainerAllocator> &) { return value(); }
00359 };
00360
00361 template<class ContainerAllocator> struct HasHeader< ::clearpath_sensors::GPSStatus_<ContainerAllocator> > : public TrueType {};
00362 template<class ContainerAllocator> struct HasHeader< const ::clearpath_sensors::GPSStatus_<ContainerAllocator> > : public TrueType {};
00363 }
00364 }
00365
00366 namespace ros
00367 {
00368 namespace serialization
00369 {
00370
00371 template<class ContainerAllocator> struct Serializer< ::clearpath_sensors::GPSStatus_<ContainerAllocator> >
00372 {
00373 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00374 {
00375 stream.next(m.header);
00376 stream.next(m.satellites_used);
00377 stream.next(m.satellite_used_prn);
00378 stream.next(m.satellites_visible);
00379 stream.next(m.satellite_visible_prn);
00380 stream.next(m.satellite_visible_z);
00381 stream.next(m.satellite_visible_azimuth);
00382 stream.next(m.satellite_visible_snr);
00383 stream.next(m.status);
00384 stream.next(m.motion_source);
00385 stream.next(m.orientation_source);
00386 stream.next(m.position_source);
00387 }
00388
00389 ROS_DECLARE_ALLINONE_SERIALIZER;
00390 };
00391 }
00392 }
00393
00394 namespace ros
00395 {
00396 namespace message_operations
00397 {
00398
00399 template<class ContainerAllocator>
00400 struct Printer< ::clearpath_sensors::GPSStatus_<ContainerAllocator> >
00401 {
00402 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::clearpath_sensors::GPSStatus_<ContainerAllocator> & v)
00403 {
00404 s << indent << "header: ";
00405 s << std::endl;
00406 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00407 s << indent << "satellites_used: ";
00408 Printer<uint16_t>::stream(s, indent + " ", v.satellites_used);
00409 s << indent << "satellite_used_prn[]" << std::endl;
00410 for (size_t i = 0; i < v.satellite_used_prn.size(); ++i)
00411 {
00412 s << indent << " satellite_used_prn[" << i << "]: ";
00413 Printer<int32_t>::stream(s, indent + " ", v.satellite_used_prn[i]);
00414 }
00415 s << indent << "satellites_visible: ";
00416 Printer<uint16_t>::stream(s, indent + " ", v.satellites_visible);
00417 s << indent << "satellite_visible_prn[]" << std::endl;
00418 for (size_t i = 0; i < v.satellite_visible_prn.size(); ++i)
00419 {
00420 s << indent << " satellite_visible_prn[" << i << "]: ";
00421 Printer<int32_t>::stream(s, indent + " ", v.satellite_visible_prn[i]);
00422 }
00423 s << indent << "satellite_visible_z[]" << std::endl;
00424 for (size_t i = 0; i < v.satellite_visible_z.size(); ++i)
00425 {
00426 s << indent << " satellite_visible_z[" << i << "]: ";
00427 Printer<int32_t>::stream(s, indent + " ", v.satellite_visible_z[i]);
00428 }
00429 s << indent << "satellite_visible_azimuth[]" << std::endl;
00430 for (size_t i = 0; i < v.satellite_visible_azimuth.size(); ++i)
00431 {
00432 s << indent << " satellite_visible_azimuth[" << i << "]: ";
00433 Printer<int32_t>::stream(s, indent + " ", v.satellite_visible_azimuth[i]);
00434 }
00435 s << indent << "satellite_visible_snr[]" << std::endl;
00436 for (size_t i = 0; i < v.satellite_visible_snr.size(); ++i)
00437 {
00438 s << indent << " satellite_visible_snr[" << i << "]: ";
00439 Printer<int32_t>::stream(s, indent + " ", v.satellite_visible_snr[i]);
00440 }
00441 s << indent << "status: ";
00442 Printer<int16_t>::stream(s, indent + " ", v.status);
00443 s << indent << "motion_source: ";
00444 Printer<uint16_t>::stream(s, indent + " ", v.motion_source);
00445 s << indent << "orientation_source: ";
00446 Printer<uint16_t>::stream(s, indent + " ", v.orientation_source);
00447 s << indent << "position_source: ";
00448 Printer<uint16_t>::stream(s, indent + " ", v.position_source);
00449 }
00450 };
00451
00452
00453 }
00454 }
00455
00456 #endif // CLEARPATH_SENSORS_MESSAGE_GPSSTATUS_H
00457