Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
dt_ctrl
Commits
e049f07f
Unverified
Commit
e049f07f
authored
Sep 21, 2021
by
Tammo Jan Dijkema
Browse files
Convert to radians in model
parent
749d3ff1
Changes
1
Hide whitespace changes
Inline
Side-by-side
common/utils/dt_model.c
View file @
e049f07f
...
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment