summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ProjectionTangentialLSQ.cxx6
-rw-r--r--src/lsq_funcs.mac6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/ProjectionTangentialLSQ.cxx b/src/ProjectionTangentialLSQ.cxx
index a05c990..f4dc44a 100644
--- a/src/ProjectionTangentialLSQ.cxx
+++ b/src/ProjectionTangentialLSQ.cxx
@@ -18,7 +18,7 @@ static double sec(double a) {
#include "lsq_funcs.c"
-static double k0 = 1.0, k1 = 0.0;
+static double k0 = 0.0, k1 = 0.0;
static double
comp_tilt(double tan_nick_view, double tan_dir_view, double n_scale,
@@ -146,8 +146,8 @@ void
ProjectionTangentialLSQ::get_coordinates(double a_view, double a_nick,
const ViewParams *parms, double *x, double *y) {
- *x = mac_x(parms->a_center, parms->a_nick, parms->a_tilt, parms->scale, k0, k1, a_view, -a_nick);
- *y = mac_y(parms->a_center, parms->a_nick, parms->a_tilt, parms->scale, k0, k1, a_view, -a_nick);
+ *x = mac_x(parms->a_center, parms->a_nick, parms->a_tilt, parms->scale, k0, k1, a_view, a_nick);
+ *y = mac_y(parms->a_center, parms->a_nick, parms->a_tilt, parms->scale, k0, k1, a_view, a_nick);
}
double
diff --git a/src/lsq_funcs.mac b/src/lsq_funcs.mac
index cf86d7e..3bd124e 100644
--- a/src/lsq_funcs.mac
+++ b/src/lsq_funcs.mac
@@ -3,7 +3,7 @@
*/
x_undist_unrot : tan(m_view - c_view) * scale$
-y_undist_unrot : tan(m_nick - c_nick) * scale$
+y_undist_unrot : tan(c_nick - m_nick) * scale$
d : y_undist_unrot ^ 2 + x_undist_unrot ^ 2$
dist_fact : d ^2 * k1 + d * k0$
x_unrot : x_undist_unrot * (1 + dist_fact)$
@@ -15,8 +15,8 @@ y : y_unrot * cos(c_tilt) - x_unrot * sin(c_tilt)$
* Some mangling for C code generation
*/
-x_expand : trigexpand(x_unrot)$
-y_expand : trigexpand(y_unrot)$
+x_expand : trigexpand(x)$
+y_expand : trigexpand(y)$
args: "(double c_view, double c_nick, double c_tilt, double scale, double k0, double k1, double m_view, double m_nick)"$