diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-05-18 19:26:16 +0200 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2008-05-18 19:26:16 +0200 |
commit | d9c027bb9b4bfb74c41c334fc8cf889d4e244b55 (patch) | |
tree | ab3a28c245ca8401df2badf16667e85d399081ca /src | |
parent | d34bb114fe2e3133a0541b0812eed5e146313730 (diff) |
further rectiliear projection correction
Diffstat (limited to 'src')
-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$ |