Skip to content
Snippets Groups Projects
Commit b87ecc60 authored by Armin Luntzer's avatar Armin Luntzer
Browse files

SRT SIM: correctly compute VLSR shift

parent d9e9d5c6
No related branches found
No related tags found
No related merge requests found
......@@ -1207,10 +1207,15 @@ static gsize HI_get_spec_idx(struct spec_data *s, struct coord_galactic gal,
{
int idx;
gdouble v;
f = f - (gdouble) s->freq_min_hz + vlsr(galactic_to_equatorial(gal), 0.0);;
v = vlsr(galactic_to_equatorial(gal), 0.0);
f = f - (gdouble) s->freq_min_hz - doppler_freq_relative(v, SIM_V_REF_HZ);
f = f / (gdouble) s->freq_inc_hz;
idx = (int) f;
/* adjust for actual spectrum */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment