2022-02-05 13:19:20 +01:00
|
|
|
#ifndef LINUX_DEVICES_DEVICEDEFINITIONS_DEFINITIONS_H_
|
|
|
|
#define LINUX_DEVICES_DEVICEDEFINITIONS_DEFINITIONS_H_
|
2021-07-07 12:12:01 +02:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
#include <fsfw/datapool/PoolReadGuard.h>
|
2021-07-07 12:12:01 +02:00
|
|
|
#include <fsfw/datapoollocal/LocalPoolVariable.h>
|
2022-01-17 15:58:27 +01:00
|
|
|
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
2021-07-07 12:12:01 +02:00
|
|
|
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
|
2021-12-21 15:46:09 +01:00
|
|
|
#include <fsfw/serviceinterface/ServiceInterfaceStream.h>
|
2022-01-17 15:58:27 +01:00
|
|
|
|
2021-07-07 12:12:01 +02:00
|
|
|
#include "objects/systemObjectList.h"
|
|
|
|
|
|
|
|
namespace StarTracker {
|
|
|
|
|
|
|
|
/** This is the address of the star tracker */
|
|
|
|
static const uint8_t ADDRESS = 33;
|
|
|
|
|
2021-11-26 13:16:05 +01:00
|
|
|
static const uint8_t STATUS_OK = 0;
|
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
enum PoolIds : lp_id_t {
|
|
|
|
TICKS_TIME_SET,
|
|
|
|
TIME_TIME_SET,
|
|
|
|
RUN_TIME,
|
|
|
|
UNIX_TIME,
|
|
|
|
TICKS_VERSION_SET,
|
|
|
|
TIME_VERSION_SET,
|
|
|
|
PROGRAM,
|
|
|
|
MAJOR,
|
|
|
|
MINOR,
|
|
|
|
TICKS_INTERFACE_SET,
|
|
|
|
TIME_INTERFACE_SET,
|
|
|
|
FRAME_COUNT,
|
|
|
|
CHECKSUM_ERROR_COUNT,
|
|
|
|
SET_PARAM_COUNT,
|
|
|
|
SET_PARAM_REPLY_COUNT,
|
|
|
|
PARAM_REQUEST_COUNT,
|
|
|
|
PARAM_REPLY_COUNT,
|
|
|
|
REQ_TM_COUNT,
|
|
|
|
TM_REPLY_COUNT,
|
|
|
|
ACTION_REQ_COUNT,
|
|
|
|
ACTION_REPLY_COUNT,
|
|
|
|
TICKS_POWER_SET,
|
|
|
|
TIME_POWER_SET,
|
|
|
|
MCU_CURRENT,
|
|
|
|
MCU_VOLTAGE,
|
|
|
|
FPGA_CORE_CURRENT,
|
|
|
|
FPGA_CORE_VOLTAGE,
|
|
|
|
FPGA_18_CURRENT,
|
|
|
|
FPGA_18_VOLTAGE,
|
|
|
|
FPGA_25_CURRENT,
|
|
|
|
FPGA_25_VOLTAGE,
|
|
|
|
CMV_21_CURRENT,
|
|
|
|
CMV_21_VOLTAGE,
|
|
|
|
CMV_PIX_CURRENT,
|
|
|
|
CMV_PIX_VOLTAGE,
|
|
|
|
CMV_33_CURRENT,
|
|
|
|
CMV_33_VOLTAGE,
|
|
|
|
CMV_RES_CURRENT,
|
|
|
|
CMV_RES_VOLTAGE,
|
|
|
|
TICKS_TEMPERATURE_SET,
|
|
|
|
TIME_TEMPERATURE_SET,
|
|
|
|
MCU_TEMPERATURE,
|
|
|
|
CMOS_TEMPERATURE,
|
2022-01-29 12:27:26 +01:00
|
|
|
FPGA_TEMPERATURE,
|
2022-01-17 15:58:27 +01:00
|
|
|
TICKS_SOLUTION_SET,
|
|
|
|
TIME_SOLUTION_SET,
|
|
|
|
CALI_QW,
|
|
|
|
CALI_QX,
|
|
|
|
CALI_QY,
|
|
|
|
CALI_QZ,
|
|
|
|
TRACK_CONFIDENCE,
|
|
|
|
TRACK_QW,
|
|
|
|
TRACK_QX,
|
|
|
|
TRACK_QY,
|
|
|
|
TRACK_QZ,
|
|
|
|
TRACK_REMOVED,
|
|
|
|
STARS_CENTROIDED,
|
|
|
|
STARS_MATCHED_DATABASE,
|
|
|
|
LISA_QW,
|
|
|
|
LISA_QX,
|
|
|
|
LISA_QY,
|
|
|
|
LISA_QZ,
|
|
|
|
LISA_PERC_CLOSE,
|
|
|
|
LISA_NR_CLOSE,
|
|
|
|
TRUST_WORTHY,
|
|
|
|
STABLE_COUNT,
|
|
|
|
SOLUTION_STRATEGY,
|
|
|
|
TICKS_HISTOGRAM_SET,
|
|
|
|
TIME_HISTOGRAM_SET,
|
|
|
|
HISTOGRAM_BINA0,
|
|
|
|
HISTOGRAM_BINA1,
|
|
|
|
HISTOGRAM_BINA2,
|
|
|
|
HISTOGRAM_BINA3,
|
|
|
|
HISTOGRAM_BINA4,
|
|
|
|
HISTOGRAM_BINA5,
|
|
|
|
HISTOGRAM_BINA6,
|
|
|
|
HISTOGRAM_BINA7,
|
|
|
|
HISTOGRAM_BINA8,
|
|
|
|
HISTOGRAM_BINB0,
|
|
|
|
HISTOGRAM_BINB1,
|
|
|
|
HISTOGRAM_BINB2,
|
|
|
|
HISTOGRAM_BINB3,
|
|
|
|
HISTOGRAM_BINB4,
|
|
|
|
HISTOGRAM_BINB5,
|
|
|
|
HISTOGRAM_BINB6,
|
|
|
|
HISTOGRAM_BINB7,
|
|
|
|
HISTOGRAM_BINB8,
|
|
|
|
HISTOGRAM_BINC0,
|
|
|
|
HISTOGRAM_BINC1,
|
|
|
|
HISTOGRAM_BINC2,
|
|
|
|
HISTOGRAM_BINC3,
|
|
|
|
HISTOGRAM_BINC4,
|
|
|
|
HISTOGRAM_BINC5,
|
|
|
|
HISTOGRAM_BINC6,
|
|
|
|
HISTOGRAM_BINC7,
|
|
|
|
HISTOGRAM_BINC8,
|
|
|
|
HISTOGRAM_BIND0,
|
|
|
|
HISTOGRAM_BIND1,
|
|
|
|
HISTOGRAM_BIND2,
|
|
|
|
HISTOGRAM_BIND3,
|
|
|
|
HISTOGRAM_BIND4,
|
|
|
|
HISTOGRAM_BIND5,
|
|
|
|
HISTOGRAM_BIND6,
|
|
|
|
HISTOGRAM_BIND7,
|
|
|
|
HISTOGRAM_BIND8,
|
|
|
|
TICKS_CONTRAST_SET,
|
|
|
|
TIME_CONTRAST_SET,
|
|
|
|
CONTRAST_BINA0,
|
|
|
|
CONTRAST_BINA1,
|
|
|
|
CONTRAST_BINA2,
|
|
|
|
CONTRAST_BINA3,
|
|
|
|
CONTRAST_BINA4,
|
|
|
|
CONTRAST_BINA5,
|
|
|
|
CONTRAST_BINA6,
|
|
|
|
CONTRAST_BINA7,
|
|
|
|
CONTRAST_BINA8,
|
|
|
|
CONTRAST_BINB0,
|
|
|
|
CONTRAST_BINB1,
|
|
|
|
CONTRAST_BINB2,
|
|
|
|
CONTRAST_BINB3,
|
|
|
|
CONTRAST_BINB4,
|
|
|
|
CONTRAST_BINB5,
|
|
|
|
CONTRAST_BINB6,
|
|
|
|
CONTRAST_BINB7,
|
|
|
|
CONTRAST_BINB8,
|
|
|
|
CONTRAST_BINC0,
|
|
|
|
CONTRAST_BINC1,
|
|
|
|
CONTRAST_BINC2,
|
|
|
|
CONTRAST_BINC3,
|
|
|
|
CONTRAST_BINC4,
|
|
|
|
CONTRAST_BINC5,
|
|
|
|
CONTRAST_BINC6,
|
|
|
|
CONTRAST_BINC7,
|
|
|
|
CONTRAST_BINC8,
|
|
|
|
CONTRAST_BIND0,
|
|
|
|
CONTRAST_BIND1,
|
|
|
|
CONTRAST_BIND2,
|
|
|
|
CONTRAST_BIND3,
|
|
|
|
CONTRAST_BIND4,
|
|
|
|
CONTRAST_BIND5,
|
|
|
|
CONTRAST_BIND6,
|
|
|
|
CONTRAST_BIND7,
|
|
|
|
CONTRAST_BIND8,
|
|
|
|
CHKSUM,
|
|
|
|
DWL_ID,
|
|
|
|
DWL_PIXX,
|
|
|
|
DWL_PIXY,
|
|
|
|
DWL_X_UNCORRECTED,
|
|
|
|
DWL_Y_UNCORRECTED,
|
|
|
|
DWL_X_CORRECTED,
|
|
|
|
DWL_Y_CORRECTED,
|
|
|
|
DWL_MAGNITUDE,
|
|
|
|
DWL_CXA,
|
|
|
|
DWL_CYA,
|
|
|
|
DWL_QUALITY,
|
|
|
|
MATCHEDSTR_ID,
|
|
|
|
MATCHEDSTR_CAMFPX,
|
|
|
|
MATCHEDSTR_CAMFPY,
|
|
|
|
MATCHEDSTR_CAMCARTX,
|
|
|
|
MATCHEDSTR_CAMCARTY,
|
|
|
|
MATCHEDSTR_CAMCARTZ,
|
|
|
|
MATCHEDSTR_CAMMAGNITUDE,
|
|
|
|
MATCHEDSTR_DBFPX,
|
|
|
|
MATCHEDSTR_DBFPY,
|
|
|
|
MATCHEDSTR_DBCARTX,
|
|
|
|
MATCHEDSTR_DBCARTY,
|
|
|
|
MATCHEDSTR_DBCARTZ,
|
|
|
|
MATCHEDSTR_DBMAGNITUDE,
|
|
|
|
MATCHEDSTR_CATALOGID,
|
|
|
|
DBIMAGE_ID,
|
|
|
|
DBIMAGE_PIXX,
|
|
|
|
DBIMAGE_PIXY,
|
|
|
|
DBIMAGE_X,
|
|
|
|
DBIMAGE_Y,
|
|
|
|
DBIMAGE_MAGNITUDE,
|
|
|
|
BLOBPIX_ID,
|
|
|
|
BLOBPIX_X,
|
|
|
|
BLOBPIX_Y,
|
|
|
|
BLOBPIX_TOT_VAL,
|
|
|
|
BLOBPIX_IN_USE,
|
|
|
|
BLOBPIX_BRIGHT_NEIGHBOURS,
|
2022-01-19 11:52:06 +01:00
|
|
|
BLOBPIX_REGION,
|
|
|
|
CAMERA_MODE,
|
|
|
|
FOCALLENGTH,
|
|
|
|
EXPOSURE,
|
|
|
|
INTERVAL,
|
|
|
|
CAMERA_OFFSET,
|
|
|
|
PGAGAIN,
|
|
|
|
ADCGAIN,
|
|
|
|
CAM_REG1,
|
|
|
|
CAM_VAL1,
|
|
|
|
CAM_REG2,
|
|
|
|
CAM_VAL2,
|
|
|
|
CAM_REG3,
|
|
|
|
CAM_VAL3,
|
|
|
|
CAM_REG4,
|
|
|
|
CAM_VAL4,
|
2022-02-09 19:20:19 +01:00
|
|
|
CAM_REG5,
|
|
|
|
CAM_VAL5,
|
|
|
|
CAM_REG6,
|
|
|
|
CAM_VAL6,
|
|
|
|
CAM_REG7,
|
|
|
|
CAM_VAL7,
|
|
|
|
CAM_REG8,
|
|
|
|
CAM_VAL8,
|
|
|
|
CAM_FREQ_1,
|
2022-01-19 11:52:06 +01:00
|
|
|
LIMITS_ACTION,
|
|
|
|
LIMITS_FPGA18CURRENT,
|
|
|
|
LIMITS_FPGA25CURRENT,
|
|
|
|
LIMITS_FPGA10CURRENT,
|
|
|
|
LIMITS_MCUCURRENT,
|
|
|
|
LIMITS_CMOS21CURRENT,
|
|
|
|
LIMITS_CMOSPIXCURRENT,
|
|
|
|
LIMITS_CMOS33CURRENT,
|
|
|
|
LIMITS_CMOSVRESCURRENT,
|
|
|
|
LIMITS_CMOSTEMPERATURE,
|
|
|
|
LIMITS_MCUTEMPERATURE,
|
|
|
|
BLOB_MODE,
|
|
|
|
BLOB_MIN_VALUE,
|
|
|
|
BLOB_MIN_DISTANCE,
|
|
|
|
BLOB_NEIGHBOUR_DISTANCE,
|
|
|
|
BLOB_NEIGHBOUR_BRIGHTPIXELS,
|
|
|
|
BLOB_MIN_TOTAL_VALUE,
|
|
|
|
BLOB_MAX_TOTAL_VALUE,
|
|
|
|
BLOB_MIN_BRIGHT_NEIGHBOURS,
|
|
|
|
BLOB_MAX_BRIGHT_NEIGHBOURS,
|
|
|
|
BLOB_MAX_PIXELSTOCONSIDER,
|
|
|
|
BLOB_SIGNAL_THRESHOLD,
|
|
|
|
BLOB_DARK_THRESHOLD,
|
|
|
|
BLOB_ENABLE_HISTOGRAM,
|
|
|
|
BLOB_ENABLE_CONTRAST,
|
2022-02-09 19:20:19 +01:00
|
|
|
BLOB_BIN_MODE,
|
|
|
|
LOGLEVEL1,
|
|
|
|
LOGLEVEL2,
|
|
|
|
LOGLEVEL3,
|
|
|
|
LOGLEVEL4,
|
|
|
|
LOGLEVEL5,
|
|
|
|
LOGLEVEL6,
|
|
|
|
LOGLEVEL7,
|
|
|
|
LOGLEVEL8,
|
|
|
|
LOGLEVEL9,
|
|
|
|
LOGLEVEL10,
|
|
|
|
LOGLEVEL11,
|
|
|
|
LOGLEVEL12,
|
|
|
|
LOGLEVEL13,
|
|
|
|
LOGLEVEL14,
|
|
|
|
LOGLEVEL15,
|
|
|
|
LOGLEVEL16,
|
|
|
|
MOUNTING_QW,
|
|
|
|
MOUNTING_QX,
|
|
|
|
MOUNTING_QY,
|
|
|
|
MOUNTING_QZ,
|
|
|
|
IMAGE_PROCESSOR_MODE,
|
|
|
|
IMAGE_PROCESSOR_STORE,
|
|
|
|
IMAGE_PROCESSOR_SIGNALTHRESHOLD,
|
|
|
|
IMAGE_PROCESSOR_DARKTHRESHOLD,
|
|
|
|
IMAGE_PROCESSOR_BACKGROUNDCOMPENSATION,
|
|
|
|
CENTROIDING_ENABLE_FILTER,
|
|
|
|
CENTROIDING_MAX_QUALITY,
|
|
|
|
CENTROIDING_DARK_THRESHOLD,
|
|
|
|
CENTROIDING_MIN_QUALITY,
|
|
|
|
CENTROIDING_MAX_INTENSITY,
|
|
|
|
CENTROIDING_MIN_INTENSITY,
|
|
|
|
CENTROIDING_MAX_MAGNITUDE,
|
|
|
|
CENTROIDING_GAUSSIAN_CMAX,
|
|
|
|
CENTROIDING_GAUSSIAN_CMIN,
|
|
|
|
CENTROIDING_TRANSMATRIX00,
|
|
|
|
CENTROIDING_TRANSMATRIX01,
|
|
|
|
CENTROIDING_TRANSMATRIX10,
|
|
|
|
CENTROIDING_TRANSMATRIX11,
|
|
|
|
LISA_MODE,
|
|
|
|
LISA_PREFILTER_DIST_THRESHOLD,
|
|
|
|
LISA_PREFILTER_ANGLE_THRESHOLD,
|
|
|
|
LISA_FOV_WIDTH,
|
|
|
|
LISA_FOV_HEIGHT,
|
|
|
|
LISA_FLOAT_STAR_LIMIT,
|
|
|
|
LISA_CLOSE_STAR_LIMIT,
|
|
|
|
LISA_RATING_WEIGHT_CLOSE_STAR_COUNT,
|
|
|
|
LISA_RATING_WEIGHT_FRACTION_CLOSE,
|
|
|
|
LISA_RATING_WEIGHT_MEAN_SUM,
|
|
|
|
LISA_RATING_WEIGHT_DB_STAR_COUNT,
|
|
|
|
LISA_MAX_COMBINATIONS,
|
|
|
|
LISA_NR_STARS_STOP,
|
|
|
|
LISA_FRACTION_CLOSE_STOP,
|
|
|
|
MATCHING_SQUARED_DISTANCE_LIMIT,
|
|
|
|
MATCHING_SQUARED_SHIFT_LIMIT,
|
|
|
|
TRACKING_THIN_LIMIT,
|
|
|
|
TRACKING_OUTLIER_THRESHOLD,
|
|
|
|
TRACKING_OUTLIER_THRESHOLD_QUEST,
|
|
|
|
TRACKING_TRACKER_CHOICE,
|
|
|
|
VALIDATION_STABLE_COUNT,
|
|
|
|
VALIDATION_MAX_DIFFERENCE,
|
|
|
|
VALIDATION_MIN_TRACKER_CONFIDENCE,
|
|
|
|
VALIDATION_MIN_MATCHED_STARS,
|
|
|
|
ALGO_MODE,
|
|
|
|
ALGO_I2T_MIN_CONFIDENCE,
|
|
|
|
ALGO_I2T_MIN_MATCHED,
|
|
|
|
ALGO_I2L_MIN_CONFIDENCE,
|
|
|
|
ALGO_I2L_MIN_MATCHED,
|
|
|
|
SUBSCRIPTION_TM1,
|
|
|
|
SUBSCRIPTION_TM2,
|
|
|
|
SUBSCRIPTION_TM3,
|
|
|
|
SUBSCRIPTION_TM4,
|
|
|
|
SUBSCRIPTION_TM5,
|
|
|
|
SUBSCRIPTION_TM6,
|
|
|
|
SUBSCRIPTION_TM7,
|
|
|
|
SUBSCRIPTION_TM8,
|
|
|
|
SUBSCRIPTION_TM9,
|
|
|
|
SUBSCRIPTION_TM10,
|
|
|
|
SUBSCRIPTION_TM11,
|
|
|
|
SUBSCRIPTION_TM12,
|
|
|
|
SUBSCRIPTION_TM13,
|
|
|
|
SUBSCRIPTION_TM14,
|
|
|
|
SUBSCRIPTION_TM15,
|
|
|
|
SUBSCRIPTION_TM16,
|
|
|
|
LOG_SUBSCRIPTION_LEVEL1,
|
|
|
|
LOG_SUBSCRIPTION_MODULE1,
|
|
|
|
LOG_SUBSCRIPTION_LEVEL2,
|
|
|
|
LOG_SUBSCRIPTION_MODULE2,
|
|
|
|
DEBUG_CAMERA_TIMING,
|
|
|
|
DEBUG_CAMERA_TEST
|
2021-11-27 19:40:52 +01:00
|
|
|
};
|
2021-07-07 12:12:01 +02:00
|
|
|
|
2021-11-26 09:14:41 +01:00
|
|
|
static const DeviceCommandId_t PING_REQUEST = 0;
|
2021-11-27 19:40:52 +01:00
|
|
|
// Boots image (works only in bootloader mode)
|
|
|
|
static const DeviceCommandId_t BOOT = 1;
|
2021-11-26 15:24:52 +01:00
|
|
|
static const DeviceCommandId_t REQ_VERSION = 2;
|
2021-11-27 19:40:52 +01:00
|
|
|
static const DeviceCommandId_t REQ_INTERFACE = 3;
|
|
|
|
static const DeviceCommandId_t REQ_TIME = 4;
|
2021-12-09 15:02:58 +01:00
|
|
|
static const DeviceCommandId_t ERASE = 5;
|
|
|
|
static const DeviceCommandId_t UNLOCK = 6;
|
2021-12-14 19:24:31 +01:00
|
|
|
static const DeviceCommandId_t SWITCH_TO_BOOTLOADER_PROGRAM = 7;
|
2021-12-02 08:05:33 +01:00
|
|
|
static const DeviceCommandId_t DOWNLOAD_IMAGE = 9;
|
2021-11-29 11:04:56 +01:00
|
|
|
static const DeviceCommandId_t UPLOAD_IMAGE = 10;
|
2021-11-27 19:40:52 +01:00
|
|
|
static const DeviceCommandId_t REQ_POWER = 11;
|
2021-12-09 15:02:58 +01:00
|
|
|
static const DeviceCommandId_t TAKE_IMAGE = 15;
|
|
|
|
static const DeviceCommandId_t DOWNLOAD_CENTROID = 16;
|
|
|
|
static const DeviceCommandId_t UPLOAD_CENTROID = 17;
|
2022-02-10 18:39:37 +01:00
|
|
|
static const DeviceCommandId_t SUBSCRIPTION = 18;
|
2022-01-29 12:27:26 +01:00
|
|
|
static const DeviceCommandId_t IMAGE_PROCESSOR = 19;
|
2021-11-27 19:40:52 +01:00
|
|
|
static const DeviceCommandId_t REQ_SOLUTION = 24;
|
2021-07-07 12:12:01 +02:00
|
|
|
static const DeviceCommandId_t REQ_TEMPERATURE = 25;
|
2021-12-15 19:32:43 +01:00
|
|
|
static const DeviceCommandId_t REQ_HISTOGRAM = 28;
|
|
|
|
static const DeviceCommandId_t REQ_CONTRAST = 29;
|
2021-12-06 19:36:21 +01:00
|
|
|
static const DeviceCommandId_t LIMITS = 40;
|
2021-12-07 16:30:17 +01:00
|
|
|
static const DeviceCommandId_t MOUNTING = 41;
|
2021-12-06 19:36:21 +01:00
|
|
|
static const DeviceCommandId_t CAMERA = 42;
|
|
|
|
static const DeviceCommandId_t CENTROIDING = 44;
|
|
|
|
static const DeviceCommandId_t LISA = 45;
|
2021-12-07 16:30:17 +01:00
|
|
|
static const DeviceCommandId_t MATCHING = 46;
|
2021-12-06 19:36:21 +01:00
|
|
|
static const DeviceCommandId_t TRACKING = 47;
|
|
|
|
static const DeviceCommandId_t VALIDATION = 48;
|
|
|
|
static const DeviceCommandId_t ALGO = 49;
|
2021-12-09 15:02:58 +01:00
|
|
|
static const DeviceCommandId_t CHECKSUM = 50;
|
|
|
|
static const DeviceCommandId_t READ = 51;
|
|
|
|
static const DeviceCommandId_t WRITE = 52;
|
|
|
|
static const DeviceCommandId_t DOWNLOAD_MATCHED_STAR = 53;
|
2021-12-10 10:07:23 +01:00
|
|
|
static const DeviceCommandId_t STOP_IMAGE_LOADER = 55;
|
|
|
|
static const DeviceCommandId_t RESET_ERROR = 56;
|
2021-12-11 11:56:47 +01:00
|
|
|
static const DeviceCommandId_t CHANGE_DOWNLOAD_FILE = 57;
|
2021-12-14 19:24:31 +01:00
|
|
|
static const DeviceCommandId_t SET_JSON_FILE_NAME = 58;
|
2021-12-22 16:06:30 +01:00
|
|
|
static const DeviceCommandId_t SET_READ_FILENAME = 59;
|
2021-12-29 20:33:20 +01:00
|
|
|
static const DeviceCommandId_t SET_TIME = 60;
|
|
|
|
static const DeviceCommandId_t DOWNLOAD_DBIMAGE = 61;
|
|
|
|
static const DeviceCommandId_t DOWNLOAD_BLOBPIXEL = 62;
|
|
|
|
static const DeviceCommandId_t DOWNLOAD_FPGA_IMAGE = 63;
|
2021-12-30 12:52:08 +01:00
|
|
|
static const DeviceCommandId_t CHANGE_FPGA_DOWNLOAD_FILE = 64;
|
|
|
|
static const DeviceCommandId_t UPLOAD_FPGA_IMAGE = 65;
|
|
|
|
static const DeviceCommandId_t FPGA_ACTION = 66;
|
2022-01-17 15:28:53 +01:00
|
|
|
static const DeviceCommandId_t REQ_CAMERA = 67;
|
|
|
|
static const DeviceCommandId_t REQ_LIMITS = 68;
|
2022-02-09 19:20:19 +01:00
|
|
|
static const DeviceCommandId_t REQ_LOG_LEVEL = 69;
|
|
|
|
static const DeviceCommandId_t REQ_MOUNTING = 70;
|
|
|
|
static const DeviceCommandId_t REQ_IMAGE_PROCESSOR = 71;
|
|
|
|
static const DeviceCommandId_t REQ_CENTROIDING = 72;
|
|
|
|
static const DeviceCommandId_t REQ_LISA = 73;
|
|
|
|
static const DeviceCommandId_t REQ_MATCHING = 74;
|
|
|
|
static const DeviceCommandId_t REQ_TRACKING = 75;
|
|
|
|
static const DeviceCommandId_t REQ_VALIDATION = 76;
|
|
|
|
static const DeviceCommandId_t REQ_ALGO = 77;
|
|
|
|
static const DeviceCommandId_t REQ_SUBSCRIPTION = 78;
|
|
|
|
static const DeviceCommandId_t REQ_LOG_SUBSCRIPTION = 79;
|
|
|
|
static const DeviceCommandId_t REQ_DEBUG_CAMERA = 80;
|
2022-02-10 18:39:37 +01:00
|
|
|
static const DeviceCommandId_t LOGLEVEL = 81;
|
|
|
|
static const DeviceCommandId_t LOGSUBSCRIPTION = 82;
|
|
|
|
static const DeviceCommandId_t DEBUG_CAMERA = 83;
|
2021-11-29 11:04:56 +01:00
|
|
|
static const DeviceCommandId_t NONE = 0xFFFFFFFF;
|
2021-07-07 12:12:01 +02:00
|
|
|
|
2021-11-26 15:24:52 +01:00
|
|
|
static const uint32_t VERSION_SET_ID = REQ_VERSION;
|
2021-11-27 19:40:52 +01:00
|
|
|
static const uint32_t INTERFACE_SET_ID = REQ_INTERFACE;
|
|
|
|
static const uint32_t POWER_SET_ID = REQ_POWER;
|
2021-07-07 12:12:01 +02:00
|
|
|
static const uint32_t TEMPERATURE_SET_ID = REQ_TEMPERATURE;
|
2021-11-27 19:40:52 +01:00
|
|
|
static const uint32_t TIME_SET_ID = REQ_TIME;
|
|
|
|
static const uint32_t SOLUTION_SET_ID = REQ_SOLUTION;
|
2021-12-15 19:32:43 +01:00
|
|
|
static const uint32_t HISTOGRAM_SET_ID = REQ_HISTOGRAM;
|
|
|
|
static const uint32_t CONTRAST_SET_ID = REQ_CONTRAST;
|
2021-12-24 07:31:21 +01:00
|
|
|
static const uint32_t CHECKSUM_SET_ID = CHECKSUM;
|
2021-12-29 20:33:20 +01:00
|
|
|
static const uint32_t DOWNLOADCENTROID_SET_ID = DOWNLOAD_CENTROID;
|
|
|
|
static const uint32_t DOWNLOAD_MATCHED_STAR_SET_ID = DOWNLOAD_MATCHED_STAR;
|
|
|
|
static const uint32_t DOWNLOAD_DBIMAGE_SET_ID = DOWNLOAD_DBIMAGE;
|
|
|
|
static const uint32_t DOWNLOAD_BLOBPIXEL_SET_ID = DOWNLOAD_BLOBPIXEL;
|
2022-01-17 15:28:53 +01:00
|
|
|
static const uint32_t CAMERA_SET_ID = REQ_CAMERA;
|
|
|
|
static const uint32_t LIMITS_SET_ID = REQ_LIMITS;
|
2022-02-09 19:20:19 +01:00
|
|
|
static const uint32_t LOG_LEVEL_SET_ID = REQ_LOG_LEVEL;
|
|
|
|
static const uint32_t MOUNTING_SET_ID = REQ_MOUNTING;
|
|
|
|
static const uint32_t IMAGE_PROCESSOR_SET_ID = REQ_IMAGE_PROCESSOR;
|
|
|
|
static const uint32_t CENTROIDING_SET_ID = REQ_CENTROIDING;
|
|
|
|
static const uint32_t LISA_SET_ID = REQ_LISA;
|
|
|
|
static const uint32_t MATCHING_SET_ID = REQ_MATCHING;
|
|
|
|
static const uint32_t TRACKING_SET_ID = REQ_TRACKING;
|
|
|
|
static const uint32_t VALIDATION_SET_ID = REQ_VALIDATION;
|
|
|
|
static const uint32_t ALGO_SET_ID = REQ_ALGO;
|
|
|
|
static const uint32_t SUBSCRIPTION_SET_ID = REQ_SUBSCRIPTION;
|
|
|
|
static const uint32_t LOG_SUBSCRIPTION_SET_ID = REQ_LOG_SUBSCRIPTION;
|
2022-02-10 18:39:37 +01:00
|
|
|
static const uint32_t DEBUG_CAMERA_SET_ID = REQ_DEBUG_CAMERA;
|
2021-07-07 12:12:01 +02:00
|
|
|
|
|
|
|
/** Max size of unencoded frame */
|
|
|
|
static const size_t MAX_FRAME_SIZE = 1200;
|
|
|
|
|
2022-01-29 12:27:26 +01:00
|
|
|
static const uint8_t TEMPERATURE_SET_ENTRIES = 5;
|
2021-11-27 19:40:52 +01:00
|
|
|
static const uint8_t VERSION_SET_ENTRIES = 5;
|
2021-11-29 11:04:56 +01:00
|
|
|
static const uint8_t INTERFACE_SET_ENTRIES = 4;
|
2021-11-27 19:40:52 +01:00
|
|
|
static const uint8_t POWER_SET_ENTRIES = 18;
|
|
|
|
static const uint8_t TIME_SET_ENTRIES = 4;
|
|
|
|
static const uint8_t SOLUTION_SET_ENTRIES = 23;
|
2021-12-15 19:32:43 +01:00
|
|
|
static const uint8_t HISTOGRAM_SET_ENTRIES = 38;
|
|
|
|
static const uint8_t CONTRAST_SET_ENTRIES = 38;
|
2021-12-24 07:31:21 +01:00
|
|
|
static const uint8_t CHECKSUM_SET_ENTRIES = 1;
|
2021-12-29 20:33:20 +01:00
|
|
|
static const uint8_t DOWNLOAD_CENTROID_SET_ENTRIES = 11;
|
|
|
|
static const uint8_t DOWNLOAD_MATCHED_STAR_SET_ENTRIES = 14;
|
|
|
|
static const uint8_t DOWNLOAD_DBIMAGE_SET_ENTRIES = 6;
|
|
|
|
static const uint8_t DOWNLOAD_BLOBPIXEL_SET_ENTRIES = 7;
|
2022-02-09 19:20:19 +01:00
|
|
|
static const uint8_t CAMERA_SET_ENTRIES = 24;
|
2022-01-17 15:28:53 +01:00
|
|
|
static const uint8_t LIMITS_SET_ENTRIES = 11;
|
2022-02-09 19:20:19 +01:00
|
|
|
static const uint8_t LOG_LEVEL_SET_ENTRIES = 16;
|
|
|
|
static const uint8_t MOUNTING_SET_ENTRIES = 4;
|
|
|
|
static const uint8_t IMAGE_PROCESSOR_SET_ENTRIES = 5;
|
|
|
|
static const uint8_t CENTROIDING_PARAMS_SET_ENTRIES = 13;
|
|
|
|
static const uint8_t LISA_SET_ENTRIES = 14;
|
|
|
|
static const uint8_t MATCHING_SET_ENTRIES = 2;
|
|
|
|
static const uint8_t TRACKING_SET_ENTRIES = 4;
|
|
|
|
static const uint8_t VALIDATION_SET_ENTRIES = 4;
|
|
|
|
static const uint8_t ALGO_SET_ENTRIES = 5;
|
|
|
|
static const uint8_t SUBSCRIPTION_SET_ENTRIES = 16;
|
|
|
|
static const uint8_t LOG_SUBSCRIPTION_SET_ENTRIES = 4;
|
|
|
|
static const uint8_t DEBUG_CAMERA_SET_ENTRIES = 2;
|
2021-11-27 19:40:52 +01:00
|
|
|
|
|
|
|
// Action, parameter and telemetry IDs
|
|
|
|
namespace ID {
|
2022-01-17 15:58:27 +01:00
|
|
|
static const uint8_t PING = 0;
|
|
|
|
static const uint8_t BOOT = 1;
|
|
|
|
static const uint8_t VERSION = 2;
|
|
|
|
static const uint8_t INTERFACE = 3;
|
|
|
|
static const uint8_t LIMITS = 5;
|
|
|
|
static const uint8_t MOUNTING = 6;
|
2022-01-29 12:27:26 +01:00
|
|
|
static const uint8_t IMAGE_PROCESSOR = 10;
|
2022-01-17 15:58:27 +01:00
|
|
|
static const uint8_t CAMERA = 9;
|
|
|
|
static const uint8_t CENTROIDING = 11;
|
|
|
|
static const uint8_t LISA = 12;
|
|
|
|
static const uint8_t MATCHING = 13;
|
|
|
|
static const uint8_t TRACKING = 14;
|
|
|
|
static const uint8_t VALIDATION = 15;
|
|
|
|
static const uint8_t ALGO = 16;
|
|
|
|
static const uint8_t REBOOT = 7;
|
|
|
|
static const uint8_t UPLOAD_IMAGE = 10;
|
|
|
|
static const uint8_t POWER = 11;
|
|
|
|
static const uint8_t SET_TIME = 14;
|
2022-02-09 19:20:19 +01:00
|
|
|
static const uint8_t SUBSCRIPTION = 18;
|
2022-01-17 15:58:27 +01:00
|
|
|
static const uint8_t SOLUTION = 24;
|
2022-01-29 12:27:26 +01:00
|
|
|
static const uint8_t TEMPERATURE = 27;
|
2022-01-17 15:58:27 +01:00
|
|
|
static const uint8_t HISTOGRAM = 28;
|
|
|
|
static const uint8_t CONTRAST = 29;
|
|
|
|
static const uint8_t TIME = 1;
|
|
|
|
static const uint8_t WRITE = 2;
|
|
|
|
static const uint8_t READ = 3;
|
|
|
|
static const uint8_t CHECKSUM = 4;
|
|
|
|
static const uint8_t ERASE = 5;
|
|
|
|
static const uint8_t UNLOCK = 6;
|
|
|
|
static const uint8_t TAKE_IMAGE = 15;
|
|
|
|
static const uint8_t ERROR_RESET = 12;
|
|
|
|
static const uint8_t DOWNLOAD_CENTROID = 16;
|
|
|
|
static const uint8_t UPLOAD_CENTROID = 17;
|
|
|
|
static const uint8_t DOWNLOAD_MATCHED_STAR = 18;
|
|
|
|
static const uint8_t DOWNLOAD_DBIMAGE = 19;
|
|
|
|
static const uint8_t DOWNLOAD_BLOBPIXEL = 24;
|
|
|
|
static const uint8_t FPGA_ACTION = 22;
|
2022-02-09 19:20:19 +01:00
|
|
|
static const uint8_t LOG_LEVEL = 3;
|
|
|
|
static const uint8_t LOG_SUBSCRIPTION = 19;
|
|
|
|
static const uint8_t DEBUG_CAMERA = 20;
|
2022-01-17 15:58:27 +01:00
|
|
|
} // namespace ID
|
2021-07-07 12:12:01 +02:00
|
|
|
|
2021-12-14 19:24:31 +01:00
|
|
|
namespace Program {
|
2022-01-17 15:58:27 +01:00
|
|
|
static const uint8_t BOOTLOADER = 1;
|
|
|
|
static const uint8_t FIRMWARE = 2;
|
|
|
|
} // namespace Program
|
2021-12-14 19:24:31 +01:00
|
|
|
|
2021-07-07 12:12:01 +02:00
|
|
|
/**
|
|
|
|
* @brief This dataset can be used to store the temperature of a reaction wheel.
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class TemperatureSet : public StaticLocalDataSet<TEMPERATURE_SET_ENTRIES> {
|
|
|
|
public:
|
2022-01-29 12:27:26 +01:00
|
|
|
static const size_t SIZE = 24;
|
2022-01-17 15:58:27 +01:00
|
|
|
|
|
|
|
TemperatureSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, TEMPERATURE_SET_ID) {}
|
|
|
|
|
|
|
|
TemperatureSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, TEMPERATURE_SET_ID)) {}
|
|
|
|
|
|
|
|
// Ticks is time reference generated by internal counter of the star tracker
|
|
|
|
lp_var_t<uint32_t> ticks = lp_var_t<uint32_t>(sid.objectId, PoolIds::TICKS_TEMPERATURE_SET, this);
|
|
|
|
/** Unix time in microseconds */
|
|
|
|
lp_var_t<uint64_t> time = lp_var_t<uint64_t>(sid.objectId, PoolIds::TIME_TEMPERATURE_SET, this);
|
|
|
|
lp_var_t<float> mcuTemperature = lp_var_t<float>(sid.objectId, PoolIds::MCU_TEMPERATURE, this);
|
|
|
|
lp_var_t<float> cmosTemperature = lp_var_t<float>(sid.objectId, PoolIds::CMOS_TEMPERATURE, this);
|
2022-01-29 12:27:26 +01:00
|
|
|
lp_var_t<float> fpgaTemperature = lp_var_t<float>(sid.objectId, PoolIds::FPGA_TEMPERATURE, this);
|
2022-01-17 15:58:27 +01:00
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
sif::info << "TemperatureSet::printSet: Ticks: " << this->ticks << std::endl;
|
|
|
|
sif::info << "TemperatureSet::printSet: Time: " << this->time << " us" << std::endl;
|
|
|
|
sif::info << "TemperatureSet::printSet: MCU Temperature: " << this->mcuTemperature << " °C"
|
|
|
|
<< std::endl;
|
2022-01-29 12:27:26 +01:00
|
|
|
sif::info << "TemperatureSet::printSet: CMOS Temperature (raw): " << this->cmosTemperature
|
2022-01-17 15:58:27 +01:00
|
|
|
<< std::endl;
|
2022-01-29 12:27:26 +01:00
|
|
|
sif::info << "TemperatureSet::printSet: FPGA Temperature (random value): "
|
|
|
|
<< this->fpgaTemperature << " °C" << std::endl;
|
2022-01-17 15:58:27 +01:00
|
|
|
}
|
2021-07-07 12:12:01 +02:00
|
|
|
};
|
|
|
|
|
2021-11-26 15:24:52 +01:00
|
|
|
/**
|
|
|
|
* @brief Package to store version parameters
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class VersionSet : public StaticLocalDataSet<VERSION_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
static const size_t SIZE = 15;
|
|
|
|
|
|
|
|
VersionSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, VERSION_SET_ID) {}
|
|
|
|
|
|
|
|
VersionSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, VERSION_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint32_t> ticks = lp_var_t<uint32_t>(sid.objectId, PoolIds::TICKS_VERSION_SET, this);
|
|
|
|
/** Unix time in microseconds */
|
|
|
|
lp_var_t<uint64_t> time = lp_var_t<uint64_t>(sid.objectId, PoolIds::TIME_VERSION_SET, this);
|
|
|
|
lp_var_t<uint8_t> program = lp_var_t<uint8_t>(sid.objectId, PoolIds::PROGRAM, this);
|
|
|
|
lp_var_t<uint8_t> major = lp_var_t<uint8_t>(sid.objectId, PoolIds::MAJOR, this);
|
|
|
|
lp_var_t<uint8_t> minor = lp_var_t<uint8_t>(sid.objectId, PoolIds::MINOR, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
2022-01-19 11:52:06 +01:00
|
|
|
sif::info << "VersionSet::printSet: Ticks: " << std::dec << this->ticks << std::endl;
|
2022-01-17 15:58:27 +01:00
|
|
|
sif::info << "VersionSet::printSet: Unix Time: " << this->time << " us" << std::endl;
|
|
|
|
sif::info << "VersionSet::printSet: Program: " << static_cast<unsigned int>(this->program.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "VersionSet::printSet: Major: " << static_cast<unsigned int>(this->major.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "VersionSet::printSet: Minor: " << static_cast<unsigned int>(this->minor.value)
|
|
|
|
<< std::endl;
|
|
|
|
}
|
2021-11-26 15:24:52 +01:00
|
|
|
};
|
|
|
|
|
2021-11-27 19:40:52 +01:00
|
|
|
/**
|
|
|
|
* @brief Dataset to store the interface telemtry data.
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class InterfaceSet : public StaticLocalDataSet<INTERFACE_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
static const size_t SIZE = 20;
|
|
|
|
|
|
|
|
InterfaceSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, REQ_INTERFACE) {}
|
|
|
|
|
|
|
|
InterfaceSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, REQ_INTERFACE)) {}
|
|
|
|
|
|
|
|
// Ticks is time reference generated by interanl counter of the star tracker
|
|
|
|
lp_var_t<uint32_t> ticks = lp_var_t<uint32_t>(sid.objectId, PoolIds::TICKS_INTERFACE_SET, this);
|
|
|
|
/** Unix time in microseconds */
|
|
|
|
lp_var_t<uint64_t> time = lp_var_t<uint64_t>(sid.objectId, PoolIds::TIME_INTERFACE_SET, this);
|
|
|
|
lp_var_t<uint32_t> frameCount = lp_var_t<uint32_t>(sid.objectId, PoolIds::FRAME_COUNT, this);
|
|
|
|
lp_var_t<uint32_t> checksumerrorCount =
|
|
|
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::CHECKSUM_ERROR_COUNT, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
|
|
|
sif::info << "InterfaceSet::printSet: Ticks: " << this->ticks << std::endl;
|
|
|
|
sif::info << "InterfaceSet::printSet: Time: " << this->time << " us" << std::endl;
|
|
|
|
sif::info << "InterfaceSet::printSet: Frame Count: " << this->frameCount << std::endl;
|
|
|
|
sif::info << "InterfaceSet::printSet: Checksum Error Count: " << this->checksumerrorCount
|
|
|
|
<< std::endl;
|
|
|
|
}
|
2021-11-27 19:40:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Dataset to store the data of the power telemetry reply.
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class PowerSet : public StaticLocalDataSet<POWER_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
static const size_t SIZE = 76;
|
|
|
|
|
|
|
|
PowerSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, REQ_INTERFACE) {}
|
|
|
|
|
|
|
|
PowerSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, REQ_INTERFACE)) {}
|
|
|
|
|
|
|
|
// Ticks is time reference generated by interanl counter of the star tracker
|
|
|
|
lp_var_t<uint32_t> ticks = lp_var_t<uint32_t>(sid.objectId, PoolIds::TICKS_POWER_SET, this);
|
|
|
|
/** Unix time in microseconds */
|
|
|
|
lp_var_t<uint64_t> time = lp_var_t<uint64_t>(sid.objectId, PoolIds::TIME_POWER_SET, this);
|
|
|
|
lp_var_t<float> mcuCurrent = lp_var_t<float>(sid.objectId, PoolIds::MCU_CURRENT, this);
|
|
|
|
lp_var_t<float> mcuVoltage = lp_var_t<float>(sid.objectId, PoolIds::MCU_VOLTAGE, this);
|
|
|
|
lp_var_t<float> fpgaCoreCurrent = lp_var_t<float>(sid.objectId, PoolIds::FPGA_CORE_CURRENT, this);
|
|
|
|
lp_var_t<float> fpgaCoreVoltage = lp_var_t<float>(sid.objectId, PoolIds::FPGA_CORE_VOLTAGE, this);
|
|
|
|
lp_var_t<float> fpga18Current = lp_var_t<float>(sid.objectId, PoolIds::FPGA_18_CURRENT, this);
|
|
|
|
lp_var_t<float> fpga18Voltage = lp_var_t<float>(sid.objectId, PoolIds::FPGA_18_VOLTAGE, this);
|
|
|
|
lp_var_t<float> fpga25Current = lp_var_t<float>(sid.objectId, PoolIds::FPGA_25_CURRENT, this);
|
|
|
|
lp_var_t<float> fpga25Voltage = lp_var_t<float>(sid.objectId, PoolIds::FPGA_25_VOLTAGE, this);
|
|
|
|
lp_var_t<float> cmv21Current = lp_var_t<float>(sid.objectId, PoolIds::CMV_21_CURRENT, this);
|
|
|
|
lp_var_t<float> cmv21Voltage = lp_var_t<float>(sid.objectId, PoolIds::CMV_21_VOLTAGE, this);
|
|
|
|
lp_var_t<float> cmvPixCurrent = lp_var_t<float>(sid.objectId, PoolIds::CMV_PIX_CURRENT, this);
|
|
|
|
lp_var_t<float> cmvPixVoltage = lp_var_t<float>(sid.objectId, PoolIds::CMV_PIX_VOLTAGE, this);
|
|
|
|
lp_var_t<float> cmv33Current = lp_var_t<float>(sid.objectId, PoolIds::CMV_33_CURRENT, this);
|
|
|
|
lp_var_t<float> cmv33Voltage = lp_var_t<float>(sid.objectId, PoolIds::CMV_33_VOLTAGE, this);
|
|
|
|
lp_var_t<float> cmvResCurrent = lp_var_t<float>(sid.objectId, PoolIds::CMV_RES_CURRENT, this);
|
|
|
|
lp_var_t<float> cmvResVoltage = lp_var_t<float>(sid.objectId, PoolIds::CMV_RES_VOLTAGE, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
|
|
|
sif::info << "PowerSet::printSet: Ticks: " << this->ticks << std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: Time: " << this->time << " us" << std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: MCU Current: " << this->mcuCurrent << " A" << std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: MCU Voltage: " << this->mcuVoltage << " V" << std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: FPGA Core current: " << this->fpgaCoreCurrent << " A"
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: FPGA Core voltage: " << this->fpgaCoreVoltage << " V"
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: FPGA 18 current: " << this->fpga18Current << " A"
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: FPGA 18 voltage: " << this->fpga18Voltage << " V"
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: FPGA 25 current: " << this->fpga25Current << " A"
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: FPGA 25 voltage: " << this->fpga25Voltage << " V"
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: CMV 21 current: " << this->cmv21Current << " A" << std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: CMV 21 voltage: " << this->cmv21Voltage << " V" << std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: CMV Pix current: " << this->cmvPixCurrent << " A"
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: CMV Pix voltage: " << this->cmvPixVoltage << " V"
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: CMV 33 current: " << this->cmv33Current << " A" << std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: CMV 33 voltage: " << this->cmv33Voltage << " V" << std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: CMV Res current: " << this->cmvResCurrent << " A"
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "PowerSet::printSet: CMV Res voltage: " << this->cmvResVoltage << " V"
|
|
|
|
<< std::endl;
|
|
|
|
}
|
2021-11-27 19:40:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Data set to store the time telemetry packet.
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class TimeSet : public StaticLocalDataSet<TIME_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
static const size_t SIZE = 24;
|
|
|
|
|
|
|
|
TimeSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, TIME_SET_ID) {}
|
|
|
|
|
|
|
|
TimeSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, TIME_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint32_t> ticks = lp_var_t<uint32_t>(sid.objectId, PoolIds::TICKS_TIME_SET, this);
|
|
|
|
/** Unix time in microseconds */
|
|
|
|
lp_var_t<uint64_t> time = lp_var_t<uint64_t>(sid.objectId, PoolIds::TIME_TIME_SET, this);
|
|
|
|
// Number of milliseconds since processor start-up
|
|
|
|
lp_var_t<uint32_t> runTime = lp_var_t<uint32_t>(sid.objectId, PoolIds::RUN_TIME, this);
|
|
|
|
// Unix time in seconds?? --> maybe typo in datasheet. Seems to be microseconds
|
|
|
|
lp_var_t<uint64_t> unixTime = lp_var_t<uint64_t>(sid.objectId, PoolIds::UNIX_TIME, this);
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
|
|
|
sif::info << "TimeSet::printSet: Ticks: " << this->ticks << std::endl;
|
|
|
|
sif::info << "TimeSet::printSet: Time (time stamp): " << this->time << " us" << std::endl;
|
|
|
|
sif::info << "TimeSet::printSet: Run Time: " << this->runTime << " ms" << std::endl;
|
|
|
|
sif::info << "TimeSet::printSet: Unix Time: " << this->unixTime << " s" << std::endl;
|
|
|
|
}
|
2021-11-27 19:40:52 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief The solution dataset is the main dataset of the star tracker and contains the
|
|
|
|
* attitude information.
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class SolutionSet : public StaticLocalDataSet<SOLUTION_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
static const size_t SIZE = 78;
|
|
|
|
|
|
|
|
SolutionSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SOLUTION_SET_ID) {}
|
|
|
|
|
|
|
|
SolutionSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, SOLUTION_SET_ID)) {}
|
|
|
|
|
|
|
|
// Ticks timestamp
|
|
|
|
lp_var_t<uint32_t> ticks = lp_var_t<uint32_t>(sid.objectId, PoolIds::TICKS_SOLUTION_SET, this);
|
|
|
|
/// Unix time stamp
|
|
|
|
lp_var_t<uint64_t> time = lp_var_t<uint64_t>(sid.objectId, PoolIds::TIME_SOLUTION_SET, this);
|
|
|
|
// Calibrated quaternion (takes into account the mounting quaternion), typically same as
|
|
|
|
// track q values
|
|
|
|
lp_var_t<float> caliQw = lp_var_t<float>(sid.objectId, PoolIds::CALI_QW, this);
|
|
|
|
lp_var_t<float> caliQx = lp_var_t<float>(sid.objectId, PoolIds::CALI_QX, this);
|
|
|
|
lp_var_t<float> caliQy = lp_var_t<float>(sid.objectId, PoolIds::CALI_QY, this);
|
|
|
|
lp_var_t<float> caliQz = lp_var_t<float>(sid.objectId, PoolIds::CALI_QZ, this);
|
|
|
|
// The lower this value the more confidence that the star tracker solution is correct
|
|
|
|
lp_var_t<float> trackConfidence = lp_var_t<float>(sid.objectId, PoolIds::TRACK_CONFIDENCE, this);
|
|
|
|
// Estimated attitude of spacecraft
|
|
|
|
lp_var_t<float> trackQw = lp_var_t<float>(sid.objectId, PoolIds::TRACK_QW, this);
|
|
|
|
lp_var_t<float> trackQx = lp_var_t<float>(sid.objectId, PoolIds::TRACK_QX, this);
|
|
|
|
lp_var_t<float> trackQy = lp_var_t<float>(sid.objectId, PoolIds::TRACK_QY, this);
|
|
|
|
lp_var_t<float> trackQz = lp_var_t<float>(sid.objectId, PoolIds::TRACK_QZ, this);
|
|
|
|
// Number of stars removed from tracking solution
|
|
|
|
lp_var_t<uint8_t> trackRemoved = lp_var_t<uint8_t>(sid.objectId, PoolIds::TRACK_REMOVED, this);
|
|
|
|
// Number of stars for which a valid centroid was found
|
|
|
|
lp_var_t<uint8_t> starsCentroided =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::STARS_CENTROIDED, this);
|
|
|
|
// Number of stars that matched to a database star
|
|
|
|
lp_var_t<uint8_t> starsMatchedDatabase =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::STARS_MATCHED_DATABASE, this);
|
|
|
|
// Result of LISA (lost in space algorithm), searches for stars without prior knowledge of
|
|
|
|
// attitude
|
|
|
|
lp_var_t<float> lisaQw = lp_var_t<float>(sid.objectId, PoolIds::LISA_QW, this);
|
|
|
|
lp_var_t<float> lisaQx = lp_var_t<float>(sid.objectId, PoolIds::LISA_QX, this);
|
|
|
|
lp_var_t<float> lisaQy = lp_var_t<float>(sid.objectId, PoolIds::LISA_QY, this);
|
|
|
|
lp_var_t<float> lisaQz = lp_var_t<float>(sid.objectId, PoolIds::LISA_QZ, this);
|
|
|
|
// Percentage of close stars in LISA solution
|
|
|
|
lp_var_t<float> lisaPercentageClose =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LISA_PERC_CLOSE, this);
|
|
|
|
// Number of close stars in LISA solution
|
|
|
|
lp_var_t<uint8_t> lisaNrClose = lp_var_t<uint8_t>(sid.objectId, PoolIds::LISA_NR_CLOSE, this);
|
|
|
|
// Gives a combined overview of the validation parameters (1 for valid solution, otherwise 0)
|
|
|
|
lp_var_t<uint8_t> isTrustWorthy = lp_var_t<uint8_t>(sid.objectId, PoolIds::TRUST_WORTHY, this);
|
|
|
|
// Number of times the validation criteria was met
|
|
|
|
lp_var_t<uint32_t> stableCount = lp_var_t<uint32_t>(sid.objectId, PoolIds::STABLE_COUNT, this);
|
|
|
|
// Shows the autonomous mode used to obtain the star tracker attitude
|
|
|
|
lp_var_t<uint8_t> solutionStrategy =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::SOLUTION_STRATEGY, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
|
|
|
sif::info << "SolutionSet::printSet: Ticks: " << this->ticks << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Time: " << this->time << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Calibrated quaternion Qw: " << this->caliQw << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Calibrated quaternion Qx: " << this->caliQx << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Calibrated quaternion Qy: " << this->caliQy << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Calibrated quaternion Qz: " << this->caliQz << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Track confidence: " << this->trackConfidence << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Track Qw: " << this->trackQw << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Track Qx: " << this->trackQx << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Track Qy: " << this->trackQy << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Track Qz: " << this->trackQz << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Track removed: "
|
|
|
|
<< static_cast<unsigned int>(this->trackRemoved.value) << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Number of stars centroided: "
|
|
|
|
<< static_cast<unsigned int>(this->starsCentroided.value) << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Number of stars matched database: "
|
|
|
|
<< static_cast<unsigned int>(this->starsMatchedDatabase.value) << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: LISA Qw: " << this->lisaQw << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: LISA Qx: " << this->lisaQx << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: LISA Qy: " << this->lisaQy << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: LISA Qz: " << this->lisaQz << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: LISA Percentage close: " << this->lisaPercentageClose
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: LISA number of close stars: "
|
|
|
|
<< static_cast<unsigned int>(this->lisaNrClose.value) << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Is trust worthy: "
|
|
|
|
<< static_cast<unsigned int>(this->isTrustWorthy.value) << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Stable count: " << this->stableCount << std::endl;
|
|
|
|
sif::info << "SolutionSet::printSet: Solution strategy: "
|
|
|
|
<< static_cast<unsigned int>(this->solutionStrategy.value) << std::endl;
|
|
|
|
}
|
2021-11-27 19:40:52 +01:00
|
|
|
};
|
|
|
|
|
2021-12-15 19:32:43 +01:00
|
|
|
/**
|
|
|
|
* @brief Dataset to store the histogram
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class HistogramSet : public StaticLocalDataSet<HISTOGRAM_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 156;
|
|
|
|
|
|
|
|
HistogramSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, HISTOGRAM_SET_ID) {}
|
|
|
|
|
|
|
|
HistogramSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, HISTOGRAM_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint32_t> ticks = lp_var_t<uint32_t>(sid.objectId, PoolIds::TICKS_HISTOGRAM_SET, this);
|
|
|
|
lp_var_t<uint64_t> time = lp_var_t<uint64_t>(sid.objectId, PoolIds::TIME_HISTOGRAM_SET, this);
|
|
|
|
lp_var_t<uint32_t> binA0 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINA0, this);
|
|
|
|
lp_var_t<uint32_t> binA1 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINA1, this);
|
|
|
|
lp_var_t<uint32_t> binA2 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINA2, this);
|
|
|
|
lp_var_t<uint32_t> binA3 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINA3, this);
|
|
|
|
lp_var_t<uint32_t> binA4 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINA4, this);
|
|
|
|
lp_var_t<uint32_t> binA5 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINA5, this);
|
|
|
|
lp_var_t<uint32_t> binA6 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINA6, this);
|
|
|
|
lp_var_t<uint32_t> binA7 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINA7, this);
|
|
|
|
lp_var_t<uint32_t> binA8 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINA8, this);
|
|
|
|
lp_var_t<uint32_t> binB0 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINB0, this);
|
|
|
|
lp_var_t<uint32_t> binB1 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINB1, this);
|
|
|
|
lp_var_t<uint32_t> binB2 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINB2, this);
|
|
|
|
lp_var_t<uint32_t> binB3 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINB3, this);
|
|
|
|
lp_var_t<uint32_t> binB4 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINB4, this);
|
|
|
|
lp_var_t<uint32_t> binB5 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINB5, this);
|
|
|
|
lp_var_t<uint32_t> binB6 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINB6, this);
|
|
|
|
lp_var_t<uint32_t> binB7 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINB7, this);
|
|
|
|
lp_var_t<uint32_t> binB8 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINB8, this);
|
|
|
|
lp_var_t<uint32_t> binC0 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINC0, this);
|
|
|
|
lp_var_t<uint32_t> binC1 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINC1, this);
|
|
|
|
lp_var_t<uint32_t> binC2 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINC2, this);
|
|
|
|
lp_var_t<uint32_t> binC3 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINC3, this);
|
|
|
|
lp_var_t<uint32_t> binC4 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINC4, this);
|
|
|
|
lp_var_t<uint32_t> binC5 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINC5, this);
|
|
|
|
lp_var_t<uint32_t> binC6 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINC6, this);
|
|
|
|
lp_var_t<uint32_t> binC7 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINC7, this);
|
|
|
|
lp_var_t<uint32_t> binC8 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BINC8, this);
|
|
|
|
lp_var_t<uint32_t> binD0 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BIND0, this);
|
|
|
|
lp_var_t<uint32_t> binD1 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BIND1, this);
|
|
|
|
lp_var_t<uint32_t> binD2 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BIND2, this);
|
|
|
|
lp_var_t<uint32_t> binD3 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BIND3, this);
|
|
|
|
lp_var_t<uint32_t> binD4 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BIND4, this);
|
|
|
|
lp_var_t<uint32_t> binD5 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BIND5, this);
|
|
|
|
lp_var_t<uint32_t> binD6 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BIND6, this);
|
|
|
|
lp_var_t<uint32_t> binD7 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BIND7, this);
|
|
|
|
lp_var_t<uint32_t> binD8 = lp_var_t<uint32_t>(sid.objectId, PoolIds::HISTOGRAM_BIND8, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
|
|
|
sif::info << "HistogramSet::printSet: Ticks: " << this->ticks << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: Time (time stamp): " << this->time << " us" << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinA0: " << this->binA0 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinA1: " << this->binA1 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinA2: " << this->binA2 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinA3: " << this->binA3 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinA4: " << this->binA4 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinA5: " << this->binA5 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinA6: " << this->binA6 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinA7: " << this->binA7 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinA8: " << this->binA8 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinB0: " << this->binB0 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinB1: " << this->binB1 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinB2: " << this->binB2 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinB3: " << this->binB3 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinB4: " << this->binB4 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinB5: " << this->binB5 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinB6: " << this->binB6 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinB7: " << this->binB7 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinB8: " << this->binB8 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinC0: " << this->binC0 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinC1: " << this->binC1 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinC2: " << this->binC2 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinC3: " << this->binC3 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinC4: " << this->binC4 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinC5: " << this->binC5 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinC6: " << this->binC6 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinC7: " << this->binC7 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinC8: " << this->binC8 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinD0: " << this->binD0 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinD1: " << this->binD1 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinD2: " << this->binD2 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinD3: " << this->binD3 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinD4: " << this->binD4 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinD5: " << this->binD5 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinD6: " << this->binD6 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinD7: " << this->binD7 << std::endl;
|
|
|
|
sif::info << "HistogramSet::printSet: BinD8: " << this->binD8 << std::endl;
|
|
|
|
}
|
2021-12-15 19:32:43 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Dataset to store the contrast telemetry data
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class ContrastSet : public StaticLocalDataSet<CONTRAST_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 156;
|
|
|
|
|
|
|
|
ContrastSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, CONTRAST_SET_ID) {}
|
|
|
|
|
|
|
|
ContrastSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, CONTRAST_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint32_t> ticks = lp_var_t<uint32_t>(sid.objectId, PoolIds::TICKS_CONTRAST_SET, this);
|
|
|
|
lp_var_t<uint64_t> time = lp_var_t<uint64_t>(sid.objectId, PoolIds::TIME_CONTRAST_SET, this);
|
|
|
|
lp_var_t<uint32_t> binA0 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINA0, this);
|
|
|
|
lp_var_t<uint32_t> binA1 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINA1, this);
|
|
|
|
lp_var_t<uint32_t> binA2 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINA2, this);
|
|
|
|
lp_var_t<uint32_t> binA3 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINA3, this);
|
|
|
|
lp_var_t<uint32_t> binA4 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINA4, this);
|
|
|
|
lp_var_t<uint32_t> binA5 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINA5, this);
|
|
|
|
lp_var_t<uint32_t> binA6 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINA6, this);
|
|
|
|
lp_var_t<uint32_t> binA7 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINA7, this);
|
|
|
|
lp_var_t<uint32_t> binA8 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINA8, this);
|
|
|
|
lp_var_t<uint32_t> binb0 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINB0, this);
|
|
|
|
lp_var_t<uint32_t> binB1 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINB1, this);
|
|
|
|
lp_var_t<uint32_t> binB2 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINB2, this);
|
|
|
|
lp_var_t<uint32_t> binB3 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINB3, this);
|
|
|
|
lp_var_t<uint32_t> binB4 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINB4, this);
|
|
|
|
lp_var_t<uint32_t> binB5 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINB5, this);
|
|
|
|
lp_var_t<uint32_t> binB6 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINB6, this);
|
|
|
|
lp_var_t<uint32_t> binB7 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINB7, this);
|
|
|
|
lp_var_t<uint32_t> binB8 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINB8, this);
|
|
|
|
lp_var_t<uint32_t> binC0 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINC0, this);
|
|
|
|
lp_var_t<uint32_t> binC1 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINC1, this);
|
|
|
|
lp_var_t<uint32_t> binC2 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINC2, this);
|
|
|
|
lp_var_t<uint32_t> binC3 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINC3, this);
|
|
|
|
lp_var_t<uint32_t> binC4 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINC4, this);
|
|
|
|
lp_var_t<uint32_t> binC5 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINC5, this);
|
|
|
|
lp_var_t<uint32_t> binC6 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINC6, this);
|
|
|
|
lp_var_t<uint32_t> binC7 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINC7, this);
|
|
|
|
lp_var_t<uint32_t> binC8 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BINC8, this);
|
|
|
|
lp_var_t<uint32_t> binD0 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BIND0, this);
|
|
|
|
lp_var_t<uint32_t> binD1 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BIND1, this);
|
|
|
|
lp_var_t<uint32_t> binD2 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BIND2, this);
|
|
|
|
lp_var_t<uint32_t> binD3 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BIND3, this);
|
|
|
|
lp_var_t<uint32_t> binD4 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BIND4, this);
|
|
|
|
lp_var_t<uint32_t> binD5 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BIND5, this);
|
|
|
|
lp_var_t<uint32_t> binD6 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BIND6, this);
|
|
|
|
lp_var_t<uint32_t> binD7 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BIND7, this);
|
|
|
|
lp_var_t<uint32_t> binD8 = lp_var_t<uint32_t>(sid.objectId, PoolIds::CONTRAST_BIND8, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
|
|
|
sif::info << "ContrastSet::printSet: Ticks: " << this->ticks << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: Time (time stamp): " << this->time << " us" << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinA0: " << this->binA0 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinA1: " << this->binA1 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinA2: " << this->binA2 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinA3: " << this->binA3 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinA4: " << this->binA4 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinA5: " << this->binA5 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinA6: " << this->binA6 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinA7: " << this->binA7 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinA8: " << this->binA8 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinB0: " << this->binA0 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinB1: " << this->binB1 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinB2: " << this->binB2 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinB3: " << this->binB3 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinB4: " << this->binB4 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinB5: " << this->binB5 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinB6: " << this->binB6 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinB7: " << this->binB7 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinB8: " << this->binB8 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinC0: " << this->binC0 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinC1: " << this->binC1 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinC2: " << this->binC2 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinC3: " << this->binC3 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinC4: " << this->binC4 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinC5: " << this->binC5 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinC6: " << this->binC6 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinC7: " << this->binC7 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinC8: " << this->binC8 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinD0: " << this->binD0 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinD1: " << this->binD1 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinD2: " << this->binD2 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinD3: " << this->binD3 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinD4: " << this->binD4 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinD5: " << this->binD5 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinD6: " << this->binD6 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinD7: " << this->binD7 << std::endl;
|
|
|
|
sif::info << "ContrastSet::printSet: BinD8: " << this->binD8 << std::endl;
|
|
|
|
}
|
2021-12-15 19:32:43 +01:00
|
|
|
};
|
2021-12-23 18:33:31 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Helper Class to extract information from bytestream.
|
|
|
|
*/
|
|
|
|
class ChecksumReply {
|
2022-01-17 15:58:27 +01:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* @brief Constructor
|
|
|
|
*
|
|
|
|
* @param datafield Pointer to datafield in reply buffer
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
ChecksumReply(const uint8_t* datafield) {
|
|
|
|
ReturnValue_t result = HasReturnvaluesIF::RETURN_OK;
|
|
|
|
region = *(datafield);
|
|
|
|
const uint8_t* addressData = datafield + ADDRESS_OFFSET;
|
|
|
|
size_t size = sizeof(address);
|
|
|
|
result = SerializeAdapter::deSerialize(&address, &addressData, &size,
|
|
|
|
SerializeIF::Endianness::LITTLE);
|
|
|
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
|
|
sif::debug << "ChecksumReply::ChecksumReply: Failed to deserialize address" << std::endl;
|
2021-12-23 18:33:31 +01:00
|
|
|
}
|
2022-01-17 15:58:27 +01:00
|
|
|
const uint8_t* lengthData = datafield + LENGTH_OFFSET;
|
|
|
|
size = sizeof(length);
|
|
|
|
result =
|
|
|
|
SerializeAdapter::deSerialize(&length, &lengthData, &size, SerializeIF::Endianness::LITTLE);
|
|
|
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
|
|
sif::debug << "ChecksumReply::ChecksumReply: Failed to deserialize length" << std::endl;
|
2021-12-23 18:33:31 +01:00
|
|
|
}
|
2022-01-17 15:58:27 +01:00
|
|
|
const uint8_t* checksumData = datafield + CHECKSUM_OFFSET;
|
|
|
|
size = sizeof(checksum);
|
|
|
|
result = SerializeAdapter::deSerialize(&checksum, &checksumData, &size,
|
|
|
|
SerializeIF::Endianness::LITTLE);
|
|
|
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
|
|
|
sif::debug << "ChecksumReply::ChecksumReply: Failed to deserialize checksum" << std::endl;
|
2021-12-23 18:33:31 +01:00
|
|
|
}
|
2022-01-17 15:58:27 +01:00
|
|
|
}
|
2021-12-23 18:33:31 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
uint8_t getRegion() { return region; }
|
2021-12-23 18:33:31 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
uint32_t getAddress() { return address; }
|
2021-12-23 18:33:31 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
uint32_t getLength() { return length; }
|
|
|
|
|
|
|
|
uint32_t getChecksum() { return checksum; }
|
2021-12-23 18:33:31 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
void printChecksum() {
|
|
|
|
sif::info << "ChecksumReply::printChecksum: 0x" << std::hex << checksum << std::endl;
|
|
|
|
}
|
2021-12-23 18:33:31 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
private:
|
|
|
|
static const uint8_t ADDRESS_OFFSET = 1;
|
|
|
|
static const uint8_t LENGTH_OFFSET = 5;
|
|
|
|
static const uint8_t CHECKSUM_OFFSET = 9;
|
2021-12-23 18:33:31 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
uint8_t region = 0;
|
|
|
|
uint32_t address = 0;
|
|
|
|
uint32_t length = 0;
|
|
|
|
uint32_t checksum = 0;
|
2021-12-23 18:33:31 +01:00
|
|
|
};
|
2021-12-24 07:31:21 +01:00
|
|
|
|
|
|
|
class EraseReply {
|
2022-01-17 15:58:27 +01:00
|
|
|
public:
|
|
|
|
EraseReply(const uint8_t* datafield) { region = *datafield; }
|
2021-12-24 07:31:21 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
uint8_t getRegion() { return region; }
|
2021-12-24 07:31:21 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
private:
|
|
|
|
uint8_t region = 0;
|
2021-12-24 07:31:21 +01:00
|
|
|
};
|
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
class ChecksumSet : public StaticLocalDataSet<CHECKSUM_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 156;
|
2021-12-24 07:31:21 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
ChecksumSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, CHECKSUM_SET_ID) {}
|
2021-12-24 07:31:21 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
ChecksumSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, CHECKSUM_SET_ID)) {}
|
2021-12-24 07:31:21 +01:00
|
|
|
|
2022-01-17 15:58:27 +01:00
|
|
|
lp_var_t<uint32_t> checksum = lp_var_t<uint32_t>(sid.objectId, PoolIds::CHKSUM, this);
|
2021-12-24 07:31:21 +01:00
|
|
|
};
|
2021-07-07 12:12:01 +02:00
|
|
|
|
2021-12-29 20:33:20 +01:00
|
|
|
/**
|
|
|
|
* @brief Dataset to store download centroid response
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class DownloadCentroidSet : public StaticLocalDataSet<DOWNLOAD_CENTROID_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
2022-01-19 11:52:06 +01:00
|
|
|
static const size_t SIZE = 38;
|
2022-01-17 15:58:27 +01:00
|
|
|
|
|
|
|
DownloadCentroidSet(HasLocalDataPoolIF* owner)
|
|
|
|
: StaticLocalDataSet(owner, DOWNLOADCENTROID_SET_ID) {}
|
|
|
|
|
|
|
|
DownloadCentroidSet(object_id_t objectId)
|
|
|
|
: StaticLocalDataSet(sid_t(objectId, DOWNLOADCENTROID_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> id = lp_var_t<uint8_t>(sid.objectId, PoolIds::DWL_ID, this);
|
|
|
|
lp_var_t<float> pixx = lp_var_t<float>(sid.objectId, PoolIds::DWL_PIXX, this);
|
|
|
|
lp_var_t<float> pixy = lp_var_t<float>(sid.objectId, PoolIds::DWL_PIXY, this);
|
|
|
|
lp_var_t<float> xUncorrected = lp_var_t<float>(sid.objectId, PoolIds::DWL_X_UNCORRECTED, this);
|
|
|
|
lp_var_t<float> yUncorrected = lp_var_t<float>(sid.objectId, PoolIds::DWL_Y_UNCORRECTED, this);
|
|
|
|
lp_var_t<float> xCorrected = lp_var_t<float>(sid.objectId, PoolIds::DWL_X_CORRECTED, this);
|
|
|
|
lp_var_t<float> yCorrected = lp_var_t<float>(sid.objectId, PoolIds::DWL_Y_CORRECTED, this);
|
|
|
|
lp_var_t<uint8_t> magnitude = lp_var_t<uint8_t>(sid.objectId, PoolIds::DWL_MAGNITUDE, this);
|
|
|
|
lp_var_t<float> cxa = lp_var_t<float>(sid.objectId, PoolIds::DWL_CXA, this);
|
|
|
|
lp_var_t<float> cya = lp_var_t<float>(sid.objectId, PoolIds::DWL_CYA, this);
|
|
|
|
lp_var_t<float> quality = lp_var_t<float>(sid.objectId, PoolIds::DWL_QUALITY, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
2022-01-19 11:52:06 +01:00
|
|
|
sif::info << "DownloadCentroidSet::printSet: id: " << static_cast<unsigned int>(this->id.value)
|
2022-01-17 15:58:27 +01:00
|
|
|
<< std::endl;
|
2022-01-19 11:52:06 +01:00
|
|
|
sif::info << "DownloadCentroidSet::printSet: pixx: " << this->pixx << std::endl;
|
|
|
|
sif::info << "DownloadCentroidSet::printSet: pixy: " << this->pixy << std::endl;
|
|
|
|
sif::info << "DownloadCentroidSet::printSet: xUncorrected: " << this->xUncorrected << std::endl;
|
|
|
|
sif::info << "DownloadCentroidSet::printSet: yUncorrected: " << this->yUncorrected << std::endl;
|
|
|
|
sif::info << "DownloadCentroidSet::printSet: xCorrected: " << this->xCorrected << std::endl;
|
|
|
|
sif::info << "DownloadCentroidSet::printSet: yCorrected: " << this->yCorrected << std::endl;
|
|
|
|
sif::info << "DownloadCentroidSet::printSet: magnitude: " << this->magnitude << std::endl;
|
|
|
|
sif::info << "DownloadCentroidSet::printSet: cxa: " << this->cxa << std::endl;
|
|
|
|
sif::info << "DownloadCentroidSet::printSet: cya: " << this->cya << std::endl;
|
|
|
|
sif::info << "DownloadCentroidSet::printSet: quality: " << this->quality << std::endl;
|
2022-01-17 15:58:27 +01:00
|
|
|
}
|
2021-12-29 20:33:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
namespace UploadCentroidKeys {
|
2022-01-17 15:58:27 +01:00
|
|
|
static const char id[] = "id";
|
|
|
|
static const char pixx[] = "pixx";
|
|
|
|
static const char pixy[] = "pixy";
|
|
|
|
static const char x_uncorrected[] = "x_uncorrected";
|
|
|
|
static const char y_uncorrected[] = "y_uncorrected";
|
|
|
|
static const char x_corrected[] = "x_corrected";
|
|
|
|
static const char y_corrected[] = "y_corrected";
|
|
|
|
static const char magnitude[] = "magnitude";
|
|
|
|
static const char cxa[] = "cxa";
|
|
|
|
static const char cya[] = "cya";
|
|
|
|
static const char quality[] = "quality";
|
|
|
|
}; // namespace UploadCentroidKeys
|
2021-12-29 20:33:20 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Dataset to store matched star information
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class DownloadMatchedStar : public StaticLocalDataSet<DOWNLOAD_MATCHED_STAR_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 53;
|
|
|
|
|
|
|
|
DownloadMatchedStar(HasLocalDataPoolIF* owner)
|
|
|
|
: StaticLocalDataSet(owner, DOWNLOAD_MATCHED_STAR_SET_ID) {}
|
|
|
|
|
|
|
|
DownloadMatchedStar(object_id_t objectId)
|
|
|
|
: StaticLocalDataSet(sid_t(objectId, DOWNLOAD_MATCHED_STAR_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> id = lp_var_t<uint8_t>(sid.objectId, PoolIds::MATCHEDSTR_ID, this);
|
|
|
|
lp_var_t<float> camfpx = lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_CAMFPX, this);
|
|
|
|
lp_var_t<float> camfpy = lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_CAMFPY, this);
|
|
|
|
lp_var_t<float> camcartx = lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_CAMCARTX, this);
|
|
|
|
lp_var_t<float> camcarty = lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_CAMCARTY, this);
|
|
|
|
lp_var_t<float> camcartz = lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_CAMCARTZ, this);
|
|
|
|
lp_var_t<float> cammagnitude =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_CAMMAGNITUDE, this);
|
|
|
|
lp_var_t<float> dbfpx = lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_DBFPX, this);
|
|
|
|
lp_var_t<float> dbfpy = lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_DBFPY, this);
|
|
|
|
lp_var_t<float> dbcartx = lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_DBCARTX, this);
|
|
|
|
lp_var_t<float> dbcarty = lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_DBCARTY, this);
|
|
|
|
lp_var_t<float> dbcartz = lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_DBCARTZ, this);
|
|
|
|
lp_var_t<float> dbmagnitude =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::MATCHEDSTR_DBMAGNITUDE, this);
|
|
|
|
lp_var_t<uint32_t> catalogid =
|
|
|
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::MATCHEDSTR_CATALOGID, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: id: " << static_cast<unsigned int>(this->id.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: camfpx: " << this->camfpx << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: camfpy: " << this->camfpy << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: camcartx: " << this->camcartx << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: camcarty: " << this->camcarty << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: camcartz: " << this->camcartz << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: cammagnitude: " << this->cammagnitude << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: dbfpx: " << this->dbfpx << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: dbfpy: " << this->dbfpy << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: dbcartx: " << this->dbcartx << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: dbcarty: " << this->dbcarty << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: dbcartz: " << this->dbcartz << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: dbmagnitude: " << this->dbmagnitude << std::endl;
|
|
|
|
sif::info << "DownloadMatchedStar::printSet: catalogid: " << this->catalogid << std::endl;
|
|
|
|
}
|
2021-12-29 20:33:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Dataset to store the response to the DownloadDBImage request
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class DownloadDBImage : public StaticLocalDataSet<DOWNLOAD_DBIMAGE_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 21;
|
|
|
|
|
|
|
|
DownloadDBImage(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, DOWNLOAD_DBIMAGE_SET_ID) {}
|
|
|
|
|
|
|
|
DownloadDBImage(object_id_t objectId)
|
|
|
|
: StaticLocalDataSet(sid_t(objectId, DOWNLOAD_DBIMAGE_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> id = lp_var_t<uint8_t>(sid.objectId, PoolIds::DBIMAGE_ID, this);
|
|
|
|
lp_var_t<float> pixx = lp_var_t<float>(sid.objectId, PoolIds::DBIMAGE_PIXX, this);
|
|
|
|
lp_var_t<float> pixy = lp_var_t<float>(sid.objectId, PoolIds::DBIMAGE_PIXY, this);
|
|
|
|
lp_var_t<float> x = lp_var_t<float>(sid.objectId, PoolIds::DBIMAGE_X, this);
|
|
|
|
lp_var_t<float> y = lp_var_t<float>(sid.objectId, PoolIds::DBIMAGE_Y, this);
|
|
|
|
lp_var_t<float> magnitude = lp_var_t<float>(sid.objectId, PoolIds::DBIMAGE_MAGNITUDE, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
|
|
|
sif::info << "DownloadDBImage::printSet: id: " << static_cast<unsigned int>(this->id.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "DownloadDBImage::printSet: pixx: " << this->pixx << std::endl;
|
|
|
|
sif::info << "DownloadDBImage::printSet: pixy: " << this->pixy << std::endl;
|
|
|
|
sif::info << "DownloadDBImage::printSet: x: " << this->x << std::endl;
|
|
|
|
sif::info << "DownloadDBImage::printSet: y: " << this->y << std::endl;
|
|
|
|
sif::info << "DownloadDBImage::printSet: magnitude: " << this->magnitude << std::endl;
|
|
|
|
}
|
2021-12-29 20:33:20 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Dataset to store the response to the download blob pixel action request
|
|
|
|
*/
|
2022-01-17 15:58:27 +01:00
|
|
|
class DownloadBlobPixel : public StaticLocalDataSet<DOWNLOAD_BLOBPIXEL_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 22;
|
|
|
|
|
|
|
|
DownloadBlobPixel(HasLocalDataPoolIF* owner)
|
|
|
|
: StaticLocalDataSet(owner, DOWNLOAD_BLOBPIXEL_SET_ID) {}
|
|
|
|
|
|
|
|
DownloadBlobPixel(object_id_t objectId)
|
|
|
|
: StaticLocalDataSet(sid_t(objectId, DOWNLOAD_BLOBPIXEL_SET_ENTRIES)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> id = lp_var_t<uint8_t>(sid.objectId, PoolIds::BLOBPIX_ID, this);
|
|
|
|
lp_var_t<uint32_t> x = lp_var_t<uint32_t>(sid.objectId, PoolIds::BLOBPIX_X, this);
|
|
|
|
lp_var_t<uint32_t> y = lp_var_t<uint32_t>(sid.objectId, PoolIds::BLOBPIX_Y, this);
|
|
|
|
lp_var_t<uint32_t> totalValue = lp_var_t<uint32_t>(sid.objectId, PoolIds::BLOBPIX_TOT_VAL, this);
|
|
|
|
lp_var_t<uint8_t> inUse = lp_var_t<uint8_t>(sid.objectId, PoolIds::BLOBPIX_IN_USE, this);
|
|
|
|
lp_var_t<uint32_t> brightNeighbours =
|
|
|
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::BLOBPIX_BRIGHT_NEIGHBOURS, this);
|
|
|
|
lp_var_t<uint32_t> region = lp_var_t<uint32_t>(sid.objectId, PoolIds::BLOBPIX_REGION, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
|
|
|
sif::info << "DownloadBlobPixel::printSet: id: " << static_cast<unsigned int>(this->id.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "DownloadBlobPixel::printSet: x: " << this->x << std::endl;
|
|
|
|
sif::info << "DownloadBlobPixel::printSet: y: " << this->y << std::endl;
|
|
|
|
sif::info << "DownloadBlobPixel::printSet: totalValue: " << this->totalValue << std::endl;
|
|
|
|
sif::info << "DownloadBlobPixel::printSet: inUse: "
|
|
|
|
<< static_cast<unsigned int>(this->inUse.value) << std::endl;
|
|
|
|
sif::info << "DownloadBlobPixel::printSet: brightNeighbours: " << this->brightNeighbours
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "DownloadBlobPixel::printSet: region: " << this->region << std::endl;
|
|
|
|
}
|
2021-12-29 20:33:20 +01:00
|
|
|
};
|
2022-01-17 13:15:18 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the camera parameters set in the star tracker which are retrieved with
|
|
|
|
* a get parameter request.
|
|
|
|
*/
|
2022-01-19 11:52:06 +01:00
|
|
|
class CameraSet : public StaticLocalDataSet<CAMERA_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
2022-02-09 19:20:19 +01:00
|
|
|
static const size_t SIZE = 34;
|
2022-01-19 11:52:06 +01:00
|
|
|
|
|
|
|
CameraSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, CAMERA_SET_ID) {}
|
|
|
|
|
|
|
|
CameraSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, CAMERA_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> mode = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAMERA_MODE, this);
|
|
|
|
lp_var_t<float> focallength = lp_var_t<float>(sid.objectId, PoolIds::FOCALLENGTH, this);
|
|
|
|
lp_var_t<float> exposure = lp_var_t<float>(sid.objectId, PoolIds::EXPOSURE, this);
|
|
|
|
lp_var_t<float> interval = lp_var_t<float>(sid.objectId, PoolIds::INTERVAL, this);
|
|
|
|
lp_var_t<int16_t> offset = lp_var_t<int16_t>(sid.objectId, PoolIds::CAMERA_OFFSET, this);
|
|
|
|
lp_var_t<uint8_t> pgagain = lp_var_t<uint8_t>(sid.objectId, PoolIds::PGAGAIN, this);
|
|
|
|
lp_var_t<uint8_t> adcgain = lp_var_t<uint8_t>(sid.objectId, PoolIds::ADCGAIN, this);
|
|
|
|
lp_var_t<uint8_t> reg1 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_REG1, this);
|
|
|
|
lp_var_t<uint8_t> val1 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_VAL1, this);
|
|
|
|
lp_var_t<uint8_t> reg2 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_REG2, this);
|
|
|
|
lp_var_t<uint8_t> val2 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_VAL2, this);
|
|
|
|
lp_var_t<uint8_t> reg3 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_REG3, this);
|
|
|
|
lp_var_t<uint8_t> val3 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_VAL3, this);
|
|
|
|
lp_var_t<uint8_t> reg4 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_REG4, this);
|
|
|
|
lp_var_t<uint8_t> val4 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_VAL4, this);
|
2022-02-09 19:20:19 +01:00
|
|
|
lp_var_t<uint8_t> reg5 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_REG5, this);
|
|
|
|
lp_var_t<uint8_t> val5 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_VAL5, this);
|
|
|
|
lp_var_t<uint8_t> reg6 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_REG6, this);
|
|
|
|
lp_var_t<uint8_t> val6 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_VAL6, this);
|
|
|
|
lp_var_t<uint8_t> reg7 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_REG7, this);
|
|
|
|
lp_var_t<uint8_t> val7 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_VAL7, this);
|
|
|
|
lp_var_t<uint8_t> reg8 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_REG8, this);
|
|
|
|
lp_var_t<uint8_t> val8 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_VAL8, this);
|
|
|
|
lp_var_t<uint8_t> freq1 = lp_var_t<uint8_t>(sid.objectId, PoolIds::CAM_FREQ_1, this);
|
2022-01-19 11:52:06 +01:00
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
|
|
|
sif::info << "CameraSet::printSet: mode: " << static_cast<unsigned int>(this->mode.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: focallength: " << this->focallength << std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: exposure: " << this->exposure << std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: interval: " << this->interval << std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: offset: " << this->offset << std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: PGA gain: " << static_cast<unsigned int>(this->pgagain.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: ADC gain: " << static_cast<unsigned int>(this->adcgain.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Reg 1: " << static_cast<unsigned int>(this->reg1.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Val 1: " << static_cast<unsigned int>(this->val1.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Reg 2: " << static_cast<unsigned int>(this->reg2.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Val 2: " << static_cast<unsigned int>(this->val2.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Reg 3: " << static_cast<unsigned int>(this->reg3.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Val 3: " << static_cast<unsigned int>(this->val3.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Reg 4: " << static_cast<unsigned int>(this->reg4.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Val 4: " << static_cast<unsigned int>(this->val4.value)
|
|
|
|
<< std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "CameraSet::printSet: Reg 5: " << static_cast<unsigned int>(this->reg5.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Val 5: " << static_cast<unsigned int>(this->val5.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Reg 6: " << static_cast<unsigned int>(this->reg6.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Val 6: " << static_cast<unsigned int>(this->val6.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Reg 7: " << static_cast<unsigned int>(this->reg7.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Val 7: " << static_cast<unsigned int>(this->val7.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Reg 8: " << static_cast<unsigned int>(this->reg8.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Val 8: " << static_cast<unsigned int>(this->val8.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "CameraSet::printSet: Freq 1: " << static_cast<unsigned int>(this->freq1.value)
|
|
|
|
<< std::endl;
|
2022-01-19 11:52:06 +01:00
|
|
|
}
|
2022-01-17 13:15:18 +01:00
|
|
|
};
|
2022-01-17 15:28:53 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested limits
|
|
|
|
*/
|
2022-01-19 11:52:06 +01:00
|
|
|
class LimitsSet : public StaticLocalDataSet<LIMITS_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 41;
|
|
|
|
|
|
|
|
LimitsSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, LIMITS_SET_ID) {}
|
|
|
|
|
|
|
|
LimitsSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, LIMITS_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> action = lp_var_t<uint8_t>(sid.objectId, PoolIds::LIMITS_ACTION, this);
|
|
|
|
lp_var_t<float> fpga18current =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LIMITS_FPGA18CURRENT, this);
|
|
|
|
lp_var_t<float> fpga25current =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LIMITS_FPGA25CURRENT, this);
|
|
|
|
lp_var_t<float> fpga10current =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LIMITS_FPGA10CURRENT, this);
|
|
|
|
lp_var_t<float> mcuCurrent = lp_var_t<float>(sid.objectId, PoolIds::LIMITS_MCUCURRENT, this);
|
|
|
|
lp_var_t<float> cmos21current =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LIMITS_CMOS21CURRENT, this);
|
|
|
|
lp_var_t<float> cmosPixCurrent =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LIMITS_CMOSPIXCURRENT, this);
|
|
|
|
lp_var_t<float> cmos33current =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LIMITS_CMOS33CURRENT, this);
|
|
|
|
lp_var_t<float> cmosVresCurrent =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LIMITS_CMOSVRESCURRENT, this);
|
|
|
|
lp_var_t<float> cmosTemperature =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LIMITS_CMOSTEMPERATURE, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "LimitsSet::printSet: action: " << static_cast<unsigned int>(this->action.value)
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "LimitsSet::printSet: FPGA18Current: " << this->fpga18current << std::endl;
|
|
|
|
sif::info << "LimitsSet::printSet: FPGA25Current: " << this->fpga25current << std::endl;
|
|
|
|
sif::info << "LimitsSet::printSet: FPGA10Current: " << this->fpga10current << std::endl;
|
|
|
|
sif::info << "LimitsSet::printSet: MCUCurrent: " << this->mcuCurrent << std::endl;
|
|
|
|
sif::info << "LimitsSet::printSet: CMOS21Current: " << this->cmos21current << std::endl;
|
|
|
|
sif::info << "LimitsSet::printSet: CMOSPixCurrent: " << this->cmosPixCurrent << std::endl;
|
|
|
|
sif::info << "LimitsSet::printSet: CMOS33Current: " << this->cmos33current << std::endl;
|
|
|
|
sif::info << "LimitsSet::printSet: CMOSVResCurrent: " << this->cmosVresCurrent << std::endl;
|
|
|
|
sif::info << "LimitsSet::printSet: CMOSTemperature: " << this->cmosTemperature << std::endl;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested log level parameters
|
|
|
|
*/
|
2022-02-10 18:39:37 +01:00
|
|
|
class LogLevelSet : public StaticLocalDataSet<LOG_LEVEL_SET_ENTRIES> {
|
2022-02-09 19:20:19 +01:00
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 16;
|
|
|
|
|
2022-02-10 18:39:37 +01:00
|
|
|
LogLevelSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, LOG_LEVEL_SET_ID) {}
|
2022-02-09 19:20:19 +01:00
|
|
|
|
2022-02-10 18:39:37 +01:00
|
|
|
LogLevelSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, LOG_LEVEL_SET_ID)) {}
|
2022-02-09 19:20:19 +01:00
|
|
|
|
|
|
|
lp_var_t<uint8_t> loglevel1 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL1, this);
|
|
|
|
lp_var_t<uint8_t> loglevel2 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL2, this);
|
|
|
|
lp_var_t<uint8_t> loglevel3 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL3, this);
|
|
|
|
lp_var_t<uint8_t> loglevel4 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL4, this);
|
|
|
|
lp_var_t<uint8_t> loglevel5 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL5, this);
|
|
|
|
lp_var_t<uint8_t> loglevel6 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL6, this);
|
|
|
|
lp_var_t<uint8_t> loglevel7 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL7, this);
|
|
|
|
lp_var_t<uint8_t> loglevel8 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL8, this);
|
|
|
|
lp_var_t<uint8_t> loglevel9 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL9, this);
|
|
|
|
lp_var_t<uint8_t> loglevel10 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL10, this);
|
|
|
|
lp_var_t<uint8_t> loglevel11 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL11, this);
|
|
|
|
lp_var_t<uint8_t> loglevel12 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL12, this);
|
|
|
|
lp_var_t<uint8_t> loglevel13 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL13, this);
|
|
|
|
lp_var_t<uint8_t> loglevel14 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL14, this);
|
|
|
|
lp_var_t<uint8_t> loglevel15 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL15, this);
|
|
|
|
lp_var_t<uint8_t> loglevel16 = lp_var_t<uint8_t>(sid.objectId, PoolIds::LOGLEVEL16, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
PoolReadGuard rg(this);
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel1: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel2: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel2.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel3: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel3.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel4: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel4.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel5: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel5.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel6: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel7: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel8: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel9: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel10: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel11: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel12: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel13: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel14: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel15: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
sif::info << "LogLevelSet::printSet: loglevel16: "
|
|
|
|
<< static_cast<unsigned int>(this->loglevel1.value) << std::endl;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested mounting parameters
|
|
|
|
*/
|
|
|
|
class MountingSet : public StaticLocalDataSet<MOUNTING_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 16;
|
|
|
|
|
|
|
|
MountingSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, MOUNTING_SET_ID) {}
|
|
|
|
|
|
|
|
MountingSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, MOUNTING_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<float> qw = lp_var_t<float>(sid.objectId, PoolIds::MOUNTING_QW, this);
|
|
|
|
lp_var_t<float> qx = lp_var_t<float>(sid.objectId, PoolIds::MOUNTING_QX, this);
|
|
|
|
lp_var_t<float> qy = lp_var_t<float>(sid.objectId, PoolIds::MOUNTING_QY, this);
|
|
|
|
lp_var_t<float> qz = lp_var_t<float>(sid.objectId, PoolIds::MOUNTING_QZ, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
sif::info << "MountingSet::printSet: qw: " << this->qw << std::endl;
|
|
|
|
sif::info << "MountingSet::printSet: qx: " << this->qx << std::endl;
|
|
|
|
sif::info << "MountingSet::printSet: qy: " << this->qy << std::endl;
|
|
|
|
sif::info << "MountingSet::printSet: qz: " << this->qz << std::endl;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested image processor parameters
|
|
|
|
*/
|
|
|
|
class ImageProcessorSet : public StaticLocalDataSet<IMAGE_PROCESSOR_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 7;
|
|
|
|
|
|
|
|
ImageProcessorSet(HasLocalDataPoolIF* owner)
|
|
|
|
: StaticLocalDataSet(owner, IMAGE_PROCESSOR_SET_ID) {}
|
|
|
|
|
|
|
|
ImageProcessorSet(object_id_t objectId)
|
|
|
|
: StaticLocalDataSet(sid_t(objectId, IMAGE_PROCESSOR_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> mode = lp_var_t<uint8_t>(sid.objectId, PoolIds::IMAGE_PROCESSOR_MODE, this);
|
|
|
|
lp_var_t<uint8_t> store = lp_var_t<uint8_t>(sid.objectId, PoolIds::IMAGE_PROCESSOR_STORE, this);
|
|
|
|
lp_var_t<uint16_t> signalThreshold =
|
|
|
|
lp_var_t<uint16_t>(sid.objectId, PoolIds::IMAGE_PROCESSOR_SIGNALTHRESHOLD, this);
|
|
|
|
lp_var_t<uint16_t> darkThreshold =
|
|
|
|
lp_var_t<uint16_t>(sid.objectId, PoolIds::IMAGE_PROCESSOR_DARKTHRESHOLD, this);
|
|
|
|
lp_var_t<uint8_t> backgroundCompensation =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::IMAGE_PROCESSOR_BACKGROUNDCOMPENSATION, this);
|
|
|
|
|
|
|
|
void printSet() {
|
2022-02-10 18:39:37 +01:00
|
|
|
sif::info << "ImageProcessorSet::printSet: mode: "
|
|
|
|
<< static_cast<unsigned int>(this->mode.value) << std::endl;
|
|
|
|
sif::info << "ImageProcessorSet::printSet: store: "
|
|
|
|
<< static_cast<unsigned int>(this->store.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "ImageProcessorSet::printSet: signal threshold: " << this->signalThreshold
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "ImageProcessorSet::printSet: dark threshold: " << this->darkThreshold
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "ImageProcessorSet::printSet: background compensation: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->backgroundCompensation.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested centroiding parameters
|
|
|
|
*/
|
|
|
|
class CentroidingSet : public StaticLocalDataSet<CENTROIDING_PARAMS_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 49;
|
|
|
|
|
|
|
|
CentroidingSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, CENTROIDING_SET_ID) {}
|
|
|
|
|
|
|
|
CentroidingSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, CENTROIDING_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> enableFilter =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::CENTROIDING_ENABLE_FILTER, this);
|
|
|
|
lp_var_t<float> maxQuality =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_MAX_QUALITY, this);
|
|
|
|
lp_var_t<float> darkThreshold =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_DARK_THRESHOLD, this);
|
|
|
|
lp_var_t<float> minQuality =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_MIN_QUALITY, this);
|
|
|
|
lp_var_t<float> maxIntensity =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_MAX_INTENSITY, this);
|
|
|
|
lp_var_t<float> minIntensity =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_MIN_INTENSITY, this);
|
|
|
|
lp_var_t<float> maxMagnitude =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_MAX_MAGNITUDE, this);
|
|
|
|
lp_var_t<float> gaussianCmax =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_GAUSSIAN_CMAX, this);
|
|
|
|
lp_var_t<float> gaussianCmin =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_GAUSSIAN_CMIN, this);
|
|
|
|
lp_var_t<float> transmatrix00 =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_TRANSMATRIX00, this);
|
|
|
|
lp_var_t<float> transmatrix01 =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_TRANSMATRIX01, this);
|
|
|
|
lp_var_t<float> transmatrix10 =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_TRANSMATRIX10, this);
|
|
|
|
lp_var_t<float> transmatrix11 =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::CENTROIDING_TRANSMATRIX11, this);
|
|
|
|
|
|
|
|
void printSet() {
|
2022-02-10 18:39:37 +01:00
|
|
|
sif::info << "CentroidingSet::printSet: enable filter: "
|
|
|
|
<< static_cast<unsigned int>(this->enableFilter.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "CentroidingSet::printSet: max quality: " << this->maxQuality << std::endl;
|
|
|
|
sif::info << "CentroidingSet::printSet: dark threshold: " << this->darkThreshold << std::endl;
|
|
|
|
sif::info << "CentroidingSet::printSet: min quality: " << this->minQuality << std::endl;
|
|
|
|
sif::info << "CentroidingSet::printSet: max intensity: " << this->maxIntensity << std::endl;
|
|
|
|
sif::info << "CentroidingSet::printSet: min intensity: " << this->minIntensity << std::endl;
|
|
|
|
sif::info << "CentroidingSet::printSet: max magnitude: " << this->maxMagnitude << std::endl;
|
|
|
|
sif::info << "CentroidingSet::printSet: gaussian cmax: " << this->gaussianCmax << std::endl;
|
|
|
|
sif::info << "CentroidingSet::printSet: gaussian cmin: " << this->gaussianCmin << std::endl;
|
|
|
|
sif::info << "CentroidingSet::printSet: transmatrix 00 : " << this->transmatrix00 << std::endl;
|
|
|
|
sif::info << "CentroidingSet::printSet: transmatrix 01 : " << this->transmatrix01 << std::endl;
|
|
|
|
sif::info << "CentroidingSet::printSet: transmatrix 10 : " << this->transmatrix10 << std::endl;
|
|
|
|
sif::info << "CentroidingSet::printSet: transmatrix 11 : " << this->transmatrix11 << std::endl;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested centroiding parameters
|
|
|
|
*/
|
|
|
|
class LisaSet : public StaticLocalDataSet<LISA_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 50;
|
|
|
|
|
|
|
|
LisaSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, LISA_SET_ID) {}
|
|
|
|
|
|
|
|
LisaSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, LISA_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint32_t> mode = lp_var_t<uint32_t>(sid.objectId, PoolIds::LISA_MODE, this);
|
|
|
|
lp_var_t<float> prefilterDistThreshold =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LISA_PREFILTER_DIST_THRESHOLD, this);
|
|
|
|
lp_var_t<float> prefilterAngleThreshold =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LISA_PREFILTER_ANGLE_THRESHOLD, this);
|
|
|
|
lp_var_t<float> fovWidth = lp_var_t<float>(sid.objectId, PoolIds::LISA_FOV_WIDTH, this);
|
|
|
|
lp_var_t<float> fovHeight = lp_var_t<float>(sid.objectId, PoolIds::LISA_FOV_HEIGHT, this);
|
|
|
|
lp_var_t<float> floatStarLimit =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LISA_FLOAT_STAR_LIMIT, this);
|
|
|
|
lp_var_t<float> closeStarLimit =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LISA_CLOSE_STAR_LIMIT, this);
|
|
|
|
lp_var_t<float> ratingWeightCloseStarCount =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LISA_RATING_WEIGHT_CLOSE_STAR_COUNT, this);
|
|
|
|
lp_var_t<float> ratingWeightFractionClose =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LISA_RATING_WEIGHT_FRACTION_CLOSE, this);
|
|
|
|
lp_var_t<float> ratingWeightMeanSum =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LISA_RATING_WEIGHT_MEAN_SUM, this);
|
|
|
|
lp_var_t<float> ratingWeightDbStarCount =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LISA_RATING_WEIGHT_DB_STAR_COUNT, this);
|
|
|
|
lp_var_t<uint8_t> maxCombinations =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::LISA_MAX_COMBINATIONS, this);
|
|
|
|
lp_var_t<uint8_t> nrStarsStop =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::LISA_NR_STARS_STOP, this);
|
|
|
|
lp_var_t<float> fractionCloseStop =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::LISA_FRACTION_CLOSE_STOP, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
sif::info << "LisaSet::printSet: mode: " << this->mode << std::endl;
|
|
|
|
sif::info << "LisaSet::printSet: prefilter dist threshold: " << this->prefilterDistThreshold
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "LisaSet::printSet: prefilter angle threshold: " << this->prefilterAngleThreshold
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "LisaSet::printSet: fov width: " << this->fovWidth << std::endl;
|
|
|
|
sif::info << "LisaSet::printSet: fov height: " << this->fovHeight << std::endl;
|
|
|
|
sif::info << "LisaSet::printSet: float star limit: " << this->floatStarLimit << std::endl;
|
|
|
|
sif::info << "LisaSet::printSet: close star limit: " << this->closeStarLimit << std::endl;
|
|
|
|
sif::info << "LisaSet::printSet: rating weight close star count: "
|
|
|
|
<< this->ratingWeightCloseStarCount << std::endl;
|
|
|
|
sif::info << "LisaSet::printSet: rating weight fraction close: "
|
|
|
|
<< this->ratingWeightFractionClose << std::endl;
|
|
|
|
sif::info << "LisaSet::printSet: rating weight mean sum: " << this->ratingWeightMeanSum
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "LisaSet::printSet: rating weight db star count: " << this->ratingWeightDbStarCount
|
|
|
|
<< std::endl;
|
2022-02-10 18:39:37 +01:00
|
|
|
sif::info << "LisaSet::printSet: max combinations: "
|
|
|
|
<< static_cast<unsigned int>(this->maxCombinations.value) << std::endl;
|
|
|
|
sif::info << "LisaSet::printSet: nr stars stop: "
|
|
|
|
<< static_cast<unsigned int>(this->nrStarsStop.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "LisaSet::printSet: fraction close stop: " << this->fractionCloseStop << std::endl;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested matching parameters
|
|
|
|
*/
|
|
|
|
class MatchingSet : public StaticLocalDataSet<MATCHING_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 8;
|
|
|
|
|
|
|
|
MatchingSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, MATCHING_SET_ID) {}
|
|
|
|
|
|
|
|
MatchingSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, MATCHING_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<float> squaredDistanceLimit = lp_var_t<float>(sid.objectId, PoolIds::MATCHING_SQUARED_DISTANCE_LIMIT, this);
|
|
|
|
lp_var_t<float> squaredShiftLimit = lp_var_t<float>(sid.objectId, PoolIds::MATCHING_SQUARED_SHIFT_LIMIT, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
sif::info << "MatchingSet::printSet: squared distance limit: " << this->squaredDistanceLimit
|
|
|
|
<< std::endl;
|
|
|
|
sif::info << "MatchingSet::printSet: squared distance limit: " << this->squaredShiftLimit
|
|
|
|
<< std::endl;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested tracking parameters
|
|
|
|
*/
|
|
|
|
class TrackingSet : public StaticLocalDataSet<TRACKING_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
2022-02-10 18:39:37 +01:00
|
|
|
static const size_t SIZE = 13;
|
2022-02-09 19:20:19 +01:00
|
|
|
|
|
|
|
TrackingSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, TRACKING_SET_ID) {}
|
|
|
|
|
|
|
|
TrackingSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, TRACKING_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<float> thinLimit = lp_var_t<float>(sid.objectId, PoolIds::TRACKING_THIN_LIMIT, this);
|
|
|
|
lp_var_t<float> outlierThreshold = lp_var_t<float>(sid.objectId, PoolIds::TRACKING_OUTLIER_THRESHOLD, this);
|
|
|
|
lp_var_t<float> outlierThresholdQuest = lp_var_t<float>(sid.objectId, PoolIds::TRACKING_OUTLIER_THRESHOLD_QUEST, this);
|
2022-02-10 18:39:37 +01:00
|
|
|
lp_var_t<uint8_t> trackerChoice = lp_var_t<uint8_t>(sid.objectId, PoolIds::TRACKING_TRACKER_CHOICE, this);
|
2022-02-09 19:20:19 +01:00
|
|
|
|
|
|
|
void printSet() {
|
2022-02-10 18:39:37 +01:00
|
|
|
sif::info << "TrackingSet::printSet: thin limit: " << this->thinLimit << std::endl;
|
|
|
|
sif::info << "TrackingSet::printSet: outlier threshold: " << this->outlierThreshold
|
2022-02-09 19:20:19 +01:00
|
|
|
<< std::endl;
|
2022-02-10 18:39:37 +01:00
|
|
|
sif::info << "TrackingSet::printSet: outlier threshold quest: " << this->outlierThresholdQuest
|
2022-02-09 19:20:19 +01:00
|
|
|
<< std::endl;
|
2022-02-10 18:39:37 +01:00
|
|
|
sif::info << "TrackingSet::printSet: tracker choice: "
|
|
|
|
<< static_cast<unsigned int>(this->trackerChoice.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested validation parameters
|
|
|
|
*/
|
|
|
|
class ValidationSet : public StaticLocalDataSet<VALIDATION_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 10;
|
|
|
|
|
|
|
|
ValidationSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, VALIDATION_SET_ID) {}
|
|
|
|
|
|
|
|
ValidationSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, VALIDATION_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> stableCount =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::VALIDATION_STABLE_COUNT, this);
|
|
|
|
lp_var_t<float> maxDifference =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::VALIDATION_MAX_DIFFERENCE, this);
|
|
|
|
lp_var_t<float> minTrackerConfidence =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::VALIDATION_MIN_TRACKER_CONFIDENCE, this);
|
|
|
|
lp_var_t<uint8_t> minMatchedStars =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::VALIDATION_MIN_MATCHED_STARS, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
sif::info << "ValidationSet::printSet: stable count: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->stableCount.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "ValidationSet::printSet: max difference: " << this->maxDifference << std::endl;
|
|
|
|
sif::info << "ValidationSet::printSet: min tracker confidence: " << this->minTrackerConfidence
|
|
|
|
<< std::endl;
|
2022-02-10 18:39:37 +01:00
|
|
|
sif::info << "ValidationSet::printSet: min matched stars: "
|
|
|
|
<< static_cast<unsigned int>(this->minMatchedStars.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested algo parameters
|
|
|
|
*/
|
|
|
|
class AlgoSet : public StaticLocalDataSet<ALGO_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 11;
|
|
|
|
|
|
|
|
AlgoSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, ALGO_SET_ID) {}
|
|
|
|
|
|
|
|
AlgoSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, ALGO_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> mode =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::ALGO_MODE, this);
|
|
|
|
lp_var_t<float> i2tMinConfidence =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::ALGO_I2T_MIN_CONFIDENCE, this);
|
|
|
|
lp_var_t<uint8_t> i2tMinMatched =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::ALGO_I2T_MIN_MATCHED, this);
|
|
|
|
lp_var_t<float> i2lMinConfidence =
|
|
|
|
lp_var_t<float>(sid.objectId, PoolIds::ALGO_I2L_MIN_CONFIDENCE, this);
|
|
|
|
lp_var_t<uint8_t> i2lMinMatched =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::ALGO_I2L_MIN_MATCHED, this);
|
|
|
|
|
|
|
|
void printSet() {
|
2022-02-10 18:39:37 +01:00
|
|
|
sif::info << "AlgoSet::printSet: mode: " << static_cast<unsigned int>(this->mode.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "AlgoSet::printSet: i2t min confidence: " << this->i2tMinConfidence << std::endl;
|
|
|
|
sif::info << "AlgoSet::printSet: i2t min matched: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->i2tMinMatched.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "AlgoSet::printSet: i2l min confidence: " << this->i2lMinConfidence << std::endl;
|
|
|
|
sif::info << "AlgoSet::printSet: i2l min matched: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->i2lMinMatched.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested subscription parameters
|
|
|
|
*/
|
|
|
|
class SubscriptionSet : public StaticLocalDataSet<SUBSCRIPTION_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 16;
|
|
|
|
|
|
|
|
SubscriptionSet(HasLocalDataPoolIF* owner) : StaticLocalDataSet(owner, SUBSCRIPTION_SET_ID) {}
|
|
|
|
|
|
|
|
SubscriptionSet(object_id_t objectId)
|
|
|
|
: StaticLocalDataSet(sid_t(objectId, SUBSCRIPTION_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> tm1 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM1, this);
|
|
|
|
lp_var_t<uint8_t> tm2 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM2, this);
|
|
|
|
lp_var_t<uint8_t> tm3 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM3, this);
|
|
|
|
lp_var_t<uint8_t> tm4 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM4, this);
|
|
|
|
lp_var_t<uint8_t> tm5 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM5, this);
|
|
|
|
lp_var_t<uint8_t> tm6 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM6, this);
|
|
|
|
lp_var_t<uint8_t> tm7 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM7, this);
|
|
|
|
lp_var_t<uint8_t> tm8 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM8, this);
|
|
|
|
lp_var_t<uint8_t> tm9 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM9, this);
|
|
|
|
lp_var_t<uint8_t> tm10 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM10, this);
|
|
|
|
lp_var_t<uint8_t> tm11 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM11, this);
|
|
|
|
lp_var_t<uint8_t> tm12 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM12, this);
|
|
|
|
lp_var_t<uint8_t> tm13 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM13, this);
|
|
|
|
lp_var_t<uint8_t> tm14 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM14, this);
|
|
|
|
lp_var_t<uint8_t> tm15 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM15, this);
|
|
|
|
lp_var_t<uint8_t> tm16 = lp_var_t<uint8_t>(sid.objectId, PoolIds::SUBSCRIPTION_TM16, this);
|
|
|
|
|
|
|
|
void printSet() {
|
2022-02-10 18:39:37 +01:00
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 1: "
|
|
|
|
<< static_cast<unsigned int>(this->tm1.value) << std::endl;
|
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 2: "
|
|
|
|
<< static_cast<unsigned int>(this->tm2.value) << std::endl;
|
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 3: "
|
|
|
|
<< static_cast<unsigned int>(this->tm3.value) << std::endl;
|
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 4: "
|
|
|
|
<< static_cast<unsigned int>(this->tm4.value) << std::endl;
|
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 5: "
|
|
|
|
<< static_cast<unsigned int>(this->tm5.value) << std::endl;
|
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 6: "
|
|
|
|
<< static_cast<unsigned int>(this->tm6.value) << std::endl;
|
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 7: "
|
|
|
|
<< static_cast<unsigned int>(this->tm7.value) << std::endl;
|
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 8: "
|
|
|
|
<< static_cast<unsigned int>(this->tm8.value) << std::endl;
|
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 9: "
|
|
|
|
<< static_cast<unsigned int>(this->tm9.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 10: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->tm10.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 11: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->tm11.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 12: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->tm12.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 13: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->tm13.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 14: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->tm14.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 15: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->tm15.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "SubscriptionSet::printSet: telemetry 16: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->tm16.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested log subscription parameters
|
|
|
|
*/
|
|
|
|
class LogSubscriptionSet : public StaticLocalDataSet<LOG_SUBSCRIPTION_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 4;
|
|
|
|
|
|
|
|
LogSubscriptionSet(HasLocalDataPoolIF* owner)
|
|
|
|
: StaticLocalDataSet(owner, LOG_SUBSCRIPTION_SET_ID) {}
|
|
|
|
|
|
|
|
LogSubscriptionSet(object_id_t objectId)
|
|
|
|
: StaticLocalDataSet(sid_t(objectId, LOG_SUBSCRIPTION_SET_ID)) {}
|
|
|
|
|
|
|
|
lp_var_t<uint8_t> level1 =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::LOG_SUBSCRIPTION_LEVEL1, this);
|
|
|
|
lp_var_t<uint8_t> module1 =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::LOG_SUBSCRIPTION_MODULE1, this);
|
|
|
|
lp_var_t<uint8_t> level2 =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::LOG_SUBSCRIPTION_LEVEL2, this);
|
|
|
|
lp_var_t<uint8_t> module2 =
|
|
|
|
lp_var_t<uint8_t>(sid.objectId, PoolIds::LOG_SUBSCRIPTION_MODULE2, this);
|
|
|
|
|
|
|
|
void printSet() {
|
|
|
|
sif::info << "LogSubscriptionSet::printSet: level 1: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->level1.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "LogSubscriptionSet::printSet: module 1: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->module1.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "LogSubscriptionSet::printSet: level 2: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->level2.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
sif::info << "LogSubscriptionSet::printSet: module 2: "
|
2022-02-10 18:39:37 +01:00
|
|
|
<< static_cast<unsigned int>(this->module2.value) << std::endl;
|
2022-02-09 19:20:19 +01:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @brief Will store the requested debug camera parameters
|
|
|
|
*/
|
|
|
|
class DebugCameraSet : public StaticLocalDataSet<DEBUG_CAMERA_SET_ENTRIES> {
|
|
|
|
public:
|
|
|
|
// Size of dataset
|
|
|
|
static const size_t SIZE = 8;
|
|
|
|
|
|
|
|
DebugCameraSet(HasLocalDataPoolIF* owner)
|
|
|
|
: StaticLocalDataSet(owner, DEBUG_CAMERA_SET_ID) {}
|
|
|
|
|
|
|
|
lp_var_t<uint32_t> timing =
|
|
|
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::DEBUG_CAMERA_TIMING, this);
|
|
|
|
lp_var_t<uint32_t> test =
|
|
|
|
lp_var_t<uint32_t>(sid.objectId, PoolIds::DEBUG_CAMERA_TEST, this);
|
|
|
|
|
|
|
|
DebugCameraSet(object_id_t objectId)
|
|
|
|
: StaticLocalDataSet(sid_t(objectId, DEBUG_CAMERA_SET_ID)) {}
|
|
|
|
|
|
|
|
void printSet() {
|
2022-02-10 18:39:37 +01:00
|
|
|
sif::info << "DebugCameraSet::printSet: timing: " << this->timing << std::endl;
|
|
|
|
sif::info << "DebugCameraSet::printSet: test: " << this->test << std::endl;
|
2022-01-19 11:52:06 +01:00
|
|
|
}
|
2022-01-17 15:28:53 +01:00
|
|
|
};
|
2022-01-17 15:58:27 +01:00
|
|
|
} // namespace StarTracker
|
2022-02-05 13:19:20 +01:00
|
|
|
#endif /* LINUX_DEVICES_DEVICEDEFINITIONS_DEFINITIONS_H_ */
|