From 47dbcc5c434c293da10039eb56a8393926b3137a Mon Sep 17 00:00:00 2001 From: Johannes Hofmann Date: Wed, 28 May 2008 19:22:13 +0200 Subject: update --- src/Panorama.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/Panorama.cxx') diff --git a/src/Panorama.cxx b/src/Panorama.cxx index 49010f5..06754ae 100644 --- a/src/Panorama.cxx +++ b/src/Panorama.cxx @@ -429,25 +429,25 @@ Panorama::alpha(const Hill *m) { } double -Panorama::refraction_change(const Hill *m) { - double a, b, c, alpha = 6.5 / 1000.0, T0 = 10.0; +Panorama::refraction(const Hill *m) { + double a, b, c, alpha = 6.5, T0 = 0.0; a = 2.9e-4 * exp (-view_height / 10000.0) / (1.0 + 2.9 * T0 / 760.0); b = 2.9 * alpha / (760.0 * (1.0 + 2.9 * T0 / 760.0)); - c = a * (b - 1.0 / 10000.0); + c = a * (b - 1.0 / 10.0); - return (c * get_real_distance(m) / (2.0 * (1.0 + a))); + return c * get_real_distance(m) / (2000.0 * (1.0 + a)); } double Panorama::nick(const Hill *m) { - double b, c, theta = refraction_change(m); + double b, c, theta = refraction(m); b = m->height + get_earth_radius(m->phi); c = view_height + get_earth_radius(view_phi); -if (get_real_distance(m) < 200000) -fprintf(stderr, "=== %s, %g\n", m->name, theta); +if (get_real_distance(m) < 100000) +fprintf(stderr, "=== %s, %g, %g\n", m->name, get_real_distance(m), theta / deg2rad); return atan((cos(m->dist) * b - c) / (sin(m->dist) * b)) - theta; } -- cgit v1.2.3