Skip to content

Commit

Permalink
rtklib 2.4.2 p4
Browse files Browse the repository at this point in the history
  • Loading branch information
tomojitakasu committed Sep 1, 2013
1 parent 749c25f commit 3855c3d
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 11 deletions.
19 changes: 14 additions & 5 deletions app/rtkplot/plotdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ int __fastcall TPlot::ReadObsRnx(TStrings *files, obs_t *obs, nav_t *nav,
AnsiString s;
gtime_t ts,te;
double tint;
int i;
char obsfile[1024],navfile[1024],*p,*opt=RnxOpts.c_str();
int i,n;
char obsfile[1024],navfile[1024]="",*p,*q,*opt=RnxOpts.c_str();

trace(3,"ReadObsRnx\n");

Expand Down Expand Up @@ -212,12 +212,20 @@ int __fastcall TPlot::ReadObsRnx(TStrings *files, obs_t *obs, nav_t *nav,
}
else if (!strcmp(p+3,"o" )||!strcmp(p+3,"d" )||
!strcmp(p+3,"O" )||!strcmp(p+3,"D" )) {
n=nav->n;

strcpy(p+3,"N"); readrnxt(navfile,1,ts,te,tint,opt,NULL,nav,NULL);
strcpy(p+3,"G"); readrnxt(navfile,1,ts,te,tint,opt,NULL,nav,NULL);
strcpy(p+3,"H"); readrnxt(navfile,1,ts,te,tint,opt,NULL,nav,NULL);
strcpy(p+3,"Q"); readrnxt(navfile,1,ts,te,tint,opt,NULL,nav,NULL);
strcpy(p+3,"L"); readrnxt(navfile,1,ts,te,tint,opt,NULL,nav,NULL);
strcpy(p+3,"P"); readrnxt(navfile,1,ts,te,tint,opt,NULL,nav,NULL);

if (nav->n>n||!(q=strrchr(navfile,'\\'))) continue;

// read brdc navigation data
memcpy(q+1,"BRDC",4);
strcpy(p+3,"N"); readrnxt(navfile,1,ts,te,tint,opt,NULL,nav,NULL);
}
}
if (obs->n<=0) {
Expand Down Expand Up @@ -813,9 +821,10 @@ void __fastcall TPlot::UpdateMp(void)

code2obs(data->code[j],&f1);

if (sys==SYS_GAL) f2=f1==1?3:1;
else if (sys==SYS_CMP) f2=f1==2?5:2;
else f2=f1==1?2:1;
if (sys==SYS_GAL) f2=f1==1?3:1; /* E1/E5a */
else if (sys==SYS_SBS) f2=f1==1?3:1; /* L1/L5 */
else if (sys==SYS_CMP) f2=f1==2?5:2; /* B1/B2 */
else f2=f1==1?2:1; /* L1/L2 */

lam1=satwavelen(data->sat,f1-1,&Nav);
lam2=satwavelen(data->sat,f2-1,&Nav);
Expand Down
4 changes: 3 additions & 1 deletion app/rtkplot/plotdraw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1519,13 +1519,15 @@ void __fastcall TPlot::DrawSnrE(int level)

trace(3,"DrawSnrE: level=%d\n",level);

yl[1][0]=-MaxMP; yl[1][1]=MaxMP;

for (i=0;i<2;i++) if (btn[i]->Down) j=i;
for (i=0;i<2;i++) {
if (!btn[i]->Down) continue;
GraphE[i]->XLPos=i==j?1:0;
GraphE[i]->YLPos=1;
GraphE[i]->SetLim(xl,yl[i]);
GraphE[i]->SetTick(0.0,5.0);
GraphE[i]->SetTick(0.0,0.0);
GraphE[i]->DrawAxis(1,1);

GraphE[i]->GetPos(p1,p2);
Expand Down
5 changes: 4 additions & 1 deletion app/rtkplot/plotmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ __fastcall TPlot::TPlot(TComponent* Owner) : TForm(Owner)
PlotStyle=MarkSize=Origin=RcvPos=0;
TimeInt=ElMask=YRange=0.0;
MaxDop=30.0;
MaxMP=10.0;
TimeStart=TimeEnd=epoch2time(ep);
DoubleBuffered=true;
Console1=new TConsole(Owner);
Expand Down Expand Up @@ -2167,7 +2168,7 @@ void __fastcall TPlot::SetRange(int all, double range)
else {
GraphG[0]->GetLim(tl,xp);
xl[0]=10.0; xl[1]= 60.0;
yl[0]=-10.0; yl[1]=10.0;
yl[0]=-MaxMP; yl[1]=MaxMP;
zl[0]= 0.0; zl[1]= 90.0;
GraphG[0]->SetLim(tl,xl);
GraphG[1]->SetLim(tl,yl);
Expand Down Expand Up @@ -2348,6 +2349,7 @@ void __fastcall TPlot::LoadOpt(void)

ElMask =ini->ReadFloat ("plot","elmask", 0.0);
MaxDop =ini->ReadFloat ("plot","maxdop",30.0);
MaxMP =ini->ReadFloat ("plot","maxmp" ,10.0);
YRange =ini->ReadFloat ("plot","yrange", 5.0);
Origin =ini->ReadInteger("plot","orgin", 2);
RcvPos =ini->ReadInteger("plot","rcvpos", 0);
Expand Down Expand Up @@ -2477,6 +2479,7 @@ void __fastcall TPlot::SaveOpt(void)

ini->WriteFloat ("plot","elmask", ElMask );
ini->WriteFloat ("plot","maxdop", MaxDop );
ini->WriteFloat ("plot","maxmp", MaxMP );
ini->WriteFloat ("plot","yrange", YRange );
ini->WriteInteger("plot","orgin", Origin );
ini->WriteInteger("plot","rcvpos", RcvPos );
Expand Down
2 changes: 1 addition & 1 deletion app/rtkplot/plotmain.h
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ class TPlot : public TForm
double ElMask;
int ElMaskP;
int HideLowSat;
double MaxDop;
double MaxDop,MaxMP;
int NavSys;
AnsiString ExSats;
int ShowErr;
Expand Down
2 changes: 2 additions & 0 deletions app/rtkplot/plotopt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ void __fastcall TPlotOptDialog::FormShow(TObject *Sender)

ElMask ->Text=s.sprintf("%g",Plot->ElMask);
MaxDop ->Text=s.sprintf("%g",Plot->MaxDop);
MaxMP ->Text=s.sprintf("%g",Plot->MaxMP );
YRange ->Text=s.sprintf("%g",Plot->YRange);
Origin ->ItemIndex=Plot->Origin;
RcvPos ->ItemIndex=Plot->RcvPos;
Expand Down Expand Up @@ -136,6 +137,7 @@ void __fastcall TPlotOptDialog::BtnOKClick(TObject *Sender)

Plot->ElMask=str2dbl(ElMask->Text);
Plot->MaxDop=str2dbl(MaxDop->Text);
Plot->MaxMP =str2dbl(MaxMP ->Text);
Plot->YRange=str2dbl(YRange->Text);
Plot->Origin=Origin->ItemIndex;
Plot->RcvPos=RcvPos->ItemIndex;
Expand Down
29 changes: 26 additions & 3 deletions app/rtkplot/plotopt.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ object PlotOptDialog: TPlotOptDialog
Align = alTop
BevelOuter = bvNone
TabOrder = 2
ExplicitLeft = -1
object Label1: TLabel
Left = 360
Top = 123
Expand Down Expand Up @@ -216,9 +215,9 @@ object PlotOptDialog: TPlotOptDialog
object Label28: TLabel
Left = 12
Top = 211
Width = 68
Width = 44
Height = 13
Caption = 'Maximum DOP'
Caption = 'Max DOP'
end
object LabelExSats: TLabel
Left = 12
Expand Down Expand Up @@ -353,6 +352,13 @@ object PlotOptDialog: TPlotOptDialog
FF00}
OnClick = BtnTLESatViewClick
end
object Label37: TLabel
Left = 12
Top = 233
Width = 67
Height = 13
Caption = 'Max Multipath'
end
object Panel1: TPanel
Left = 350
Top = 186
Expand Down Expand Up @@ -1179,6 +1185,23 @@ object PlotOptDialog: TPlotOptDialog
TabOrder = 58
OnClick = BtnTLESatFileClick
end
object MaxMP: TComboBox
Left = 102
Top = 230
Width = 77
Height = 21
DropDownCount = 20
TabOrder = 59
Text = '10'
Items.Strings = (
'1'
'2'
'3'
'5'
'10'
'20'
'30')
end
end
object BtnCancel: TButton
Left = 455
Expand Down
2 changes: 2 additions & 0 deletions app/rtkplot/plotopt.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ class TPlotOptDialog : public TForm
TLabel *Label36;
TSpeedButton *BtnTLEView;
TSpeedButton *BtnTLESatView;
TLabel *Label37;
TComboBox *MaxMP;
void __fastcall BtnOKClick(TObject *Sender);
void __fastcall FormShow(TObject *Sender);
void __fastcall BtnColor1Click(TObject *Sender);
Expand Down

0 comments on commit 3855c3d

Please sign in to comment.