Unverified Commit e049f07f authored by Tammo Jan Dijkema's avatar Tammo Jan Dijkema
Browse files

Convert to radians in model

parent 749d3ff1
......@@ -63,16 +63,16 @@ struct dt_model_params *params = &dt_model_default;
double dt_model_azimuth_delta(double az, double el)
{
double delta_az;
double c1_div_cos_el = params->c1 / cos(el);
double c1_div_cos_el = params->c1 / cos(2*M_PI*el/360.);
if (isnan(c1_div_cos_el))
c1_div_cos_el = 0.0;
delta_az =
params->a0
+ params->c1 / cos(el)
- params->c2 * tan(el)
- params->za * sin(az - params->aa) * tan(el);
+ params->c1 / cos(2*M_PI*el/360.)
- params->c2 * tan(2*M_PI*el/360.)
- params->za * sin(az - params->aa) * tan(2*M_PI*el/360.);
return delta_az;
}
......@@ -89,9 +89,9 @@ double dt_model_elevation_delta(double az, double el)
delta_el =
params->e0
+ params->b * cos(el)
- params->za * cos(az - params->aa);
+ params->b * cos(2*M_PI*el/360.)
- params->za * cos(2*M_PI*(az - params->aa)/360.);
return delta_el;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment