3#include "JorvikConnection.h"
5#include <NDEVR/Scanner3D.h>
6#include <NDEVR/ApplicationOptions.h>
7#include <NDEVR/Matrix.h>
9#include <NDEVR/Scene.h>
10#include <NDEVR/TranslatedString.h>
11#include <NDEVR/Pointer.h>
12#include <NDEVR/Thread.h>
13#include <NDEVR/INIInterface.h>
14#include <NDEVR/ApplicationResource.h>
15#include <NDEVR/NDEVRChartModel.h>
22 class PointMeasureModel;
26 class CarlsonScannerOrientation;
27 class CarlsonScannerConnection;
28 class CarlsonScannerBattery;
29 class CarlsonScannerMotor;
32 class CalibrationData;
63 [[nodiscard]]
virtual Light*
light() const final override;
88 virtual
void startScan(const Scanner3DScanSettings& settings) final override;
138 [[nodiscard]] virtual
bool supportsState(ScannerState state) const final override;
201 void setScanProfile(const Scanner3DScanSettings& settings);
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
The default object to store data of any type that should persist through sessions of the application.
A device which has an associated voltage or percent that changes.
A specification of upper and lower bounds in N-dimensions.
The equivelent of std::vector but with a bit more control.
A core object representing a user view as well as convenience functions for moving this view through ...
A standard interface for all types of connections that allow transmitting and receiving of data betwe...
A core class where all Design Objects including models, materials, and geometries are stored.
A distance encoder is a device that measures distance by generating pulses in response to an object's...
Provides a modifiable pointer that has shared ownership of a dynamically allocated object.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Contains methods for easily reading and writing to an INI file including efficient casting,...
INIInterface()
Constructs an INIInterface with no default INI file.
UUID m_scan_profile
Scan profile UUID.
virtual DistanceEncoder * distanceEncoder() const final override
Retrieves the distance encoder.
bool isConnected() const override
Checks if the total station is connected.
virtual Connection * connection() const final override
Retrieves the connection instance.
Buffer< Model > m_model_targets
Buffer of model targets.
void onConnectedUpdate(const Time ¤t)
Handles updates when the scanner is connected.
static ApplicationOption< Angle< fltp08 > > compensator_to_encoder_offset_roll
Compensator-to-encoder offset for roll.
void addReverseOrientation()
Adds a reverse orientation to the scanner.
static ApplicationOption< Angle< fltp08 > > encoder_angle_offset_roll
Encoder angle offset for roll.
ScannerState scannerState() const final override
Retrieves the current state of the scanner.
virtual RangeSensor * createRangeSensor() final override
Creates a range sensor.
PointMeasureModel * m_measure_model
Measurement model for the scanner.
virtual Light * redDot() const final override
Retrieves the red dot light sensor.
virtual RangeSensor * rangeSensor() const final override
Retrieves the range sensor.
uint04 m_measure_initial_size
Initial size for measurements.
Buffer< CollimatorReading > m_collimator_readings
Buffer of collimator readings.
Vector< 2, Angle< fltp08 > > m_raw_compensator
Raw compensator angles.
void processMessages(Time time)
Processes incoming messages.
fltp08 m_max_range
Maximum range of the scanner.
fltp08 calculateDistance()
Calculates the distance to a target.
void saveDeviations(File file)
Saves deviation data to a file.
Vector< 3, Angle< fltp08 > > pointToHeadAngle(Vertex< 3, fltp08 > point) const override
Converts a point to a head angle.
bool m_use_gnss
Indicates if GNSS is used.
void addGridOrientation(sint04 range_pitch, sint04 range_roll, const Angle< fltp08 > &step_pitch, const Angle< fltp08 > &step_roll, const Angle< fltp08 > &offset)
Adds a grid orientation to the scanner.
PositionSensor * m_position_sensor
Position sensor for the scanner.
JorvikTotalStation(JorvikConnection *connection, DesignObjectLookup *manager, QObject *parent=nullptr)
Constructor for the JorvikTotalStation.
virtual bool supportsState(ScannerState state) const final override
Checks if the scanner supports a specific state.
Bounds< 2, Angle< fltp08 > > scanBounds() const final override
Retrieves the scan bounds.
void recordDeviation()
Records deviation data.
DynamicPointer< Camera > m_camera_model
Camera model for the scanner.
bool m_has_removed_bulb
Indicates if the bulb has been removed.
bool m_collimator_test
Indicates if a collimator test is active.
Model m_camera_target_model
Target model for the camera.
virtual TimeSpan updateInterval() const final override
Retrieves the update interval for the scanner.
virtual OrientationSensor * orientationSensor() const final override
Retrieves the orientation sensor.
virtual void createScanner() final override
Creates the scanner instance.
virtual void startScan(const Scanner3DScanSettings &settings) final override
Starts a scan with the given settings.
virtual bool usingPrism() const override
Checks if the scanner is using a prism.
virtual Matrix< fltp08 > scanTransform() const override
Retrieves the scan transformation matrix.
NDEVRChartModel * m_deviation_chart_model[2]
Chart models for deviation data.
void initCameraModel()
Initializes the camera model.
static ApplicationOption< bool > calculate_motor_offset
Option to calculate motor offset.
virtual RasterInfo defaultRasterInfo(const UUID &profile) const final override
Retrieves the default raster info for a given profile.
void setModelFile(const File &file)
Sets the model file for the total station.
Vertex< 3, fltp08 > targetPosition() const
Retrieves the target position of the scanner.
void checkScanStep()
Checks the current scan step.
Vector< 2, Angle< fltp08 > > m_motor_offset
Motor offset calibration values.
void initCharts()
Initializes the chart models.
fltp08 m_chart_offset_time
Offset time for charts.
Matrix< fltp08 > scanModelFileTransform() const override
Retrieves the transformation matrix for the scan model file.
virtual void resumeScan() final override
Resumes the paused scan.
Scene m_measurement_points
Scene for measurement points.
bool useCalibratedScan() const final override
Checks if the scanner uses calibrated scans.
virtual void getINI(INIFactory &factory) override
Reads INI settings into the factory.
virtual Buffer< TemperatureSensor * > temperatureSensors() const final override
Retrieves the list of temperature sensors.
void recordLocation()
Records the current location of the scanner.
Time m_last_head_move_time
Last move time for the scanner head.
virtual void stopScan() final override
Stops the current scan.
void initMotors()
Initializes the scanner motors.
bool executeManualCommand(const String &command) final override
Executes a manual command on the scanner.
void addModelsToScan()
Adds models to the scan.
static ApplicationOption< Angle< fltp08 > > encoder_angle_offset_pitch
Encoder angle offset for pitch.
CalibrationData * m_calibration_data
Calibration data for the scanner.
void setConstantLaserFire(bool constant_fire)
Enables or disables constant laser firing.
virtual TranslatedString scannerInfo() const final override
Retrieves scanner information.
fltp08 chartTime()
Retrieves the current chart time.
String defaultCameraFeed()
Retrieves the default camera feed.
static ApplicationOption< String > connection_address
Connection address for the scanner.
virtual void update(Time time) override
Updates the scanner state.
File m_model_file
Model file for the scanner.
virtual bool supportsScanImageRaster() const final override
Checks if the scanner supports image raster scanning.
static ApplicationOption< Angle< fltp08 > > motor_epsilon
Motor epsilon value.
NDEVRChartModel * m_angle_chart_model[2]
Chart models for angle data.
static ApplicationOption< Angle< fltp08 > > compensator_offset_pitch
Compensator offset for pitch.
TranslatedString m_test_name
Name of the current test.
void processData(Time time, const JorvikData &data)
Processes incoming data.
void parkDevice() override
Parks the scanner device.
Time m_last_settings_time
Last update time for settings.
bool m_manually_drive
Indicates if manual driving is enabled.
NDEVRChartModel * m_orientation_chart_model[2]
Chart models for orientation data.
virtual Matrix< fltp08 > cameraTransform() const final override
Retrieves the camera transformation matrix.
TimeSpan m_reading_wait_time
Wait time for readings.
virtual void endUpdates() override
Ends updates for the scanner.
virtual Light * light() const final override
Retrieves the light sensor.
void addDataToChartModel()
Adds data to the chart model.
Time m_last_angle_update_time
Last update time for angles.
Light * m_red_dot
Red dot light for the scanner.
virtual Buffer< Battery * > batteries() const final override
Retrieves the list of batteries.
Time m_last_compensator_update_time
Last update time for the compensator.
Buffer< Vector< 2, Angle< fltp08 > > > m_angle_targets
Buffer of angle targets.
void orientHead(const Vector< 3, Angle< fltp08 > > &head_orientation) final override
Orients the scanner head to the specified orientation.
static ApplicationOption< Angle< fltp08 > > compensator_offset_roll
Compensator offset for roll.
Time m_last_distance_update_time
Last update time for distance.
Matrix< fltp08 > laserTransform(const Vector< 3, Angle< fltp08 > > &head_angle) const override
Retrieves the laser transformation matrix.
bool m_manual_step
Indicates if manual stepping is enabled.
Scene m_chart_scene
Scene for chart data.
Time m_last_head_update_time
Last update time for the scanner head.
virtual PositionSensor * positionSensor() const final override
Retrieves the position sensor.
virtual FileRequest scanModelFile() const override
Retrieves the scan model file.
~JorvikTotalStation()
Destructor for the JorvikTotalStation.
virtual Buffer< ScanProfile > availableScanProfiles() const final override
Retrieves the available scan profiles.
Vector< 2, Angle< fltp08 > > m_motor_target
Motor target angles.
DistanceEncoder * m_distance_encoder
Distance encoder for the scanner.
virtual void pauseScan() final override
Pauses the current scan.
Vector< 2, Angle< fltp08 > > m_current_target
Current target angles.
bool m_auto_update_model
Indicates if the model is auto-updated.
bool m_constant_laser_fire
Indicates if constant laser firing is enabled.
void recordChartDeviation()
Records deviation data for charts.
void initMeasureModel()
Initializes the measurement model.
JorvikConnection * m_connection
Connection to the scanner.
virtual TimeSpan getScanTime(const Scanner3DScanSettings &settings) const final override
Calculates the scan time for the given settings.
static ApplicationOption< Angle< fltp08 > > compensator_to_encoder_offset_pitch
Compensator-to-encoder offset for pitch.
OrientationSensor * m_orientation
Orientation sensor for the scanner.
Vector< 2, Angle< fltp08 > > m_raw_angles
Raw angles from the scanner.
bool m_infinite_test
Indicates if an infinite test is active.
Matrix< fltp08 > prismModelFileTransform() const override
Retrieves the transformation matrix for the prism model file.
A Device responsible for turning on and off a light source.
Serves as the primary program interface for processes to report issues and allows any number of LogSt...
Used to calculate madgick orientation given sensor streams for gyro and optionally magnetometer(s) an...
Templated logic for doing matrix multiplication.
A core class that represents a node on model hierarchy.
A Model subclass that provides charting and data visualization capabilities.
Forward declaration for design object lookup service.
Forward declaration for distance encoder device.
A RangeSensor is a Device that determines the distance of a target at a certain orientation.
The root Model that is responsible for storing the underlying data for all Scene Models.
A specific channel of communication within the SocketIO framework.
The core String class for the NDEVR API.
A Device responsible for determining the temperature of either the environment or a specific componen...
Stores a time span, or difference between two times, with an optional start time.
Represents a timestamp with utilities for manipulation and conversion.
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...
A fixed-size array with N dimensions used as the basis for geometric and mathematical types.
A point in N-dimensional space, used primarily for spatial location information.
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.
int32_t sint04
-Defines an alias representing a 4 byte, signed integer.
@ file
The source file path associated with this object.
Defines for a given type (such as sint04, fltp08, UUID, etc) a maximum, minimum, and reserved 'invali...
A FileRequest bundles format data as well as a particular file.
Stores information for painting pixels at a time into a 2D texture used with MaterialRaster.