Skip to content

Commit

Permalink
- Update freq labels in RTKCONV options menu from L1,L2,L3 to L1,L2/E…
Browse files Browse the repository at this point in the history
…5b,L5/E5a

- Change u-blox->rinex default to combine codes (e.g L2L+L2S->L2X)
- add u-blox recveiver option for multicodes (-MULTICODE')
  • Loading branch information
rtklibexplorer committed Mar 1, 2021
1 parent 5077bec commit f02934b
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 37 deletions.
4 changes: 0 additions & 4 deletions app/winapp/rtkconv/convopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ void __fastcall TConvOptDialog::FormShow(TObject *Sender)
Freq2->Checked=MainWindow->FreqType&FREQTYPE_L2;
Freq3->Checked=MainWindow->FreqType&FREQTYPE_L3;
Freq4->Checked=MainWindow->FreqType&FREQTYPE_L4;
Freq5->Checked=MainWindow->FreqType&FREQTYPE_L5;
ExSats->Text=MainWindow->ExSats;
TraceLevel->ItemIndex=MainWindow->TraceLevel;
ChkSepNav->Checked=MainWindow->SepNav;
Expand Down Expand Up @@ -146,7 +145,6 @@ void __fastcall TConvOptDialog::BtnOkClick(TObject *Sender)
if (Freq2->Checked) freqtype|=FREQTYPE_L2;
if (Freq3->Checked) freqtype|=FREQTYPE_L3;
if (Freq4->Checked) freqtype|=FREQTYPE_L4;
if (Freq5->Checked) freqtype|=FREQTYPE_L5;
MainWindow->NavSys=navsys;
MainWindow->ObsType=obstype;
MainWindow->FreqType=freqtype;
Expand Down Expand Up @@ -191,7 +189,6 @@ void __fastcall TConvOptDialog::BtnMaskClick(TObject *Sender)
if (Freq2->Checked) CodeOptDialog->FreqType|=FREQTYPE_L2;
if (Freq3->Checked) CodeOptDialog->FreqType|=FREQTYPE_L3;
if (Freq4->Checked) CodeOptDialog->FreqType|=FREQTYPE_L4;
if (Freq5->Checked) CodeOptDialog->FreqType|=FREQTYPE_L5;
CodeOptDialog->ShowModal();
}
//---------------------------------------------------------------------------
Expand All @@ -209,7 +206,6 @@ void __fastcall TConvOptDialog::UpdateEnable(void)
Nav7->Enabled=RnxVer->ItemIndex>=6;
Freq3->Enabled=RnxVer->ItemIndex>=1;
Freq4->Enabled=RnxVer->ItemIndex>=1;
Freq5->Enabled=RnxVer->ItemIndex>=1;
PhaseShift->Enabled=RnxVer->ItemIndex>=4;
}
//---------------------------------------------------------------------------
Expand Down
52 changes: 22 additions & 30 deletions app/winapp/rtkconv/convopt.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -322,14 +322,14 @@ object ConvOptDialog: TConvOptDialog
end
end
object GroupBox3: TGroupBox
Left = 1
Left = -1
Top = 263
Width = 132
Width = 111
Height = 35
Caption = 'Observation Types'
TabOrder = 8
object Obs1: TCheckBox
Left = 10
Left = 2
Top = 14
Width = 30
Height = 15
Expand All @@ -339,7 +339,7 @@ object ConvOptDialog: TConvOptDialog
TabOrder = 0
end
object Obs2: TCheckBox
Left = 41
Left = 29
Top = 14
Width = 30
Height = 15
Expand All @@ -349,7 +349,7 @@ object ConvOptDialog: TConvOptDialog
TabOrder = 1
end
object Obs3: TCheckBox
Left = 72
Left = 54
Top = 14
Width = 30
Height = 15
Expand All @@ -359,7 +359,7 @@ object ConvOptDialog: TConvOptDialog
TabOrder = 2
end
object Obs4: TCheckBox
Left = 103
Left = 82
Top = 14
Width = 30
Height = 15
Expand Down Expand Up @@ -394,9 +394,9 @@ object ConvOptDialog: TConvOptDialog
TabOrder = 10
end
object GroupBox4: TGroupBox
Left = 137
Left = 116
Top = 263
Width = 176
Width = 201
Height = 35
Caption = 'GNSS Signals '
TabOrder = 9
Expand All @@ -421,39 +421,31 @@ object ConvOptDialog: TConvOptDialog
TabOrder = 0
end
object Freq2: TCheckBox
Left = 43
Left = 47
Top = 14
Width = 30
Width = 51
Height = 17
Caption = 'L2'
Caption = 'L2/E5b'
Checked = True
State = cbChecked
TabOrder = 1
end
object Freq3: TCheckBox
Left = 76
Top = 14
Width = 30
Left = 106
Top = 13
Width = 51
Height = 17
Caption = 'L3'
Caption = 'L5/E5a'
TabOrder = 2
end
object Freq4: TCheckBox
Left = 109
Top = 14
Left = 163
Top = 13
Width = 30
Height = 17
Caption = 'L4'
Caption = 'L6'
TabOrder = 3
end
object Freq5: TCheckBox
Left = 142
Top = 14
Width = 30
Height = 17
Caption = 'L5'
TabOrder = 4
end
end
object ExSats: TEdit
Left = 317
Expand Down Expand Up @@ -566,9 +558,9 @@ object ConvOptDialog: TConvOptDialog
end
end
object BtnMask: TButton
Left = 316
Left = 323
Top = 268
Width = 50
Width = 47
Height = 30
Caption = 'Mask...'
TabOrder = 13
Expand All @@ -591,9 +583,9 @@ object ConvOptDialog: TConvOptDialog
Text = '0.005'
end
object BtnFcn: TButton
Left = 369
Left = 372
Top = 268
Width = 50
Width = 47
Height = 30
Caption = 'FCN...'
TabOrder = 15
Expand Down
1 change: 0 additions & 1 deletion app/winapp/rtkconv/convopt.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ class TConvOptDialog : public TForm
TCheckBox *Nav5;
TComboBox *TraceLevel;
TLabel *Label3;
TCheckBox *Freq5;
TLabel *Label8;
TEdit *RcvOption;
TLabel *Label9;
Expand Down
45 changes: 43 additions & 2 deletions src/rcv/ublox.c
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,41 @@ static int ubx_sig(int sys, int sigid)
}
return CODE_NONE;
}
/* UBX SigId to signal - combine codes ------------------------*/
static int ubx_sig_combined(int sys, int sigid)
{
if (sys == SYS_GPS) {
if (sigid == 0) return CODE_L1C; /* L1C/A */
if (sigid==3) return CODE_L2X; /* L2CL */
if (sigid==4) return CODE_L2X; /* L2CM */
}
else if (sys == SYS_GLO) {
if (sigid == 0) return CODE_L1C; /* G1C/A (GLO L1 OF) */
if (sigid == 2) return CODE_L2C; /* G2C/A (GLO L2 OF) */
}
else if (sys == SYS_GAL) {
if (sigid==0) return CODE_L1X; /* E1C */
if (sigid==1) return CODE_L1X; /* E1B */
if (sigid==5) return CODE_L7X; /* E5bI */
if (sigid==6) return CODE_L7X; /* E5bQ */
}
else if (sys == SYS_QZS) {
if (sigid == 0) return CODE_L1C; /* L1C/A */
if (sigid==1) return CODE_L1C; /* L1S */
if (sigid==4) return CODE_L2X; /* L2CM */
if (sigid==5) return CODE_L2X; /* L2CL */
}
else if (sys == SYS_CMP) {
if (sigid==0) return CODE_L2I; /* B1I D1 */
if (sigid==1) return CODE_L2I; /* B1I D2 */
if (sigid == 2) return CODE_L7I; /* B2I D1 */
if (sigid == 3) return CODE_L7I; /* B2I D2 */
}
else if (sys == SYS_SBS) {
if (sigid==0) return CODE_L1C; /* L1C/A */
}
return CODE_NONE;
}
/* signal index in obs data --------------------------------------------------*/
static int sig_idx(int sys, uint8_t code)
{
Expand Down Expand Up @@ -308,6 +343,7 @@ static int decode_rxmrawx(raw_t *raw)
double tow,P,L,D,tn,tadj=0.0,toff=0.0;
int i,j,k,idx,sys,prn,sat,code,slip,halfv,halfc,LLI,n=0,cpstd_valid,cpstd_slip;
int week,nmeas,ver,gnss,svid,sigid,frqid,lockt,cn0,cpstd,prstd,tstat;
int multicode=0;

trace(4,"decode_rxmrawx: len=%d\n",raw->len);

Expand Down Expand Up @@ -347,6 +383,8 @@ static int decode_rxmrawx(raw_t *raw)
if ((q=strstr(raw->opt,"-STD_SLIP="))) {
sscanf(q,"-STD_SLIP=%d",&cpstd_slip);
} else cpstd_slip=CPSTD_SLIP;
/* use multiple codes for each freq (-MULTICODE) */
if ((q=strstr(raw->opt,"-MULTICODE"))) multicode=1;

/* time tag adjustment */
if (tadj>0.0) {
Expand Down Expand Up @@ -387,8 +425,11 @@ static int decode_rxmrawx(raw_t *raw)
raw->nav.glo_fcn[prn-1]=frqid-7+8;
}
if (ver>=1) {
code=ubx_sig(sys,sigid);
}
if (multicode)
code=ubx_sig(sys,sigid);
else
code=ubx_sig_combined(sys,sigid);
}
else {
code=(sys==SYS_CMP)?CODE_L2I:((sys==SYS_GAL)?CODE_L1X:CODE_L1C);
}
Expand Down

0 comments on commit f02934b

Please sign in to comment.