diff options
author | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-12-16 09:48:55 +0100 |
---|---|---|
committer | Johannes Hofmann <Johannes.Hofmann@gmx.de> | 2006-12-16 09:48:55 +0100 |
commit | 3b8859b0b59429ba98305972bccd5111f058ff16 (patch) | |
tree | e7f80ed7bdc9d73f6b0755e78693d1eb613dd109 | |
parent | 99bf70b3a6874a425dece5fc46de60656201c5f8 (diff) |
use alph instead of a_view
-rw-r--r-- | src/Hill.H | 2 | ||||
-rw-r--r-- | src/Hill.cxx | 2 | ||||
-rw-r--r-- | src/Panorama.cxx | 2 | ||||
-rw-r--r-- | src/ProjectionTangentialLSQ.cxx | 17 |
4 files changed, 13 insertions, 10 deletions
@@ -36,7 +36,7 @@ class Hill { Hill(const Hill& h); - Hill(int x_tmp, int y_tmp); + Hill(double x_tmp, double y_tmp); ~Hill(); }; diff --git a/src/Hill.cxx b/src/Hill.cxx index c5708f2..0504eeb 100644 --- a/src/Hill.cxx +++ b/src/Hill.cxx @@ -40,7 +40,7 @@ Hill::Hill(const Hill& h) { flags = h.flags; } -Hill::Hill(int x_tmp, int y_tmp) { +Hill::Hill(double x_tmp, double y_tmp) { name = NULL; phi = 0.0; lam = 0.0; diff --git a/src/Panorama.cxx b/src/Panorama.cxx index a62e2f0..503f373 100644 --- a/src/Panorama.cxx +++ b/src/Panorama.cxx @@ -498,7 +498,7 @@ Panorama::update_coordinates() { for (int i=0; i<visible_mountains->get_num(); i++) { m = visible_mountains->get(i); - proj->get_coordinates(m->a_view, m->a_nick, &parms, &m->x, &m->y); + proj->get_coordinates(m->alph, m->a_nick, &parms, &m->x, &m->y); } } diff --git a/src/ProjectionTangentialLSQ.cxx b/src/ProjectionTangentialLSQ.cxx index a2ca449..9bbf81c 100644 --- a/src/ProjectionTangentialLSQ.cxx +++ b/src/ProjectionTangentialLSQ.cxx @@ -99,7 +99,7 @@ struct data { const ViewParams *old_params; }; -#define CALL(A) A(c_view, c_nick, c_tilt, scale, k0, k1, m->a_view, m->a_nick) +#define CALL(A) A(c_view, c_nick, c_tilt, scale, k0, k1, m->alph, m->a_nick) static int lsq_f (const gsl_vector * x, void *data, gsl_vector * f) { @@ -244,9 +244,13 @@ ProjectionTangentialLSQ::lsq(const Hills *h, ViewParams *parms) { gsl_multifit_fdfsolver_free (s); - fprintf(stderr, "center %f, x %f, dx %f, y %f, dy %f\n", + double t_x, t_y; + get_coordinates(h->get(0)->a_view, h->get(0)->a_nick, parms, &t_x, &t_y); + fprintf(stderr, "center %f, view %f, nick %f, x %f (%f), dx %f, y %f (%f), dy %f\n", parms->a_center / deg2rad, + h->get(0)->a_view, h->get(0)->a_nick, h->get(0)->x, + t_x, h->get(0)->x - mac_x(parms->a_center, parms->a_nick, parms->a_tilt, @@ -255,6 +259,7 @@ ProjectionTangentialLSQ::lsq(const Hills *h, ViewParams *parms) { parms->k1, h->get(0)->a_view, h->get(0)->a_nick), h->get(0)->y, + t_y, h->get(0)->y - mac_y(parms->a_center, parms->a_nick, parms->a_tilt, @@ -269,15 +274,13 @@ ProjectionTangentialLSQ::lsq(const Hills *h, ViewParams *parms) { } void -ProjectionTangentialLSQ::get_coordinates(double a_view, double a_nick, +ProjectionTangentialLSQ::get_coordinates(double alph, double a_nick, const ViewParams *parms, double *x, double *y) { *x = mac_x(parms->a_center, parms->a_nick, parms->a_tilt, parms->scale, - parms->k0, parms->k1, a_view, a_nick); + parms->k0, parms->k1, alph, a_nick); *y = mac_y(parms->a_center, parms->a_nick, parms->a_tilt, parms->scale, - parms->k0, parms->k1, a_view, a_nick); - - fprintf(stderr, "==> %f %f\n", *x, *y); + parms->k0, parms->k1, alph, a_nick); } double |