Signal reports from -01 to -30 formatted as always; new formatting

for -50 to -31 and 0 to +49.
Change DialFreq to MHz.
Fix info saved to wsjt.log.


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2781 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-11-28 14:33:18 +00:00
parent 87c6a53d7c
commit 288c2a69d8
3 changed files with 47 additions and 24 deletions

View File

@ -8,12 +8,40 @@ subroutine packgrid(grid,ng,text)
text=.false. text=.false.
if(grid.eq.' ') go to 90 !Blank grid is OK if(grid.eq.' ') go to 90 !Blank grid is OK
n=99 ! First, handle signal reports in the original range, -01 to -30 dB
if(grid(1:1).eq.'-') then
read(grid(2:3),*,err=800,end=800) n
if(n.ge.1 .and. n.le.30) then
ng=NGBASE+1+n
go to 900
endif
go to 10
else if(grid(1:2).eq.'R-') then
read(grid(3:4),*,err=800,end=800) n
if(n.ge.1 .and. n.le.30) then
ng=NGBASE+31+n
go to 900
endif
go to 10
! Now check for RO, RRR, or 73 in the message field normally used for grid
else if(grid(1:4).eq.'RO ') then
ng=NGBASE+62
go to 900
else if(grid(1:4).eq.'RRR ') then
ng=NGBASE+63
go to 900
else if(grid(1:4).eq.'73 ') then
ng=NGBASE+64
go to 900
endif
! Now check for extended-range signal reports: -50 to -31, and 0 to +49.
10 n=99
c1=grid(1:1) c1=grid(1:1)
read(grid,*,err=1) n read(grid,*,err=20) n
go to 2 go to 30
1 read(grid(2:4),*,err=2) n 20 read(grid(2:4),*,err=30) n
2 if(n.ge.-50 .and. n.le.49) then 30 if(n.ge.-50 .and. n.le.49) then
if(c1.eq.'R') then if(c1.eq.'R') then
write(grid,1002) n+50 write(grid,1002) n+50
1002 format('LA',i2.2) 1002 format('LA',i2.2)
@ -21,33 +49,28 @@ subroutine packgrid(grid,ng,text)
write(grid,1003) n+50 write(grid,1003) n+50
1003 format('KA',i2.2) 1003 format('KA',i2.2)
endif endif
go to 10 go to 40
else if(grid(1:2).eq.'RO') then
ng=NGBASE+62
go to 100
else if(grid(1:3).eq.'RRR') then
ng=NGBASE+63
go to 100
else if(grid(1:2).eq.'73') then
ng=NGBASE+64
go to 100
endif endif
! Maybe it's free text ?
if(grid(1:1).lt.'A' .or. grid(1:1).gt.'R') text=.true. if(grid(1:1).lt.'A' .or. grid(1:1).gt.'R') text=.true.
if(grid(2:2).lt.'A' .or. grid(2:2).gt.'R') text=.true. if(grid(2:2).lt.'A' .or. grid(2:2).gt.'R') text=.true.
if(grid(3:3).lt.'0' .or. grid(3:3).gt.'9') text=.true. if(grid(3:3).lt.'0' .or. grid(3:3).gt.'9') text=.true.
if(grid(4:4).lt.'0' .or. grid(4:4).gt.'9') text=.true. if(grid(4:4).lt.'0' .or. grid(4:4).gt.'9') text=.true.
if(text) go to 100 if(text) go to 900
10 call grid2deg(grid//'mm',dlong,dlat) ! OK, we have a properly formatted grid locator
40 call grid2deg(grid//'mm',dlong,dlat)
long=dlong long=dlong
lat=dlat+ 90.0 lat=dlat+ 90.0
ng=((long+180)/2)*180 + lat ng=((long+180)/2)*180 + lat
go to 100 go to 900
90 ng=NGBASE + 1 90 ng=NGBASE + 1
go to 900
800 text=.true.
900 continue
100 continue
return return
end subroutine packgrid end subroutine packgrid

View File

@ -1536,11 +1536,11 @@ void MainWindow::on_genStdMsgsPushButton_clicked() //genStdMsgs button
void MainWindow::on_logQSOButton_clicked() //Log QSO button void MainWindow::on_logQSOButton_clicked() //Log QSO button
{ {
int nMHz=144; double dialFreq=g_pWideGraph->dialFreq();
QDateTime t = QDateTime::currentDateTimeUtc(); QDateTime t = QDateTime::currentDateTimeUtc();
QString logEntry=t.date().toString("yyyy-MMM-dd,") + QString logEntry=t.date().toString("yyyy-MMM-dd,") +
t.time().toString("hh:mm,") + m_hisCall + "," + m_hisGrid + "," + t.time().toString("hh:mm,") + m_hisCall + "," + m_hisGrid + "," +
QString::number(nMHz) + ",JTMSK\n"; QString::number(dialFreq) + "," + m_mode + "\n";
QFile f("wsjt.log"); QFile f("wsjt.log");
if(!f.open(QFile::Append)) { if(!f.open(QFile::Append)) {
msgBox("Cannot open file \"wsjt.log\"."); msgBox("Cannot open file \"wsjt.log\".");

View File

@ -326,7 +326,7 @@
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="text"> <property name="text">
<string>Dial Freq (kHz)</string> <string>Dial Freq (MHz)</string>
</property> </property>
</widget> </widget>
</item> </item>
@ -348,7 +348,7 @@
</size> </size>
</property> </property>
<property name="text"> <property name="text">
<string>473.000</string> <string>1.8395</string>
</property> </property>
</widget> </widget>
</item> </item>