refactored star tracker handler

This commit is contained in:
Jakob Meier
2022-02-27 15:46:06 +01:00
parent e61dfc0401
commit dfd817d27b
12 changed files with 87 additions and 3205 deletions

View File

@ -122,83 +122,7 @@ enum PoolIds : lp_id_t {
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,
CAMERA_MODE,
FOCALLENGTH,
EXPOSURE,
@ -346,21 +270,16 @@ 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 SUBSCRIPTION = 18;
static const DeviceCommandId_t IMAGE_PROCESSOR = 19;
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;
@ -372,15 +291,10 @@ static const DeviceCommandId_t VALIDATION = 48;
static const DeviceCommandId_t ALGO = 49;
static const DeviceCommandId_t CHECKSUM = 50;
static const DeviceCommandId_t FLASH_READ = 51;
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 CHANGE_IMAGE_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 SET_FLASH_READ_FILENAME = 59;
static const DeviceCommandId_t REQ_CAMERA = 67;
static const DeviceCommandId_t REQ_LIMITS = 68;
static const DeviceCommandId_t REQ_LOG_LEVEL = 69;
@ -410,12 +324,7 @@ 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;
static const uint32_t CAMERA_SET_ID = REQ_CAMERA;
static const uint32_t LIMITS_SET_ID = REQ_LIMITS;
static const uint32_t LOG_LEVEL_SET_ID = REQ_LOG_LEVEL;
@ -441,12 +350,7 @@ 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;
static const uint8_t CAMERA_SET_ENTRIES = 24;
static const uint8_t LIMITS_SET_ENTRIES = 11;
static const uint8_t LOG_LEVEL_SET_ENTRIES = 16;
@ -491,15 +395,7 @@ 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 LOG_LEVEL = 3;
static const uint8_t LOG_SUBSCRIPTION = 19;
static const uint8_t DEBUG_CAMERA = 20;
@ -929,100 +825,6 @@ class HistogramSet : public StaticLocalDataSet<HISTOGRAM_SET_ENTRIES> {
}
};
/**
* @brief Dataset to store the contrast telemetry data
*/
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;
}
};
/**
* @brief Helper Class to extract information from bytestream.
*/
@ -1083,16 +885,6 @@ class ChecksumReply {
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<CHECKSUM_SET_ENTRIES> {
public:
// Size of dataset
@ -1105,185 +897,6 @@ class ChecksumSet : public StaticLocalDataSet<CHECKSUM_SET_ENTRIES> {
lp_var_t<uint32_t> checksum = lp_var_t<uint32_t>(sid.objectId, PoolIds::CHKSUM, this);
};
/**
* @brief Dataset to store download centroid response
*/
class DownloadCentroidSet : public StaticLocalDataSet<DOWNLOAD_CENTROID_SET_ENTRIES> {
public:
// Size of dataset
static const size_t SIZE = 38;
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);
sif::info << "DownloadCentroidSet::printSet: id: " << static_cast<unsigned int>(this->id.value)
<< std::endl;
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;
}
};
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";
}; // namespace UploadCentroidKeys
/**
* @brief Dataset to store matched star information
*/
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;
}
};
/**
* @brief Dataset to store the response to the DownloadDBImage request
*/
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;
}
};
/**
* @brief Dataset to store the response to the download blob pixel action request
*/
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;
}
};
/**
* @brief Will store the camera parameters set in the star tracker which are retrieved with
* a get parameter request.