diff options
-rw-r--r-- | src/GipfelWidget.cxx | 1 | ||||
-rw-r--r-- | src/lsq_rectilinear.mac | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/GipfelWidget.cxx b/src/GipfelWidget.cxx index 63e89d2..881eb27 100644 --- a/src/GipfelWidget.cxx +++ b/src/GipfelWidget.cxx @@ -677,6 +677,7 @@ GipfelWidget::handle(int event) { break; case FL_DRAG: set_mountain(Fl::event_x()-x(), Fl::event_y()-y()); + comp_params(); return 1; break; case FL_RELEASE: diff --git a/src/lsq_rectilinear.mac b/src/lsq_rectilinear.mac index d1abf4e..a06670d 100644 --- a/src/lsq_rectilinear.mac +++ b/src/lsq_rectilinear.mac @@ -2,11 +2,14 @@ * rectilinear (pinhole) projection model with distortion correction */ -a_v : m_view - c_view$ -a_h : c_nick - atan (tan (m_nick) / cos(a_v))$ +/* angle over horizon in view direction */ +a_h : atan (tan (m_nick) / cos(m_view - c_view))$ + +/* adjust angle according to nick value */ +a_v : atan(cos(c_nick + a_h) * tan(m_view - c_view) / cos(a_h))$ x : tan(a_v)$ -y : tan(a_h)$ +y : tan(c_nick - a_h)$ x_rot : y * sin(c_tilt) + x * cos(c_tilt)+x0$ y_rot : y * cos(c_tilt) - x * sin(c_tilt)$ d : x_rot ^ 2 + y_rot ^ 2$ |