Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
131 lines
2.8 KiB
C++
131 lines
2.8 KiB
C++
/**
|
|
* NmeaHandler
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Gerlinde Rudolphus, SLTE, 2022-06-09
|
|
*/
|
|
|
|
#ifndef NMEADECODER_H
|
|
#define NMEADECODER_H
|
|
|
|
#include <cmath>
|
|
#include <QQueue>
|
|
#include <QObject>
|
|
#include "dds_handler.h"
|
|
#include "logger.h"
|
|
|
|
namespace NmeaManagement
|
|
{
|
|
class NmeaHandler final
|
|
: public QObject
|
|
|
|
{
|
|
public:
|
|
NmeaHandler(const std::shared_ptr<DdsHandler> &ddsHandler, QObject *parent);
|
|
void init();
|
|
void decode(QString package);
|
|
private:
|
|
|
|
struct gpgga_data //Global Positioning System Fix Data
|
|
{
|
|
QString A_hour;
|
|
QString B_latitude;
|
|
char C_latitude_dir;
|
|
QString D_longitude;
|
|
char E_longitude_dir;
|
|
int F_qualidade_fixa = -1;
|
|
int G_quantidade_satelites = -1;
|
|
float H_diluicao_da_precisao_horizontal = -1;
|
|
float I_altitude = -1;
|
|
char J_unidade_medida_altura;
|
|
float K_altura_geoide_acima_elipsoide = -1;
|
|
char L_unidade_medida_geoide;
|
|
float M_idade_ultima_atualizacao_dgps = -1;
|
|
int N_dgps_id = -1;
|
|
};
|
|
|
|
struct battery_state
|
|
{
|
|
QString serialNumber;
|
|
int battery; // 0-5 = 0 = empty, 5 = full bennetec intern
|
|
int temperature; // Celsius
|
|
int frequency; // Hertz
|
|
float generic; // x.x = variable data
|
|
long current; // mA
|
|
bool G_velocity; // 1 = ON/ CLOSED, 0 = OFF/ OPEN
|
|
long voltage; // [mV]
|
|
};
|
|
|
|
struct alarm_state
|
|
{
|
|
QString time;
|
|
int number;
|
|
bool condition;
|
|
bool acknowledgeState;
|
|
QString description;
|
|
};
|
|
|
|
|
|
struct gpgsa_data //GPS DOP and active satellites
|
|
{
|
|
char A_modo = -1;
|
|
char B_modo_dimensional = -1;
|
|
int *CN_ids_satelites;
|
|
float O_PDOP = -1;
|
|
float P_HDOP = -1;
|
|
float Q_VDOP = -1;
|
|
};
|
|
|
|
struct satelite
|
|
{
|
|
int A_sv_prn = -1;
|
|
int B_elevacao_graus = -1; //90 max
|
|
int C_azimuth = -1;
|
|
int D_snr = -1;
|
|
};
|
|
|
|
struct gpgsv_data //GPS Satellites in view
|
|
{
|
|
unsigned A_total_mensagens = -1;
|
|
unsigned B_numero_desta_mensagem = -1;
|
|
int C_satelites_visiveis = -1;
|
|
satelite DS_sats[4];
|
|
};
|
|
|
|
struct gprmc_data //Recommended minimum specific GPS/Transit data
|
|
{
|
|
int A_hour = -1;
|
|
char B_warning = -1;
|
|
float C_latitude = -1;
|
|
char D_latitude_coord = -1;
|
|
float E_longitude = -1;
|
|
char F_longitude_coord = -1;
|
|
float G_velocity = -1;
|
|
float H_CMG = -1;
|
|
int I_data = -1;
|
|
float J_variacao_magnetica = -1;
|
|
char K_variacao_magnetica_coord = -1;
|
|
|
|
|
|
};
|
|
|
|
unsigned packagesInvalid = 0;
|
|
|
|
|
|
void GPGGA(QString package);
|
|
void GPRMC(QString package);
|
|
void IIXDR(QString package);
|
|
void IIALR(QString package);
|
|
|
|
bool checksum(QString package);
|
|
qint64 getDateTime(QString receivedTimeStr);
|
|
|
|
private:
|
|
std::shared_ptr<DdsHandler> m_ddsHandler;
|
|
QStringList m_batteries;
|
|
LOGGER_T m_logger;
|
|
};
|
|
} // namespace NmeaManagement
|
|
#endif // NMEADECODER_H
|