summaryrefslogtreecommitdiff
path: root/src/opticaldesign.h
diff options
context:
space:
mode:
authorNikita Kostovsky <nikita@kostovsky.me>2026-01-06 15:09:48 +0100
committerNikita Kostovsky <nikita@kostovsky.me>2026-01-06 15:09:48 +0100
commitbd0117f22285a4b360d2faa7da000c6445220280 (patch)
tree95392166353070358cc328c883782a9aba07a7ac /src/opticaldesign.h
parentb724e714d24b7623718016af921e1d9aab8d02ea (diff)
add top view for laser/range; add groups
Diffstat (limited to 'src/opticaldesign.h')
-rw-r--r--src/opticaldesign.h49
1 files changed, 45 insertions, 4 deletions
diff --git a/src/opticaldesign.h b/src/opticaldesign.h
index 5a7ebac..c1ff634 100644
--- a/src/opticaldesign.h
+++ b/src/opticaldesign.h
@@ -16,6 +16,7 @@ enum class LenseAperture
F1_2 = 12,
F1_4 = 14,
F2_0 = 20,
+ F2_5 = 25,
F2_8 = 28,
F4_0 = 40,
F5_6 = 56,
@@ -34,20 +35,32 @@ enum class LenseAperture
Q_ENUM_NS(LenseAperture)
} // namespace orphex
-// Q_DECLARE_METATYPE(orphex::LenseAperture)
-
class OpticalDesign : public goodies::G_Object
{
Q_OBJECT
- DEFAULT_CONSTRUCTOR(goodies::G_Object, OpticalDesign)
DEFAULT_DESTRUCTOR(OpticalDesign);
G_OBJECT(goodies::G_Object, OpticalDesign)
+protected:
+ Q_PROPERTY(
+ QString actualZBaseText READ actualZBaseText NOTIFY
+ actualZBaseTextChanged FINAL
+ )
+
+public:
+ explicit OpticalDesign(QObject* parent = nullptr);
+
public:
void calculate() const;
-protected:
+public:
+ /*!
+ * \brief fullBodyOffset - negative offset of body border from lense center
+ */
+ // double fullBodyOffset() const;
+
+private:
INI_PROPERTY(double, opticalAxisAngleDegrees, 45.);
// the Y axis is directed from the laser to the lens
INI_PROPERTY(double, lenseYPosMm, 50.);
@@ -60,23 +73,51 @@ protected:
lenseAperture,
orphex::LenseAperture::F1_2
);
+
+ INI_PROPERTY(double, lenseBodyMaxDiameterMm, 14.);
+ INI_PROPERTY(double, lenseBodyLengthMm, 17.);
+
// default values for IMX287 sensor
INI_PROPERTY(double, sensorWidthMm, 4.98);
INI_PROPERTY(double, sensorHeightMm, 3.74);
+
INI_PROPERTY(double, sensorCellWidthUm, 6.9);
INI_PROPERTY(double, sensorCellHeightUm, 6.9);
+
// sensor vertical offset along the image plane
INI_PROPERTY(double, sensorVerticalOffsetMm, 0.);
+
INI_PROPERTY(uint16_t, sensorPixelsHeight, 720);
INI_PROPERTY(uint16_t, sensorPixelsWidth, 544);
+
INI_PROPERTY(double, zBaseMm, 90);
INI_PROPERTY(double, zRangeMm, 250);
+ INI_PROPERTY(double, laserBodyDiameterMm, 14.);
+ INI_PROPERTY(double, laserBodyLengthMm, 45.);
+ INI_PROPERTY(double, laserAngleDegrees, 45.);
+ INI_PROPERTY(double, laserZOffsetMm, 0.);
+
+ INI_PROPERTY(double, scannerBodyWallThicknessMm, 3.);
+
+ INI_PROPERTY(double, scannerBodyFrontWallOffsetMm, -20.);
+
G_PROPERTY_DEFAULT(double, sensorLenseAngleDegrees, 0.);
+ G_PROPERTY_DEFAULT(double, vFoVDegrees, 0.);
+ // takes scanner body into account
G_PROPERTY_DEFAULT(double, actualZBaseMm, 0.);
G_PROPERTY_DEFAULT(double, actualZRangeMm, 0.);
G_PROPERTY_DEFAULT(double, lenseSensorDistanceMm, 0.);
G_PROPERTY_DEFAULT(double, frontSharpDistanceMm, 0.);
G_PROPERTY_DEFAULT(double, backSharpDistanceMm, 0.);
G_PROPERTY_DEFAULT(double, depthOfFieldMm, 0.);
+
+ // manual properties
+signals:
+ void actualZBaseTextChanged(QString value);
+
+public:
+ QString actualZBaseText() const;
};
+
+Q_DECLARE_METATYPE(orphex::LenseAperture)