2#include "NDEVR/Headers/OrientationOperationsWidget.h"
3#include <NDEVR/PointWidget.h>
4#include <NDEVR/Connection.h>
5#include <NDEVR/GNSSManager.h>
6#include "GPSInterface/Headers/GPSSensor.h"
7#include "GPSInterface/Headers/GPSWidget.h"
8#include "Base/Headers/INIInterface.h"
9#include "Base/Headers/FileResource.h"
10#include "Base/Headers/Exception.hpp"
18 QPointer<GPSSensor>
gps;
The default object to store data of any type that should persist through sessions of the application.
The equivelent of std::vector but with a bit more control.
A hash-based key-value store, useful for quick associative lookups.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
A GNSS interface provides logic for finding available GNSS devices.
A GPS sensor implementation that receives NMEA data from serial connections, files,...
Contains methods for easily reading and writing to an INI file including efficient casting,...
INIInterface()
Constructs an INIInterface with no default INI file.
A light-weight base class for Log that allows processes to update, without the need for additional in...
void settingsModifiedSignal()
Emitted when GNSS settings are modified.
const GNSSQualitySettings & positionQualitySettings(GNSSQuality quality) const
Returns position quality settings for the given quality level.
bool shouldAutoConnect(GPSSensor *gps) const
Returns whether the given sensor should auto-connect.
PositionSensor * getGNSSDevice(const UUID &id) override
Returns the GNSS device with the given UUID.
InfoPipe * log() const
Returns the log info pipe.
ActiveGPSSensor * createActiveGPSSensor(ConnectionInfo connection_info)
Creates an active GPS sensor from a connection.
GNSSQualitySettings m_position_quality_settings[cast< uint04 >(GNSSQuality::e_size)]
Position quality settings array indexed by GNSSQuality.
void setInfoPipe(InfoPipe *info)
Sets the info pipe for log output.
void setActiveSensor(UUID active_id, const ConnectionInfo &connection)
Registers an active sensor by UUID and connection info.
void activeGNSSSensorChangedSignal(UUID active_id)
Emitted when the active GNSS sensor changes for a role.
void setPositionQualitySettings(GNSSQuality quality, const GNSSQualitySettings &settings)
Sets position quality settings for the given quality level.
String connectionString(GPSSensor *sensor) const
Returns the connection string for the given sensor.
InfoPipe * m_log
The log info pipe.
void setActiveSensor(UUID active_id, QPointer< GPSSensor > gps)
Registers an active sensor by UUID and sensor pointer.
ActiveGPSSensor * activeSensor(UUID active_id) const
Returns the active sensor descriptor for the given role UUID.
static ApplicationOption< bool > use_single_gnss_device
Whether to enforce a single GNSS device.
MainGPSManager()
Constructs the main GPS manager.
ActiveGPSSensor * createActiveGPSSensor(const File &file)
Creates an active GPS sensor from a file source.
Dictionary< UUID, ActiveGPSSensor * > m_gps_definitions
Maps role UUIDs to active sensor descriptors.
void setToDefaults()
Resets all quality settings to their defaults.
const GNSSQualitySettings & orientationQualitySettings(GNSSQuality quality) const
Returns orientation quality settings for the given quality level.
static RGBColor SNRToColor(fltp08 srn)
Converts a signal-to-noise ratio to a display color.
static ApplicationOption< bool > autoconnect_gnss_device
Whether to auto-connect GNSS on startup.
bool hasActiveSensor(UUID active_id) const
Checks whether a sensor with the given role UUID is active.
static MainGPSManager & DefaultInstance()
Returns the global singleton instance.
void setOrientationQualitySettings(GNSSQuality quality, const GNSSQualitySettings &settings)
Sets orientation quality settings for the given quality level.
virtual void getINI(INIFactory &factory) override
Serializes settings to an INI factory.
GNSSQualitySettings m_orientation_quality_settings[cast< uint04 >(GNSSQuality::e_size)]
Orientation quality settings array indexed by GNSSQuality.
TranslatedString connectionName(GPSSensor *sensor) const
Returns the display name of the connection for the given sensor.
UUID uuid() const override
Returns the unique identifier for this manager.
static RGBColor ConstellationToColor(GNSSConstellation constellation_type)
Returns the display color for a given satellite constellation type.
static ApplicationOption< bool > log_raw_nmea_streams
Whether to log raw NMEA data streams.
UUID m_id
This manager's unique identifier.
Dictionary< String, ActiveGPSSensor * > m_gps_sensors
Maps connection strings to active sensor descriptors.
void finishReadingINI(INIFactory &factory) override
Completes reading settings from an INI factory.
virtual Buffer< PositionSensor * > availableGNSSDevices() const override
Returns all available GNSS devices.
OrientationWidgetGNSSMainCallback()
Constructs the callback.
static OrientationWidgetGNSSMainCallback * MainGNSSCallback()
Returns the singleton callback instance.
virtual QWidget * createGNSSWidget(UUID gps_name, QCustomLineEdit *orientation_edit, uint01 axis) override
Creates a GNSS widget for orientation input.
virtual QWidget * createGNSSWidget(UUID gps_name, PointWidget *widget) override
Creates a GNSS widget for position input within a PointWidget.
PointWidgetGNSSMainCallback()
Constructs the callback.
static PointWidgetGNSSMainCallback * MainGNSSCallback()
Returns the singleton callback instance.
Forward declaration for distance encoder device.
A line edit allows users to enter and edit a single line of plain text with useful editing functions,...
Represents a color in the RGB space with optional alpha transparency.
The core String class for the NDEVR API.
Stores a time span, or difference between two times, with an optional start time.
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
The primary namespace for the NDEVR SDK.
uint32_t uint04
-Defines an alias representing a 4 byte, unsigned integer -Can represent exact integer values 0 throu...
double fltp08
Defines an alias representing an 8 byte floating-point number.
uint8_t uint01
-Defines an alias representing a 1 byte, unsigned integer -Can represent exact integer values 0 throu...
GNSSQuality
Describes the quality level of a GNSS position fix.
@ e_size
Number of entries in this enum; used for iteration.
GNSSConstellation
Identifies the satellite constellation system providing GNSS data.
constexpr t_to cast(const Angle< t_from > &value)
Casts an Angle from one backing type to another.
Describes an active GPS sensor with its connection details and sensor pointer.
TranslatedString connection_name
The display name of the connection.
QPointer< GPSSensor > gps
Pointer to the GPS sensor instance.
String connection_string
The connection identifier string.
A structure designed to store information about a specific Connection.
Configures quality-dependent settings for GNSS readings, including sample counts, timing,...
bool allow_take_reading
Whether taking a reading is allowed at this quality.
uint04 take_reading_sample_count
Number of samples required for a reading.
RGBColor color
Display color for this quality level.
TimeSpan take_reading_sample_time
Time duration required for a reading.
void setToDefaults(GNSSQuality quality)
Sets all settings to defaults appropriate for the given quality level.