Main MRPT website > C++ reference for MRPT 1.9.9
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-2018, 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),
33  cartesian_y(0),
34  cartesian_z(0),
35  cartesian_vx(0),
36  cartesian_vy(0),
37  cartesian_vz(0),
38  hasPosCov(false),
39  pos_covariance(),
40  hasVelCov(false),
41  vel_covariance(),
42  hasStats(false),
43  stats_GPS_sats_used(0),
44  stats_GLONASS_sats_used(0)
45 {
46 }
47 
48 void Message_TOPCON_PZS::dumpToStream(std::ostream& out) const
49 {
50  out << mrpt::format("\n[TopCon PZS datum]\n");
51  out << mrpt::format(
52  " Longitude: %.09f deg Latitude: %.09f deg Height: %.03f m (%.03f m "
53  "without NBeam) \n",
55 
56  out << mrpt::format(
57  " PZL-ID: %i Angle trans: %.05f deg\n ", (int)nId, angle_transmitter);
58 
59  out << mrpt::format(" Fix: %i ", (int)Fix);
60  out << mrpt::format(" Error: %i ", (int)error);
61  out << mrpt::format(
62  " Battery levels: TX=%i RX=%i\n ", TXBattery, RXBattery);
63 
64  out << mrpt::format(
65  " hasCartesianPosVel= %s", hasCartesianPosVel ? "YES -> " : "NO\n");
67  {
68  out << mrpt::format(
69  " x=%f y=%f z=%f\n", cartesian_x, cartesian_y, cartesian_z);
70  out << mrpt::format(
71  " vx=%f vy=%f vz=%f\n", cartesian_vx, cartesian_vy, cartesian_vz);
72  }
73  out << mrpt::format("hasPosCov = %s", hasPosCov ? "YES\n" : "NO\n");
74  if (hasPosCov)
75  out << mrpt::format("%s\n", pos_covariance.inMatlabFormat().c_str());
76 
77  out << mrpt::format("hasVelCov = %s", hasVelCov ? "YES\n" : "NO\n");
78  if (hasVelCov)
79  out << mrpt::format("%s\n", vel_covariance.inMatlabFormat().c_str());
80 
81  out << mrpt::format("hasStats = %s", hasStats ? "YES: " : "NO\n");
82  if (hasStats)
83  out << mrpt::format(
84  "GPS sats used: %i GLONASS sats used: %i RTK Fix progress:%i%%\n",
87 }
88 
91 {
99 }
100 
103 {
111 }
112 
113 // -------------
115 void Message_TOPCON_SATS::dumpToStream(std::ostream& out) const
116 {
117  out << mrpt::format("\n[TopCon SATS datum]\n");
118  out << mrpt::format(
119  " USI ELEV AZIM (%u entries) \n",
120  static_cast<unsigned int>(USIs.size()));
121 
122  ASSERT_(USIs.size() == AZs.size() && USIs.size() == ELs.size());
123  for (size_t i = 0; i < USIs.size(); i++)
124  out << mrpt::format(
125  " %03i %02i %03i\n", (int)USIs[i], (int)ELs[i], (int)AZs[i]);
126 }
127 
130 {
131  out << USIs << ELs << AZs;
132 }
133 
136 {
137  in >> USIs >> ELs >> AZs;
138 }
mrpt::obs::gnss::Message_TOPCON_SATS::internal_readFromStream
void internal_readFromStream(mrpt::serialization::CArchive &in) override
Save to binary stream.
Definition: gnss_messages_topcon.cpp:134
matrix_serialization.h
mrpt::obs::gnss::Message_TOPCON_PZS::hasPosCov
bool hasPosCov
Definition: gnss_messages_topcon.h:57
mrpt::obs::gnss::TOPCON_SATS
@ TOPCON_SATS
Definition: gnss_messages_type_list.h:40
mrpt::obs::gnss::Message_TOPCON_PZS::error
uint8_t error
Definition: gnss_messages_topcon.h:49
mrpt::obs::gnss::Message_TOPCON_PZS::TXBattery
uint8_t TXBattery
battery level on transmitter
Definition: gnss_messages_topcon.h:46
mrpt::obs::gnss::Message_TOPCON_PZS::hasCartesianPosVel
bool hasCartesianPosVel
system error indicator
Definition: gnss_messages_topcon.h:51
mrpt::obs::gnss::Message_TOPCON_PZS::vel_covariance
mrpt::math::CMatrixFloat44 vel_covariance
Only if hasPosCov is true.
Definition: gnss_messages_topcon.h:63
obs-precomp.h
ASSERT_
#define ASSERT_(f)
Defines an assertion mechanism.
Definition: exceptions.h:113
mrpt::obs::gnss::Message_TOPCON_PZS::cartesian_vx
double cartesian_vx
Only if hasCartesianPosVel is true.
Definition: gnss_messages_topcon.h:55
mrpt::serialization::CArchive
Virtual base class for "archives": classes abstracting I/O streams.
Definition: CArchive.h:48
mrpt::obs::gnss::error
uint32_t error
Definition: gnss_messages_novatel.h:330
mrpt::obs::gnss::Message_TOPCON_PZS::stats_rtk_fix_progress
uint8_t stats_rtk_fix_progress
[0,100] %, only in modes other than RTK FIXED.
Definition: gnss_messages_topcon.h:69
mrpt::obs::gnss::Message_TOPCON_PZS::cartesian_vy
double cartesian_vy
Definition: gnss_messages_topcon.h:55
mrpt::format
std::string format(const char *fmt,...) MRPT_printf_format_check(1
A std::string version of C sprintf.
Definition: format.cpp:16
mrpt::obs::gnss::Message_TOPCON_PZS::cartesian_x
double cartesian_x
Only if hasCartesianPosVel is true.
Definition: gnss_messages_topcon.h:53
mrpt::obs::gnss::Message_TOPCON_PZS::stats_GLONASS_sats_used
uint8_t stats_GLONASS_sats_used
Definition: gnss_messages_topcon.h:67
mrpt::obs::gnss::Message_TOPCON_PZS::dumpToStream
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
Definition: gnss_messages_topcon.cpp:48
mrpt::obs::gnss::Message_TOPCON_PZS::angle_transmitter
double angle_transmitter
Vertical angle of N-beam.
Definition: gnss_messages_topcon.h:40
mrpt::obs::gnss::Message_TOPCON_SATS::internal_writeToStream
void internal_writeToStream(mrpt::serialization::CArchive &out) const override
Save to binary stream.
Definition: gnss_messages_topcon.cpp:128
mrpt::obs::gnss::Message_TOPCON_PZS::internal_readFromStream
void internal_readFromStream(mrpt::serialization::CArchive &in) override
Save to binary stream.
Definition: gnss_messages_topcon.cpp:101
mrpt::obs::gnss::Message_TOPCON_PZS::hasVelCov
bool hasVelCov
Definition: gnss_messages_topcon.h:61
mrpt::obs::gnss::Message_TOPCON_SATS::ELs
std::vector< int8_t > ELs
Elevation (in degrees, 0-90) for each satellite in USIs.
Definition: gnss_messages_topcon.h:108
mrpt::obs::gnss::Message_TOPCON_PZS::nId
uint8_t nId
ID of the transmitter [1-4], 0 if none.
Definition: gnss_messages_topcon.h:42
mrpt::obs::gnss::Message_TOPCON_PZS::latitude_degrees
double latitude_degrees
The measured latitude, in degrees (North:+ , South:-)
Definition: gnss_messages_topcon.h:30
mrpt::obs::gnss::Message_TOPCON_PZS::longitude_degrees
double longitude_degrees
The measured longitude, in degrees (East:+ , West:-)
Definition: gnss_messages_topcon.h:32
mrpt::obs::gnss::Message_TOPCON_PZS::RTK_height_meters
double RTK_height_meters
ellipsoidal height [m] without N-beam correction
Definition: gnss_messages_topcon.h:36
mrpt::obs::gnss::Message_TOPCON_PZS::cartesian_y
double cartesian_y
Definition: gnss_messages_topcon.h:53
mrpt::obs::gnss::Message_TOPCON_PZS::stats_GPS_sats_used
uint8_t stats_GPS_sats_used
Definition: gnss_messages_topcon.h:66
mrpt::obs::gnss::Message_TOPCON_PZS::cartesian_vz
double cartesian_vz
Definition: gnss_messages_topcon.h:55
mrpt::obs::gnss::Message_TOPCON_PZS::internal_writeToStream
void internal_writeToStream(mrpt::serialization::CArchive &out) const override
Save to binary stream.
Definition: gnss_messages_topcon.cpp:89
mrpt::obs::gnss
GNSS (GPS) data structures, mainly for use within mrpt::obs::CObservationGPS.
Definition: gnss_messages_ascii_nmea.h:17
mrpt::obs::gnss::Message_TOPCON_PZS::cartesian_z
double cartesian_z
Definition: gnss_messages_topcon.h:53
mrpt::obs::gnss::Message_TOPCON_PZS::RXBattery
uint8_t RXBattery
battery level on receiver
Definition: gnss_messages_topcon.h:48
mrpt::obs::gnss::Message_TOPCON_SATS::USIs
std::vector< uint8_t > USIs
The list of USI (Universal Sat ID) for the detected sats (See GRIL Manual, pag 4-31).
Definition: gnss_messages_topcon.h:106
mrpt::obs::gnss::Message_TOPCON_PZS::hasStats
bool hasStats
Definition: gnss_messages_topcon.h:65
in
GLuint in
Definition: glext.h:7274
mrpt::obs::gnss::Message_TOPCON_PZS::PSigma
float PSigma
position SEP [m]
Definition: gnss_messages_topcon.h:38
mrpt::obs::gnss::gnss_message
Pure virtual base for all message types.
Definition: gnss_messages_common.h:26
mrpt::obs::gnss::Message_TOPCON_PZS::pos_covariance
mrpt::math::CMatrixFloat44 pos_covariance
Only if hasPosCov is true.
Definition: gnss_messages_topcon.h:59
mrpt::obs::gnss::Message_TOPCON_PZS::height_meters
double height_meters
ellipsoidal height from N-beam [m] perhaps weighted with regular gps
Definition: gnss_messages_topcon.h:34
mrpt::obs::gnss::Message_TOPCON_SATS::dumpToStream
void dumpToStream(std::ostream &out) const override
Dumps the contents of the observation in a human-readable form to a given output stream.
Definition: gnss_messages_topcon.cpp:115
gnss_messages_topcon.h
mrpt::obs::gnss::TOPCON_PZS
@ TOPCON_PZS
Definition: gnss_messages_type_list.h:39
mrpt::obs::gnss::Message_TOPCON_PZS::Fix
uint8_t Fix
1: GPS, 2: mmGPS
Definition: gnss_messages_topcon.h:44
mrpt::obs::gnss::Message_TOPCON_SATS::Message_TOPCON_SATS
Message_TOPCON_SATS()
Definition: gnss_messages_topcon.cpp:114
mrpt::obs::gnss::Message_TOPCON_SATS::AZs
std::vector< int16_t > AZs
Azimuth (in degrees, 0-360) for each satellite in USIs.
Definition: gnss_messages_topcon.h:110



Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST