summaryrefslogtreecommitdiff
path: root/src/opticaldesign.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opticaldesign.h')
-rw-r--r--src/opticaldesign.h74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/opticaldesign.h b/src/opticaldesign.h
new file mode 100644
index 0000000..e6fb2c6
--- /dev/null
+++ b/src/opticaldesign.h
@@ -0,0 +1,74 @@
+#pragma once
+
+// goodies
+#include <g_object.h>
+#include <g_property.h>
+
+namespace orphex
+{
+Q_NAMESPACE
+// multiplied by 10
+enum class LenseAperture
+{
+ F0_5 = 05,
+ F0_7 = 07,
+ F1_0 = 10,
+ F1_2 = 12,
+ F1_4 = 14,
+ F2_0 = 20,
+ F2_8 = 28,
+ F4_0 = 40,
+ F5_6 = 56,
+ F8_0 = 80,
+ F11_0 = 110,
+ F16_0 = 160,
+ F22_0 = 220,
+ F32_0 = 320,
+ F45_0 = 450,
+ F64_0 = 640,
+ F90_0 = 900,
+ F128_0 = 1280,
+ F180_0 = 1800,
+ F256_0 = 2560
+};
+Q_ENUM_NS(LenseAperture)
+} // namespace orphex
+
+// Q_DECLARE_METATYPE(orphex::LenseAperture)
+
+class OpticalDesign : public G_Object
+{
+ Q_OBJECT
+
+ DEFAULT_CONSTRUCTOR(G_Object, OpticalDesign)
+ DEFAULT_DESTRUCTOR(OpticalDesign);
+ G_OBJECT(G_Object, OpticalDesign)
+
+public:
+ void calculate() const;
+
+protected:
+ INI_PROPERTY(double, opticalAxisAngleDegrees, 45.);
+ // the Y axis is directed from the laser to the lens
+ INI_PROPERTY(double, lenseYPosMm, 50.);
+ INI_PROPERTY(double, focalDistanceMm, 6.);
+ INI_PROPERTY_VAR(
+ orphex::LenseAperture,
+ lenseAperture,
+ orphex::LenseAperture::F1_2
+ );
+ 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);
+
+ G_PROPERTY_DEFAULT(double, sensorLenseAngleDegrees, 0.);
+ G_PROPERTY_DEFAULT(double, actualZBaseMm, 0.);
+ G_PROPERTY_DEFAULT(double, actualZRangeMm, 0.);
+};