Main MRPT website > C++ reference for MRPT 1.5.7
gnss_messages_topcon.cpp
Go to the documentation of this file.
1 /* +---------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | http://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2017, Individual contributors, see AUTHORS file |
6  | See: http://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See details in http://www.mrpt.org/License |
8  +---------------------------------------------------------------------------+ */
9 
10 #include "obs-precomp.h" // Precompiled headers
11 
13 #include <mrpt/math/matrix_serialization.h> // for << of matrices
14 
15 using namespace std;
16 using namespace mrpt::obs::gnss;
17 
18 Message_TOPCON_PZS::Message_TOPCON_PZS() :
20  latitude_degrees(0),
21  longitude_degrees(0),
22  height_meters(0),
23  RTK_height_meters(0),
24  PSigma(0),
25  angle_transmitter(0),
26  nId(0),
27  Fix(0),
28  TXBattery(0),
29  RXBattery(0),
30  error(0),
31  hasCartesianPosVel(false),
32  cartesian_x(0),cartesian_y(0),cartesian_z(0),
33  cartesian_vx(0),cartesian_vy(0),cartesian_vz(0),
34  hasPosCov(false),
35  pos_covariance(),
36  hasVelCov(false),
37  vel_covariance(),
38  hasStats(false),
39  stats_GPS_sats_used(0),
40  stats_GLONASS_sats_used(0)
41 {}
42 
44 {
45  out.printf("\n[TopCon PZS datum]\n");
46  out.printf(" Longitude: %.09f deg Latitude: %.09f deg Height: %.03f m (%.03f m without NBeam) \n",
51 
52  out.printf(" PZL-ID: %i Angle trans: %.05f deg\n ",
53  (int)nId,
55  );
56 
57  out.printf(" Fix: %i ",(int)Fix);
58  out.printf(" Error: %i ",(int)error);
59  out.printf(" Battery levels: TX=%i RX=%i\n ",TXBattery,RXBattery);
60 
61  out.printf(" hasCartesianPosVel= %s", hasCartesianPosVel ? "YES -> ":"NO\n");
63  {
64  out.printf(" x=%f y=%f z=%f\n",cartesian_x,cartesian_y,cartesian_z);
65  out.printf(" vx=%f vy=%f vz=%f\n",cartesian_vx,cartesian_vy,cartesian_vz);
66  }
67  out.printf("hasPosCov = %s", hasPosCov ? "YES\n":"NO\n");
68  if (hasPosCov)
69  out.printf("%s\n", pos_covariance.inMatlabFormat().c_str() );
70 
71  out.printf("hasVelCov = %s", hasVelCov ? "YES\n":"NO\n");
72  if (hasVelCov)
73  out.printf("%s\n", vel_covariance.inMatlabFormat().c_str() );
74 
75  out.printf("hasStats = %s", hasStats? "YES: ":"NO\n");
76  if(hasStats)
77  out.printf("GPS sats used: %i GLONASS sats used: %i RTK Fix progress:%i%%\n", (int)stats_GPS_sats_used, (int)stats_GLONASS_sats_used,(int)stats_rtk_fix_progress);
78 }
79 
81 {
82  out <<
86  Fix << TXBattery << RXBattery << error <<
92 }
93 
95 {
96  in >>
100  Fix >> TXBattery >> RXBattery >> error >>
106 }
107 
108 // -------------
111 {
112 }
113 
115 {
116  out.printf("\n[TopCon SATS datum]\n");
117  out.printf(" USI ELEV AZIM (%u entries) \n",static_cast<unsigned int>(USIs.size()));
118 
119  ASSERT_(USIs.size()==AZs.size() && USIs.size()==ELs.size());
120  for (size_t i=0;i<USIs.size();i++)
121  out.printf(" %03i %02i %03i\n", (int)USIs[i], (int)ELs[i], (int)AZs[i] );
122 }
123 
125 {
126  out << USIs << ELs << AZs;
127 }
128 
130 {
131  in >> USIs >> ELs >> AZs;
132 }
133 
double angle_transmitter
Vertical angle of N-beam.
uint8_t stats_rtk_fix_progress
[0,100] %, only in modes other than RTK FIXED.
double cartesian_z
Only if hasCartesianPosVel is true.
double height_meters
ellipsoidal height from N-beam [m] perhaps weighted with regular gps
mrpt::vector_byte USIs
The list of USI (Universal Sat ID) for the detected sats (See GRIL Manual, pag 4-31).
mrpt::math::CMatrixFloat44 vel_covariance
Only if hasPosCov is true.
double cartesian_vz
Only if hasCartesianPosVel is true.
STL namespace.
void internal_readFromStream(mrpt::utils::CStream &in) MRPT_OVERRIDE
Save to binary stream. Launches an exception upon error.
double latitude_degrees
The measured latitude, in degrees (North:+ , South:-)
uint8_t nId
ID of the transmitter [1-4], 0 if none.
bool hasCartesianPosVel
system error indicator
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:38
mrpt::math::CMatrixFloat44 pos_covariance
Only if hasPosCov is true.
void dumpToStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE
Dumps the contents of the observation in a human-readable form to a given output stream.
uint8_t RXBattery
battery level on receiver
GNSS (GPS) data structures, mainly for use within mrpt::obs::CObservationGPS.
mrpt::vector_signed_byte ELs
Elevation (in degrees, 0-90) for each satellite in USIs.
mrpt::vector_signed_word AZs
Azimuth (in degrees, 0-360) for each satellite in USIs.
void internal_readFromStream(mrpt::utils::CStream &in) MRPT_OVERRIDE
Save to binary stream. Launches an exception upon error.
Pure virtual base for all message types.
This file implements matrix/vector text and binary serialization.
GLuint in
Definition: glext.h:6301
#define ASSERT_(f)
uint8_t TXBattery
battery level on transmitter
double RTK_height_meters
ellipsoidal height [m] without N-beam correction
void dumpToStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE
Dumps the contents of the observation in a human-readable form to a given output stream.
void internal_writeToStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE
Save to binary stream. Launches an exception upon error.
void internal_writeToStream(mrpt::utils::CStream &out) const MRPT_OVERRIDE
Save to binary stream. Launches an exception upon error.
virtual int printf(const char *fmt,...) MRPT_printf_format_check(2
Writes a string to the stream in a textual form.
Definition: CStream.cpp:507
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)



Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019