diff --git a/lib/get_q3list.f90 b/lib/get_q3list.f90 index 91fa3251d..1e0e72ce3 100644 --- a/lib/get_q3list.f90 +++ b/lib/get_q3list.f90 @@ -15,14 +15,14 @@ subroutine get_q3list(fname,nlist,list) integer nt(8) integer indx(MAX_CALLERS) type(q3list) callers(MAX_CALLERS) - + character*256 jpleph_file_name + common/jplcom/jpleph_file_name nhist2=0 open(24,file=fname,status='unknown',form='unformatted') read(24,end=1) nhist2,callers(1:nhist2) -1 close(24) +1 close(24) - moon_el=0 now=time() call date_and_time(values=nt) uth=nt(5) + (nt(6)-nt(4))/60.0 + nt(7)/3600.0 @@ -35,13 +35,28 @@ subroutine get_q3list(fname,nlist,list) call grid2deg(grid6,xlon,xlat) call sun(nt(1),nt(2),nt(3),uth,-xlon,xlat,RASun,DecSun,xLST, & AzSun,ElSun,mjd,day) -! call moondopjpl(nt(1),nt(2),nt(3),uth,-xlon,xlat,RAMoon,DecMoon, & -! xLST,HA,AzMoon,ElMoon,vr,techo) - print*,i,grid6,azmoon,elsun,elmoon + call moondopjpl(nt(1),nt(2),nt(3),uth,-xlon,xlat,RAMoon,DecMoon, & + xLST,HA,AzMoon,ElMoon,vr,techo) + moon_el=nint(ElMoon) write(list(i),1000) i,callers(j)%nfreq,callers(j)%call, & callers(j)%grid,moon_el,age,char(0) 1000 format(i2,'.',i6,2x,a6,2x,a4,i5,f7.1,a1) + + h1=mod(now,86400)/3600.0 + h2=mod(callers(i)%nsec,86400)/3600.0 + hd=h1-h2 + if(hd.lt.0.0) hd=hd+24.0 +! write(*,3301) i,callers(i)%call,now,callers(i)%nsec,h1,h2,hd +!3301 format(i3,2x,a6,2i12,3f10.6) + enddo return end subroutine get_q3list + +subroutine jpl_setup(fname) + character*256 fname,jpleph_file_name + common/jplcom/jpleph_file_name + jpleph_file_name=fname + return +end subroutine jpl_setup diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 3f9cfff0e..76579a086 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -187,6 +187,8 @@ extern "C" { void indexx_(float arr[], int* n, int indx[]); void get_q3list_(char* fname, int* nlist, char* list, FCL len1, FCL len2); + + void jpl_setup_(char* fname, FCL len); } int volatile itone[MAX_NUM_SYMBOLS]; //Audio tones for all Tx symbols @@ -1078,6 +1080,9 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, ui->labDXped->setStyleSheet("QLabel {background-color: red; color: white;}"); ui->pbBestSP->setVisible(m_mode=="FT4"); + QString jpleph = m_config.data_dir().absoluteFilePath("JPLEPH"); + jpl_setup_(const_cast(jpleph.toLocal8Bit().constData()),256); + // this must be the last statement of constructor if (!m_valid) throw std::runtime_error {"Fatal initialization exception"}; }