mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 21:40:52 -05:00 
			
		
		
		
	Pass absolute file path for JPLEPH to astrosub_().
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@5494 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									793068c55f
								
							
						
					
					
						commit
						c4909d52b0
					
				@ -82,7 +82,7 @@ void Astro::write_settings ()
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid, qint64 freqMoon,
 | 
					void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid, qint64 freqMoon,
 | 
				
			||||||
                        qint32* ndop, qint32* ndop00, bool bTx)
 | 
					                        qint32* ndop, qint32* ndop00, bool bTx, QString jpleph)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  double azsun,elsun,azmoon,elmoon,azmoondx,elmoondx;
 | 
					  double azsun,elsun,azmoon,elmoon,azmoondx,elmoondx;
 | 
				
			||||||
  double ramoon,decmoon,dgrd,poloffset,xnr,techo,width1,width2;
 | 
					  double ramoon,decmoon,dgrd,poloffset,xnr,techo,width1,width2;
 | 
				
			||||||
@ -100,14 +100,15 @@ void Astro::astroUpdate(QDateTime t, QString mygrid, QString hisgrid, qint64 fre
 | 
				
			|||||||
  int nfreq=freqMoon/1000000;
 | 
					  int nfreq=freqMoon/1000000;
 | 
				
			||||||
  double freq8=(double)freqMoon;
 | 
					  double freq8=(double)freqMoon;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  QDir dataDir = QStandardPaths::writableLocation (QStandardPaths::DataLocation);
 | 
					  QDir writable = QStandardPaths::writableLocation (QStandardPaths::DataLocation);
 | 
				
			||||||
  QString fname = QDir::toNativeSeparators(dataDir.absoluteFilePath ("azel.dat"));
 | 
					  QString AzElFileName = QDir::toNativeSeparators(writable.absoluteFilePath ("azel.dat"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  astrosub_(&nyear, &month, &nday, &uth, &freq8, mygrid.toLatin1(),
 | 
					  astrosub_(&nyear, &month, &nday, &uth, &freq8, mygrid.toLatin1(),
 | 
				
			||||||
            hisgrid.toLatin1(), &azsun, &elsun, &azmoon, &elmoon,
 | 
					            hisgrid.toLatin1(), &azsun, &elsun, &azmoon, &elmoon,
 | 
				
			||||||
            &azmoondx, &elmoondx, &ntsky, ndop, ndop00, &ramoon, &decmoon,
 | 
					            &azmoondx, &elmoondx, &ntsky, ndop, ndop00, &ramoon, &decmoon,
 | 
				
			||||||
            &dgrd, &poloffset, &xnr, &techo, &width1, &width2, &bTx,
 | 
					            &dgrd, &poloffset, &xnr, &techo, &width1, &width2, &bTx,
 | 
				
			||||||
            fname.toLatin1(), 6, 6, fname.length());
 | 
					            AzElFileName.toLatin1(), jpleph.toLatin1(), 6, 6,
 | 
				
			||||||
 | 
					            AzElFileName.length(), jpleph.length());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  QString message;
 | 
					  QString message;
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										5
									
								
								astro.h
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								astro.h
									
									
									
									
									
								
							@ -23,7 +23,7 @@ public:
 | 
				
			|||||||
  explicit Astro(QSettings * settings, QWidget * parent = nullptr);
 | 
					  explicit Astro(QSettings * settings, QWidget * parent = nullptr);
 | 
				
			||||||
  ~Astro ();
 | 
					  ~Astro ();
 | 
				
			||||||
  void astroUpdate(QDateTime t, QString mygrid, QString hisgrid, qint64 freqMoon,
 | 
					  void astroUpdate(QDateTime t, QString mygrid, QString hisgrid, qint64 freqMoon,
 | 
				
			||||||
                   qint32* ndop, qint32 *ndop00, bool bTx);
 | 
					                   qint32* ndop, qint32 *ndop00, bool bTx, QString jpleph);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  bool m_bDopplerTracking;
 | 
					  bool m_bDopplerTracking;
 | 
				
			||||||
  bool m_bRxAudioTrack;
 | 
					  bool m_bRxAudioTrack;
 | 
				
			||||||
@ -65,7 +65,8 @@ extern "C" {
 | 
				
			|||||||
                 double* elmoondx, int* ntsky, int* ndop, int* ndop00,
 | 
					                 double* elmoondx, int* ntsky, int* ndop, int* ndop00,
 | 
				
			||||||
                 double* ramoon, double* decmoon, double* dgrd, double* poloffset,
 | 
					                 double* ramoon, double* decmoon, double* dgrd, double* poloffset,
 | 
				
			||||||
                 double* xnr, double* techo, double* width1, double* width2,
 | 
					                 double* xnr, double* techo, double* width1, double* width2,
 | 
				
			||||||
                 bool* bTx, const char* fname, int len1, int len2, int len3);
 | 
					                 bool* bTx, const char* AzElFileName, const char* jpleph,
 | 
				
			||||||
 | 
					                 int len1, int len2, int len3, int len4);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#endif // ASTRO_H
 | 
					#endif // ASTRO_H
 | 
				
			||||||
 | 
				
			|||||||
@ -1,9 +1,11 @@
 | 
				
			|||||||
subroutine astrosub(nyear,month,nday,uth8,freq8,mygrid,hisgrid,          &
 | 
					subroutine astrosub(nyear,month,nday,uth8,freq8,mygrid,hisgrid,          &
 | 
				
			||||||
     AzSun8,ElSun8,AzMoon8,ElMoon8,AzMoonB8,ElMoonB8,ntsky,ndop,ndop00,  &
 | 
					     AzSun8,ElSun8,AzMoon8,ElMoon8,AzMoonB8,ElMoonB8,ntsky,ndop,ndop00,  &
 | 
				
			||||||
     RAMoon8,DecMoon8,Dgrd8,poloffset8,xnr8,techo8,width1,width2,bTx,fname)
 | 
					     RAMoon8,DecMoon8,Dgrd8,poloffset8,xnr8,techo8,width1,width2,bTx,    &
 | 
				
			||||||
 | 
					     AzElFileName,jpleph)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  implicit real*8 (a-h,o-z)
 | 
					  implicit real*8 (a-h,o-z)
 | 
				
			||||||
  character*6 mygrid,hisgrid,fname*(*),c1*1
 | 
					  character*6 mygrid,hisgrid,c1*1
 | 
				
			||||||
 | 
					  character*6 AzElFileName*(*),jpleph*(*)
 | 
				
			||||||
  logical*1 bTx
 | 
					  logical*1 bTx
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  call astro0(nyear,month,nday,uth8,freq8,mygrid,hisgrid,                &
 | 
					  call astro0(nyear,month,nday,uth8,freq8,mygrid,hisgrid,                &
 | 
				
			||||||
@ -16,7 +18,7 @@ subroutine astrosub(nyear,month,nday,uth8,freq8,mygrid,hisgrid,          &
 | 
				
			|||||||
  ih=uth8
 | 
					  ih=uth8
 | 
				
			||||||
  im=mod(imin,60)
 | 
					  im=mod(imin,60)
 | 
				
			||||||
  is=mod(isec,60)
 | 
					  is=mod(isec,60)
 | 
				
			||||||
  open(15,file=fname,status='unknown',err=900)
 | 
					  open(15,file=AzElFileName,status='unknown',err=900)
 | 
				
			||||||
  c1='R'
 | 
					  c1='R'
 | 
				
			||||||
  nRx=1
 | 
					  nRx=1
 | 
				
			||||||
  if(bTx) then
 | 
					  if(bTx) then
 | 
				
			||||||
 | 
				
			|||||||
@ -2132,7 +2132,8 @@ void MainWindow::guiUpdate()
 | 
				
			|||||||
      m_freqMoon=m_dialFreq + 1000*m_astroWidget->m_kHz + m_astroWidget->m_Hz;
 | 
					      m_freqMoon=m_dialFreq + 1000*m_astroWidget->m_kHz + m_astroWidget->m_Hz;
 | 
				
			||||||
      int ndop,ndop00;
 | 
					      int ndop,ndop00;
 | 
				
			||||||
      m_astroWidget->astroUpdate(t, m_config.my_grid (), m_hisGrid,m_freqMoon,
 | 
					      m_astroWidget->astroUpdate(t, m_config.my_grid (), m_hisGrid,m_freqMoon,
 | 
				
			||||||
                                 &ndop, &ndop00, m_transmitting);
 | 
					                                 &ndop, &ndop00, m_transmitting,
 | 
				
			||||||
 | 
					                                 m_config.data_dir().absoluteFilePath("JPLEPH"));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//Apply Doppler corrections only for 50 MHz and above
 | 
					//Apply Doppler corrections only for 50 MHz and above
 | 
				
			||||||
      if(m_freqNominal>=50000000) {
 | 
					      if(m_freqNominal>=50000000) {
 | 
				
			||||||
@ -4382,11 +4383,14 @@ void MainWindow::bandHopping()
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void MainWindow::on_pushButton_clicked()
 | 
					void MainWindow::on_pushButton_clicked()
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
 | 
					  qDebug() << "A" << m_config.data_dir();
 | 
				
			||||||
 | 
					  qDebug() << "B" << m_config.data_dir().absolutePath();
 | 
				
			||||||
 | 
					  qDebug() << "C" << m_config.data_dir().absoluteFilePath("JPLEPH");
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
  m_hopTest=true;
 | 
					  m_hopTest=true;
 | 
				
			||||||
//  for(int i=0; i<720; i++) {
 | 
					 | 
				
			||||||
  bandHopping();
 | 
					  bandHopping();
 | 
				
			||||||
//  }
 | 
					 | 
				
			||||||
  m_hopTest=false;
 | 
					  m_hopTest=false;
 | 
				
			||||||
 | 
					*/
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void MainWindow::on_sunriseBands_editingFinished()
 | 
					void MainWindow::on_sunriseBands_editingFinished()
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user