Skip to content

Commit

Permalink
Improved TCA calculation
Browse files Browse the repository at this point in the history
Signed-off-by: Cees Bassa <[email protected]>
  • Loading branch information
cbassa committed Dec 28, 2024
1 parent 8747afe commit 821d821
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions rffit.c
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,13 @@ int main(int argc,char *argv[])
}

cpgsci(15);
// for (mjd=d.mjd0,i=0;mjd<d.mjd0+xmax;mjd+=1.0/1440.0,i++) {
for (i=0;i<NMAX;i++) {
mjd=xmin+d.mjd0+(xmax-xmin)*(float) i/(float) (NMAX-1);
velocity(orb,mjd,site,&v,&azi,&alt);

// Get TCA
if (i>0) {
if (vtca*v<0.0) {
if (vtca*v<0.0 && alt>0 && mjd<d.mjdmax && mjd>d.mjdmin) {
mjdtca=mjd;
}
}
Expand Down

0 comments on commit 821d821

Please sign in to comment.