MRPT  1.9.9
gnss_messages_topcon.cpp
Go to the documentation of this file.
1 /* +------------------------------------------------------------------------+
2  | Mobile Robot Programming Toolkit (MRPT) |
3  | https://www.mrpt.org/ |
4  | |
5  | Copyright (c) 2005-2019, Individual contributors, see AUTHORS file |
6  | See: https://www.mrpt.org/Authors - All rights reserved. |
7  | Released under BSD License. See: https://www.mrpt.org/License |
8  +------------------------------------------------------------------------+ */
9 
10 #include "obs-precomp.h" // Precompiled headers
11 
12 #include <mrpt/math/matrix_serialization.h> // for << of matrices
14 
15 #include <ostream>
16 
17 using namespace std;
18 using namespace mrpt::obs::gnss;
19 
20 Message_TOPCON_PZS::Message_TOPCON_PZS()
22 
23  pos_covariance(),
24 
25  vel_covariance()
26 
27 {
28 }
29 
30 void Message_TOPCON_PZS::dumpToStream(std::ostream& out) const
31 {
32  out << mrpt::format("\n[TopCon PZS datum]\n");
33  out << mrpt::format(
34  " Longitude: %.09f deg Latitude: %.09f deg Height: %.03f m (%.03f m "
35  "without NBeam) \n",
37 
38  out << mrpt::format(
39  " PZL-ID: %i Angle trans: %.05f deg\n ", (int)nId, angle_transmitter);
40 
41  out << mrpt::format(" Fix: %i ", (int)Fix);
42  out << mrpt::format(" Error: %i ", (int)error);
43  out << mrpt::format(
44  " Battery levels: TX=%i RX=%i\n ", TXBattery, RXBattery);
45 
46  out << mrpt::format(
47  " hasCartesianPosVel= %s", hasCartesianPosVel ? "YES -> " : "NO\n");
49  {
50  out << mrpt::format(
51  " x=%f y=%f z=%f\n", cartesian_x, cartesian_y, cartesian_z);
52  out << mrpt::format(
53  " vx=%f vy=%f vz=%f\n", cartesian_vx, cartesian_vy, cartesian_vz);
54  }
55  out << mrpt::format("hasPosCov = %s", hasPosCov ? "YES\n" : "NO\n");
56  if (hasPosCov)
57  out << mrpt::format("%s\n", pos_covariance.inMatlabFormat().c_str());
58 
59  out << mrpt::format("hasVelCov = %s", hasVelCov ? "YES\n" : "NO\n");
60  if (hasVelCov)
61  out << mrpt::format("%s\n", vel_covariance.inMatlabFormat().c_str());
62 
63  out << mrpt::format("hasStats = %s", hasStats ? "YES: " : "NO\n");
64  if (hasStats)
65  out << mrpt::format(
66  "GPS sats used: %i GLONASS sats used: %i RTK Fix progress:%i%%\n",
69 }
70 
73 {
81 }
82 
85 {
93 }
94 
95 // -------------
97 void Message_TOPCON_SATS::dumpToStream(std::ostream& out) const
98 {
99  out << mrpt::format("\n[TopCon SATS datum]\n");
100  out << mrpt::format(
101  " USI ELEV AZIM (%u entries) \n",
102  static_cast<unsigned int>(USIs.size()));
103 
104  ASSERT_(USIs.size() == AZs.size() && USIs.size() == ELs.size());
105  for (size_t i = 0; i < USIs.size(); i++)
106  out << mrpt::format(
107  " %03i %02i %03i\n", (int)USIs[i], (int)ELs[i], (int)AZs[i]);
108 }
109 
112 {
113  out << USIs << ELs << AZs;
114 }
115 
118 {
119  in >> USIs >> ELs >> AZs;
120 }
double angle_transmitter
Vertical angle of N-beam.
std::vector< int16_t > AZs
Azimuth (in degrees, 0-360) for each satellite in USIs.
uint8_t stats_rtk_fix_progress
[0,100] %, only in modes other than RTK FIXED.
double height_meters
ellipsoidal height from N-beam [m] perhaps weighted with regular gps
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
mrpt::math::CMatrixFloat44 vel_covariance
Only if hasPosCov is true.
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
void internal_writeToStream(mrpt::serialization::CArchive &out) const override
Save to binary stream.
void internal_readFromStream(mrpt::serialization::CArchive &in) override
Save to binary stream.
STL namespace.
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
#define ASSERT_(f)
Defines an assertion mechanism.
Definition: exceptions.h:120
mrpt::math::CMatrixFloat44 pos_covariance
Only if hasPosCov is true.
void internal_readFromStream(mrpt::serialization::CArchive &in) override
Save to binary stream.
uint8_t RXBattery
battery level on receiver
GNSS (GPS) data structures, mainly for use within mrpt::obs::CObservationGPS.
double cartesian_x
Only if hasCartesianPosVel is true.
std::vector< uint8_t > USIs
The list of USI (Universal Sat ID) for the detected sats (See GRIL Manual, pag 4-31).
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:53
Pure virtual base for all message types.
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
Definition: format.cpp:16
This file implements matrix/vector text and binary serialization.
GLuint in
Definition: glext.h:7391
std::string inMatlabFormat(const std::size_t decimal_digits=6) const
Exports the matrix as a string compatible with Matlab/Octave.
uint8_t TXBattery
battery level on transmitter
double cartesian_vx
Only if hasCartesianPosVel is true.
double RTK_height_meters
ellipsoidal height [m] without N-beam correction
std::vector< int8_t > ELs
Elevation (in degrees, 0-90) for each satellite in USIs.
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)
void internal_writeToStream(mrpt::serialization::CArchive &out) const override
Save to binary stream.



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 8fe78517f Sun Jul 14 19:43:28 2019 +0200 at lun oct 28 02:10:00 CET 2019