#ifndef MISSION_STARTRACKER_DEFINITIONS_H_ #define MISSION_STARTRACKER_DEFINITIONS_H_ #include #include #include #include #include "objects/systemObjectList.h" #include namespace StarTracker { /** This is the address of the star tracker */ static const uint8_t ADDRESS = 33; static const uint8_t STATUS_OK = 0; 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, 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, BLOBPIX_REGION }; static const DeviceCommandId_t PING_REQUEST = 0; // Boots image (works only in bootloader mode) static const DeviceCommandId_t BOOT = 1; static const DeviceCommandId_t REQ_VERSION = 2; static const DeviceCommandId_t REQ_INTERFACE = 3; static const DeviceCommandId_t REQ_TIME = 4; static const DeviceCommandId_t ERASE = 5; static const DeviceCommandId_t UNLOCK = 6; static const DeviceCommandId_t SWITCH_TO_BOOTLOADER_PROGRAM = 7; static const DeviceCommandId_t DOWNLOAD_IMAGE = 9; static const DeviceCommandId_t UPLOAD_IMAGE = 10; static const DeviceCommandId_t REQ_POWER = 11; static const DeviceCommandId_t TAKE_IMAGE = 15; static const DeviceCommandId_t DOWNLOAD_CENTROID = 16; static const DeviceCommandId_t UPLOAD_CENTROID = 17; static const DeviceCommandId_t SUBSCRIBE_TO_TM = 18; static const DeviceCommandId_t REQ_SOLUTION = 24; static const DeviceCommandId_t REQ_TEMPERATURE = 25; static const DeviceCommandId_t REQ_HISTOGRAM = 28; static const DeviceCommandId_t REQ_CONTRAST = 29; static const DeviceCommandId_t LIMITS = 40; static const DeviceCommandId_t MOUNTING = 41; static const DeviceCommandId_t CAMERA = 42; static const DeviceCommandId_t BLOB = 43; static const DeviceCommandId_t CENTROIDING = 44; static const DeviceCommandId_t LISA = 45; static const DeviceCommandId_t MATCHING = 46; static const DeviceCommandId_t TRACKING = 47; static const DeviceCommandId_t VALIDATION = 48; static const DeviceCommandId_t ALGO = 49; 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; static const DeviceCommandId_t STOP_IMAGE_LOADER = 55; static const DeviceCommandId_t RESET_ERROR = 56; static const DeviceCommandId_t CHANGE_DOWNLOAD_FILE = 57; static const DeviceCommandId_t SET_JSON_FILE_NAME = 58; static const DeviceCommandId_t SET_READ_FILENAME = 59; 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; static const DeviceCommandId_t CHANGE_FPGA_DOWNLOAD_FILE = 64; static const DeviceCommandId_t UPLOAD_FPGA_IMAGE = 65; static const DeviceCommandId_t FPGA_ACTION = 66; static const DeviceCommandId_t NONE = 0xFFFFFFFF; static const uint32_t VERSION_SET_ID = REQ_VERSION; static const uint32_t INTERFACE_SET_ID = REQ_INTERFACE; static const uint32_t POWER_SET_ID = REQ_POWER; static const uint32_t TEMPERATURE_SET_ID = REQ_TEMPERATURE; static const uint32_t TIME_SET_ID = REQ_TIME; static const uint32_t SOLUTION_SET_ID = REQ_SOLUTION; static const uint32_t HISTOGRAM_SET_ID = REQ_HISTOGRAM; static const uint32_t CONTRAST_SET_ID = REQ_CONTRAST; static const uint32_t CHECKSUM_SET_ID = CHECKSUM; 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; /** Max size of unencoded frame */ static const size_t MAX_FRAME_SIZE = 1200; static const uint8_t TEMPERATURE_SET_ENTRIES = 4; static const uint8_t VERSION_SET_ENTRIES = 5; static const uint8_t INTERFACE_SET_ENTRIES = 4; static const uint8_t POWER_SET_ENTRIES = 18; static const uint8_t TIME_SET_ENTRIES = 4; static const uint8_t SOLUTION_SET_ENTRIES = 23; static const uint8_t HISTOGRAM_SET_ENTRIES = 38; static const uint8_t CONTRAST_SET_ENTRIES = 38; static const uint8_t CHECKSUM_SET_ENTRIES = 1; 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; // Action, parameter and telemetry IDs namespace ID { 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; static const uint8_t CAMERA = 9; static const uint8_t BLOB = 10; 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; static const uint8_t SUBSCRIBE = 18; static const uint8_t SOLUTION = 24; static const uint8_t TEMPERATURE = 25; 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; } namespace Program { static const uint8_t BOOTLOADER = 1; static const uint8_t FIRMWARE = 2; } /** * @brief This dataset can be used to store the temperature of a reaction wheel. */ class TemperatureSet: public StaticLocalDataSet { public: static const size_t SIZE = 20; 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 interanl counter of the star tracker lp_var_t ticks = lp_var_t(sid.objectId, PoolIds::TICKS_TEMPERATURE_SET, this); /** Unix time in microseconds */ lp_var_t time = lp_var_t(sid.objectId, PoolIds::TIME_TEMPERATURE_SET, this); lp_var_t mcuTemperature = lp_var_t(sid.objectId, PoolIds::MCU_TEMPERATURE, this); lp_var_t cmosTemperature = lp_var_t(sid.objectId, PoolIds::CMOS_TEMPERATURE, this); 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; sif::info << "TemperatureSet::printSet: CMOS Temperature: " << this->cmosTemperature << " °C" << std::endl; } }; /** * @brief Package to store version parameters */ class VersionSet: public StaticLocalDataSet { 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)) { } // Ticks is time reference generated by interanl counter of the star tracker lp_var_t ticks = lp_var_t(sid.objectId, PoolIds::TICKS_VERSION_SET, this); /** Unix time in microseconds */ lp_var_t time = lp_var_t(sid.objectId, PoolIds::TIME_VERSION_SET, this); lp_var_t program = lp_var_t(sid.objectId, PoolIds::PROGRAM, this); lp_var_t major = lp_var_t(sid.objectId, PoolIds::MAJOR, this); lp_var_t minor = lp_var_t(sid.objectId, PoolIds::MINOR, this); void printSet() { PoolReadGuard rg(this); sif::info << "VersionSet::printSet: Ticks: " << this->ticks << std::endl; sif::info << "VersionSet::printSet: Unix Time: " << this->time << " us" << std::endl; sif::info << "VersionSet::printSet: Program: " << static_cast(this->program.value) << std::endl; sif::info << "VersionSet::printSet: Major: " << static_cast(this->major.value) << std::endl; sif::info << "VersionSet::printSet: Minor: " << static_cast(this->minor.value) << std::endl; } }; /** * @brief Dataset to store the interface telemtry data. */ class InterfaceSet: public StaticLocalDataSet { 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 ticks = lp_var_t(sid.objectId, PoolIds::TICKS_INTERFACE_SET, this); /** Unix time in microseconds */ lp_var_t time = lp_var_t(sid.objectId, PoolIds::TIME_INTERFACE_SET, this); lp_var_t frameCount = lp_var_t(sid.objectId, PoolIds::FRAME_COUNT, this); lp_var_t checksumerrorCount = lp_var_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; } }; /** * @brief Dataset to store the data of the power telemetry reply. */ class PowerSet: public StaticLocalDataSet { 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 ticks = lp_var_t(sid.objectId, PoolIds::TICKS_POWER_SET, this); /** Unix time in microseconds */ lp_var_t time = lp_var_t(sid.objectId, PoolIds::TIME_POWER_SET, this); lp_var_t mcuCurrent = lp_var_t(sid.objectId, PoolIds::MCU_CURRENT, this); lp_var_t mcuVoltage = lp_var_t(sid.objectId, PoolIds::MCU_VOLTAGE, this); lp_var_t fpgaCoreCurrent = lp_var_t(sid.objectId, PoolIds::FPGA_CORE_CURRENT, this); lp_var_t fpgaCoreVoltage = lp_var_t(sid.objectId, PoolIds::FPGA_CORE_VOLTAGE, this); lp_var_t fpga18Current = lp_var_t(sid.objectId, PoolIds::FPGA_18_CURRENT, this); lp_var_t fpga18Voltage = lp_var_t(sid.objectId, PoolIds::FPGA_18_VOLTAGE, this); lp_var_t fpga25Current = lp_var_t(sid.objectId, PoolIds::FPGA_25_CURRENT, this); lp_var_t fpga25Voltage = lp_var_t(sid.objectId, PoolIds::FPGA_25_VOLTAGE, this); lp_var_t cmv21Current = lp_var_t(sid.objectId, PoolIds::CMV_21_CURRENT, this); lp_var_t cmv21Voltage = lp_var_t(sid.objectId, PoolIds::CMV_21_VOLTAGE, this); lp_var_t cmvPixCurrent = lp_var_t(sid.objectId, PoolIds::CMV_PIX_CURRENT, this); lp_var_t cmvPixVoltage = lp_var_t(sid.objectId, PoolIds::CMV_PIX_VOLTAGE, this); lp_var_t cmv33Current = lp_var_t(sid.objectId, PoolIds::CMV_33_CURRENT, this); lp_var_t cmv33Voltage = lp_var_t(sid.objectId, PoolIds::CMV_33_VOLTAGE, this); lp_var_t cmvResCurrent = lp_var_t(sid.objectId, PoolIds::CMV_RES_CURRENT, this); lp_var_t cmvResVoltage = lp_var_t(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; } }; /** * @brief Data set to store the time telemetry packet. */ class TimeSet: public StaticLocalDataSet { 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 ticks = lp_var_t(sid.objectId, PoolIds::TICKS_TIME_SET, this); /** Unix time in microseconds */ lp_var_t time = lp_var_t(sid.objectId, PoolIds::TIME_TIME_SET, this); // Number of milliseconds since processor start-up lp_var_t runTime = lp_var_t(sid.objectId, PoolIds::RUN_TIME, this); // Unix time in seconds?? --> maybe typo in datasheet. Seems to be microseconds lp_var_t unixTime = lp_var_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; } }; /** * @brief The solution dataset is the main dataset of the star tracker and contains the * attitude information. */ class SolutionSet: public StaticLocalDataSet { 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 ticks = lp_var_t(sid.objectId, PoolIds::TICKS_SOLUTION_SET, this); /// Unix time stamp lp_var_t time = lp_var_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 caliQw = lp_var_t(sid.objectId, PoolIds::CALI_QW, this); lp_var_t caliQx = lp_var_t(sid.objectId, PoolIds::CALI_QX, this); lp_var_t caliQy = lp_var_t(sid.objectId, PoolIds::CALI_QY, this); lp_var_t caliQz = lp_var_t(sid.objectId, PoolIds::CALI_QZ, this); // The lower this value the more confidence that the star tracker solution is correct lp_var_t trackConfidence = lp_var_t(sid.objectId, PoolIds::TRACK_CONFIDENCE, this); // Estimated attitude of spacecraft lp_var_t trackQw = lp_var_t(sid.objectId, PoolIds::TRACK_QW, this); lp_var_t trackQx = lp_var_t(sid.objectId, PoolIds::TRACK_QX, this); lp_var_t trackQy = lp_var_t(sid.objectId, PoolIds::TRACK_QY, this); lp_var_t trackQz = lp_var_t(sid.objectId, PoolIds::TRACK_QZ, this); // Number of stars removed from tracking solution lp_var_t trackRemoved = lp_var_t(sid.objectId, PoolIds::TRACK_REMOVED, this); // Number of stars for which a valid centroid was found lp_var_t starsCentroided = lp_var_t(sid.objectId, PoolIds::STARS_CENTROIDED, this); // Number of stars that matched to a database star lp_var_t starsMatchedDatabase = lp_var_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 lisaQw = lp_var_t(sid.objectId, PoolIds::LISA_QW, this); lp_var_t lisaQx = lp_var_t(sid.objectId, PoolIds::LISA_QX, this); lp_var_t lisaQy = lp_var_t(sid.objectId, PoolIds::LISA_QY, this); lp_var_t lisaQz = lp_var_t(sid.objectId, PoolIds::LISA_QZ, this); // Percentage of close stars in LISA solution lp_var_t lisaPercentageClose = lp_var_t(sid.objectId, PoolIds::LISA_PERC_CLOSE, this); // Number of close stars in LISA solution lp_var_t lisaNrClose = lp_var_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 isTrustWorthy = lp_var_t(sid.objectId, PoolIds::TRUST_WORTHY, this); // Number of times the validation criteria was met lp_var_t stableCount = lp_var_t(sid.objectId, PoolIds::STABLE_COUNT, this); // Shows the autonomous mode used to obtain the star tracker attitude lp_var_t solutionStrategy = lp_var_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(this->trackRemoved.value) << std::endl; sif::info << "SolutionSet::printSet: Number of stars centroided: " << static_cast(this->starsCentroided.value) << std::endl; sif::info << "SolutionSet::printSet: Number of stars matched database: " << static_cast(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(this->lisaNrClose.value) << std::endl; sif::info << "SolutionSet::printSet: Is trust worthy: " << static_cast(this->isTrustWorthy.value) << std::endl; sif::info << "SolutionSet::printSet: Stable count: " << this->stableCount << std::endl; sif::info << "SolutionSet::printSet: Solution strategy: " << static_cast(this->solutionStrategy.value) << std::endl; } }; /** * @brief Dataset to store the histogram */ class HistogramSet: public StaticLocalDataSet { 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 ticks = lp_var_t(sid.objectId, PoolIds::TICKS_HISTOGRAM_SET, this); lp_var_t time = lp_var_t(sid.objectId, PoolIds::TIME_HISTOGRAM_SET, this); lp_var_t binA0 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINA0, this); lp_var_t binA1 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINA1, this); lp_var_t binA2 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINA2, this); lp_var_t binA3 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINA3, this); lp_var_t binA4 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINA4, this); lp_var_t binA5 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINA5, this); lp_var_t binA6 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINA6, this); lp_var_t binA7 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINA7, this); lp_var_t binA8 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINA8, this); lp_var_t binB0 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINB0, this); lp_var_t binB1 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINB1, this); lp_var_t binB2 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINB2, this); lp_var_t binB3 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINB3, this); lp_var_t binB4 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINB4, this); lp_var_t binB5 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINB5, this); lp_var_t binB6 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINB6, this); lp_var_t binB7 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINB7, this); lp_var_t binB8 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINB8, this); lp_var_t binC0 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINC0, this); lp_var_t binC1 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINC1, this); lp_var_t binC2 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINC2, this); lp_var_t binC3 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINC3, this); lp_var_t binC4 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINC4, this); lp_var_t binC5 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINC5, this); lp_var_t binC6 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINC6, this); lp_var_t binC7 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINC7, this); lp_var_t binC8 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BINC8, this); lp_var_t binD0 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BIND0, this); lp_var_t binD1 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BIND1, this); lp_var_t binD2 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BIND2, this); lp_var_t binD3 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BIND3, this); lp_var_t binD4 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BIND4, this); lp_var_t binD5 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BIND5, this); lp_var_t binD6 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BIND6, this); lp_var_t binD7 = lp_var_t(sid.objectId, PoolIds::HISTOGRAM_BIND7, this); lp_var_t binD8 = lp_var_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; } }; /** * @brief Dataset to store the contrast telemetry data */ class ContrastSet: public StaticLocalDataSet { 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 ticks = lp_var_t(sid.objectId, PoolIds::TICKS_CONTRAST_SET, this); lp_var_t time = lp_var_t(sid.objectId, PoolIds::TIME_CONTRAST_SET, this); lp_var_t binA0 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA0, this); lp_var_t binA1 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA1, this); lp_var_t binA2 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA2, this); lp_var_t binA3 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA3, this); lp_var_t binA4 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA4, this); lp_var_t binA5 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA5, this); lp_var_t binA6 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA6, this); lp_var_t binA7 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA7, this); lp_var_t binA8 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINA8, this); lp_var_t binb0 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB0, this); lp_var_t binB1 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB1, this); lp_var_t binB2 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB2, this); lp_var_t binB3 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB3, this); lp_var_t binB4 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB4, this); lp_var_t binB5 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB5, this); lp_var_t binB6 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB6, this); lp_var_t binB7 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB7, this); lp_var_t binB8 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINB8, this); lp_var_t binC0 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC0, this); lp_var_t binC1 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC1, this); lp_var_t binC2 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC2, this); lp_var_t binC3 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC3, this); lp_var_t binC4 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC4, this); lp_var_t binC5 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC5, this); lp_var_t binC6 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC6, this); lp_var_t binC7 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC7, this); lp_var_t binC8 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BINC8, this); lp_var_t binD0 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND0, this); lp_var_t binD1 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND1, this); lp_var_t binD2 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND2, this); lp_var_t binD3 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND3, this); lp_var_t binD4 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND4, this); lp_var_t binD5 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND5, this); lp_var_t binD6 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND6, this); lp_var_t binD7 = lp_var_t(sid.objectId, PoolIds::CONTRAST_BIND7, this); lp_var_t binD8 = lp_var_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; } }; /** * @brief Helper Class to extract information from bytestream. */ class ChecksumReply { 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; } 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; } 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; } } uint8_t getRegion() { return region; } uint32_t getAddress() { return address; } uint32_t getLength() { return length; } uint32_t getChecksum() { return checksum; } void printChecksum() { sif::info << "ChecksumReply::printChecksum: 0x" << std::hex << checksum << std::endl; } private: static const uint8_t ADDRESS_OFFSET = 1; static const uint8_t LENGTH_OFFSET = 5; static const uint8_t CHECKSUM_OFFSET = 9; uint8_t region = 0; uint32_t address = 0; uint32_t length = 0; uint32_t checksum = 0; }; class EraseReply { public: EraseReply(const uint8_t* datafield) { region = *datafield; } uint8_t getRegion() { return region; } private: uint8_t region = 0; }; class ChecksumSet: public StaticLocalDataSet { public: // Size of dataset static const size_t SIZE = 156; ChecksumSet(HasLocalDataPoolIF* owner): StaticLocalDataSet(owner, CHECKSUM_SET_ID) { } ChecksumSet(object_id_t objectId): StaticLocalDataSet(sid_t(objectId, CHECKSUM_SET_ID)) { } lp_var_t checksum = lp_var_t(sid.objectId, PoolIds::CHKSUM, this); }; /** * @brief Dataset to store download centroid response */ class DownloadCentroidSet: public StaticLocalDataSet { public: // Size of dataset static const size_t SIZE = 34; DownloadCentroidSet(HasLocalDataPoolIF* owner): StaticLocalDataSet(owner, DOWNLOADCENTROID_SET_ID) { } DownloadCentroidSet(object_id_t objectId): StaticLocalDataSet(sid_t(objectId, DOWNLOADCENTROID_SET_ID)) { } lp_var_t id = lp_var_t(sid.objectId, PoolIds::DWL_ID, this); lp_var_t pixx = lp_var_t(sid.objectId, PoolIds::DWL_PIXX, this); lp_var_t pixy = lp_var_t(sid.objectId, PoolIds::DWL_PIXY, this); lp_var_t xUncorrected = lp_var_t(sid.objectId, PoolIds::DWL_X_UNCORRECTED, this); lp_var_t yUncorrected = lp_var_t(sid.objectId, PoolIds::DWL_Y_UNCORRECTED, this); lp_var_t xCorrected = lp_var_t(sid.objectId, PoolIds::DWL_X_CORRECTED, this); lp_var_t yCorrected = lp_var_t(sid.objectId, PoolIds::DWL_Y_CORRECTED, this); lp_var_t magnitude = lp_var_t(sid.objectId, PoolIds::DWL_MAGNITUDE, this); lp_var_t cxa = lp_var_t(sid.objectId, PoolIds::DWL_CXA, this); lp_var_t cya = lp_var_t(sid.objectId, PoolIds::DWL_CYA, this); lp_var_t quality = lp_var_t(sid.objectId, PoolIds::DWL_QUALITY, this); void printSet() { PoolReadGuard rg(this); sif::info << "ContrastSet::printSet: id: " << static_cast(this->id.value) << std::endl; sif::info << "ContrastSet::printSet: pixx: " << this->pixx << std::endl; sif::info << "ContrastSet::printSet: pixy: " << this->pixy << std::endl; sif::info << "ContrastSet::printSet: xUncorrected: " << this->xUncorrected << std::endl; sif::info << "ContrastSet::printSet: yUncorrected: " << this->yUncorrected << std::endl; sif::info << "ContrastSet::printSet: xCorrected: " << this->xCorrected << std::endl; sif::info << "ContrastSet::printSet: yCorrected: " << this->yCorrected << std::endl; sif::info << "ContrastSet::printSet: magnitude: " << this->magnitude << std::endl; sif::info << "ContrastSet::printSet: cxa: " << this->cxa << std::endl; sif::info << "ContrastSet::printSet: cya: " << this->cya << std::endl; sif::info << "ContrastSet::printSet: quality: " << this->quality << std::endl; } }; namespace UploadCentroidKeys { 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"; }; /** * @brief Dataset to store matched star information */ class DownloadMatchedStar : public StaticLocalDataSet { 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 id = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_ID, this); lp_var_t camfpx = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMFPX, this); lp_var_t camfpy = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMFPY, this); lp_var_t camcartx = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMCARTX, this); lp_var_t camcarty = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMCARTY, this); lp_var_t camcartz = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMCARTZ, this); lp_var_t cammagnitude = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CAMMAGNITUDE, this); lp_var_t dbfpx = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBFPX, this); lp_var_t dbfpy = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBFPY, this); lp_var_t dbcartx = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBCARTX, this); lp_var_t dbcarty = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBCARTY, this); lp_var_t dbcartz = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBCARTZ, this); lp_var_t dbmagnitude = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_DBMAGNITUDE, this); lp_var_t catalogid = lp_var_t(sid.objectId, PoolIds::MATCHEDSTR_CATALOGID, this); void printSet() { PoolReadGuard rg(this); sif::info << "DownloadMatchedStar::printSet: id: " << static_cast(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; } }; /** * @brief Dataset to store the response to the DownloadDBImage request */ class DownloadDBImage : public StaticLocalDataSet { 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 id = lp_var_t(sid.objectId, PoolIds::DBIMAGE_ID, this); lp_var_t pixx = lp_var_t(sid.objectId, PoolIds::DBIMAGE_PIXX, this); lp_var_t pixy = lp_var_t(sid.objectId, PoolIds::DBIMAGE_PIXY, this); lp_var_t x = lp_var_t(sid.objectId, PoolIds::DBIMAGE_X, this); lp_var_t y = lp_var_t(sid.objectId, PoolIds::DBIMAGE_Y, this); lp_var_t magnitude = lp_var_t(sid.objectId, PoolIds::DBIMAGE_MAGNITUDE, this); void printSet() { PoolReadGuard rg(this); sif::info << "DownloadDBImage::printSet: id: " << static_cast(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; } }; /** * @brief Dataset to store the response to the download blob pixel action request */ class DownloadBlobPixel: public StaticLocalDataSet { 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 id = lp_var_t(sid.objectId, PoolIds::BLOBPIX_ID, this); lp_var_t x = lp_var_t(sid.objectId, PoolIds::BLOBPIX_X, this); lp_var_t y = lp_var_t(sid.objectId, PoolIds::BLOBPIX_Y, this); lp_var_t totalValue = lp_var_t(sid.objectId, PoolIds::BLOBPIX_TOT_VAL, this); lp_var_t inUse = lp_var_t(sid.objectId, PoolIds::BLOBPIX_IN_USE, this); lp_var_t brightNeighbours = lp_var_t(sid.objectId, PoolIds::BLOBPIX_BRIGHT_NEIGHBOURS, this); lp_var_t region = lp_var_t(sid.objectId, PoolIds::BLOBPIX_REGION, this); void printSet() { PoolReadGuard rg(this); sif::info << "DownloadBlobPixel::printSet: id: " << static_cast(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(this->inUse.value) << std::endl; sif::info << "DownloadBlobPixel::printSet: brightNeighbours: " << this->brightNeighbours << std::endl; sif::info << "DownloadBlobPixel::printSet: region: " << this->region << std::endl; } }; } #endif /* MISSION_STARTRACKER_DEFINITIONS_H_ */