Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update UT Date to be consistent with current view #67

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions rfplot.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ int main(int argc,char *argv[])
float x=0.0,y=0.0,x0=0.0,y0=0.0,yfit;
char c;
char path[128],xlabel[128],ylabel[64],filename[32],tlefile[128],freqlist[128];
char nfd[32];
int sec,lsec,ssec;
char stime[16];
double fmin,fmax,fcen,f;
Expand Down Expand Up @@ -278,8 +279,12 @@ int main(int argc,char *argv[])
fmax-=fcen;
cpgswin(xmin,xmax,fmin,fmax);
cpgbox("",0.,0,"BTSN",0.,0);

sprintf(xlabel,"UT Date: %.10s",s.nfd0);
// update UT Date to be consistent with the current view
int imin = (int) xmin;
if (imin < 0)
imin = 0;
mjd2nfd(s.mjd[imin], nfd);
sprintf(xlabel,"UT Date: %.10s",nfd);
cpglab(xlabel,ylabel," ");

cpgswin(xmin,xmax,ymin,ymax);
Expand Down