summaryrefslogtreecommitdiff
path: root/src/lsq_rectilinear.mac
diff options
context:
space:
mode:
authorJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-05-18 19:26:16 +0200
committerJohannes Hofmann <Johannes.Hofmann@gmx.de>2008-05-18 19:26:16 +0200
commitd9c027bb9b4bfb74c41c334fc8cf889d4e244b55 (patch)
treeab3a28c245ca8401df2badf16667e85d399081ca /src/lsq_rectilinear.mac
parentd34bb114fe2e3133a0541b0812eed5e146313730 (diff)
further rectiliear projection correction
Diffstat (limited to 'src/lsq_rectilinear.mac')
-rw-r--r--src/lsq_rectilinear.mac9
1 files changed, 6 insertions, 3 deletions
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$