From 4b28dbe90ebb87753f1092612334041f740585d7 Mon Sep 17 00:00:00 2001
From: Tim Everett <tim.everett3@gmail.com>
Date: Mon, 29 Jul 2019 16:49:14 -0600
Subject: [PATCH] - Merge modifications from 2.4.3 B32 - Move Galileo E5b from
 3rd freq to 2nd freq to optimize run speed for L1/L2/E5b receivers

---
 app/convbin/convbin.c        |   9 ++-
 app/convbin/msc/msc.vcxproj  |   2 +-
 app/rnx2rtkp/msc/msc.vcxproj |  12 ++--
 app/rtkconv/codeopt.cpp      |  34 ++++-----
 app/rtkconv/codeopt.dfm      |  52 +++++++-------
 app/rtkconv/codeopt.h        |   6 +-
 app/rtkconv/convmain.cpp     |   6 +-
 app/rtkconv/convmain.dfm     | Bin 38069 -> 19082 bytes
 app/rtkconv/convopt.cpp      |   3 -
 app/rtkconv/convopt.dfm      |  36 ++++------
 app/rtkconv/convopt.h        |   1 -
 app/rtkconv/rtkconv.cbproj   | 135 ++++++++++++++++++++++++++++-------
 app/rtknavi/navimain.cpp     |   8 +++
 src/convrnx.c                |   2 -
 src/options.c                |   2 +-
 src/rcv/binex.c              |   7 +-
 src/rcv/javad.c              |   8 ++-
 src/rcv/novatel.c            |   8 +--
 src/rcv/tersus.c             |   8 +--
 src/rcv/ublox.c              |  11 +--
 src/rcvraw.c                 |   7 +-
 src/rtcm3.c                  |  12 +++-
 src/rtcm3e.c                 |   8 ++-
 src/rtkcmn.c                 |  26 ++++---
 src/rtklib.h                 |  35 +++++----
 src/rtkpos.c                 |  15 ++--
 src/solution.c               |   2 +-
 src/stream.c                 |   5 +-
 28 files changed, 280 insertions(+), 180 deletions(-)

diff --git a/app/convbin/convbin.c b/app/convbin/convbin.c
index 0d5b713..ec78e07 100644
--- a/app/convbin/convbin.c
+++ b/app/convbin/convbin.c
@@ -497,11 +497,10 @@ static int cmdopts(int argc, char **argv, rnxopt_t *opt, char **ifile,
     }
     if (nf>=1) opt->freqtype|=FREQTYPE_L1;
     if (nf>=2) opt->freqtype|=FREQTYPE_L2;
-    if (nf>=3) opt->freqtype|=FREQTYPE_E5b;
-    if (nf>=4) opt->freqtype|=FREQTYPE_L5;
-    if (nf>=5) opt->freqtype|=FREQTYPE_E6;
-    if (nf>=6) opt->freqtype|=FREQTYPE_E5ab;
-    if (nf>=7) opt->freqtype|=FREQTYPE_S;
+    if (nf>=3) opt->freqtype|=FREQTYPE_L5;
+    if (nf>=4) opt->freqtype|=FREQTYPE_E6;
+    if (nf>=5) opt->freqtype|=FREQTYPE_E5ab;
+    if (nf>=6) opt->freqtype|=FREQTYPE_S;
     
     if (*fmt) {
         if      (!strcmp(fmt,"rtcm2")) format=STRFMT_RTCM2;
diff --git a/app/convbin/msc/msc.vcxproj b/app/convbin/msc/msc.vcxproj
index 98dc8d9..eaa56cc 100644
--- a/app/convbin/msc/msc.vcxproj
+++ b/app/convbin/msc/msc.vcxproj
@@ -76,7 +76,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
       <AdditionalIncludeDirectories>..\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;TRACE;_CRT_SECURE_NO_DEPRECATE;ENAGLO;ENAQZS;ENAGAL;ENACMP;NFREQ=4;NEXOBS=3;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>WIN32;TRACE;_CRT_SECURE_NO_DEPRECATE;ENAGLO;ENAQZS;ENAGAL;ENACMP;NFREQ=3;NEXOBS=3;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <PrecompiledHeader>
       </PrecompiledHeader>
diff --git a/app/rnx2rtkp/msc/msc.vcxproj b/app/rnx2rtkp/msc/msc.vcxproj
index 89e08b0..41a18dd 100644
--- a/app/rnx2rtkp/msc/msc.vcxproj
+++ b/app/rnx2rtkp/msc/msc.vcxproj
@@ -14,7 +14,7 @@
     <ProjectGuid>{830901EE-9359-489F-BA7E-04289F28D5E0}</ProjectGuid>
     <RootNamespace>msc</RootNamespace>
     <Keyword>Win32Proj</Keyword>
-    <WindowsTargetPlatformVersion>10.0.10586.0</WindowsTargetPlatformVersion>
+    <WindowsTargetPlatformVersion>10.0.17763.0</WindowsTargetPlatformVersion>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
@@ -53,8 +53,8 @@
     <ClCompile>
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>..\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;TRACE;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;ENAGLO;ENAQZS;ENAGAL;ENACMP;NFREQ=4;NEXOBS=3;%(PreprocessorDefinitions)</PreprocessorDefinitions>
-      <MinimalRebuild>true</MinimalRebuild>
+      <PreprocessorDefinitions>WIN32;TRACE;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;ENAGLO;ENAQZS;ENAGAL;ENACMP;NFREQ=3;NEXOBS=3;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>false</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <PrecompiledHeader>
@@ -80,7 +80,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
     <ClCompile>
       <AdditionalIncludeDirectories>..\..\..\src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>WIN32;TRACE;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;ENAGLO;ENAQZS;ENAGAL;ENACMP;NFREQ=4;NEXOBS=3;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>WIN32;TRACE;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;ENAGLO;ENAQZS;ENAGAL;ENACMP;NFREQ=3;NEXOBS=3;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <PrecompiledHeader>
       </PrecompiledHeader>
@@ -105,7 +105,9 @@
     <ClCompile Include="..\..\..\src\datum.c" />
     <ClCompile Include="..\..\..\src\ephemeris.c" />
     <ClCompile Include="..\..\..\src\geoid.c" />
-    <ClCompile Include="..\..\..\src\ionex.c" />
+    <ClCompile Include="..\..\..\src\ionex.c">
+      <PreprocessorDefinitions Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">WIN32;TRACE;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;ENAGLO;ENAQZS;ENAGAL;ENACMP;NFREQ=3;NEXOBS=3;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+    </ClCompile>
     <ClCompile Include="..\..\..\src\lambda.c" />
     <ClCompile Include="..\..\..\src\options.c" />
     <ClCompile Include="..\..\..\src\pntpos.c" />
diff --git a/app/rtkconv/codeopt.cpp b/app/rtkconv/codeopt.cpp
index b95baba..dce7c7e 100644
--- a/app/rtkconv/codeopt.cpp
+++ b/app/rtkconv/codeopt.cpp
@@ -83,7 +83,7 @@ void __fastcall TCodeOptDialog::FormShow(TObject *Sender)
 	J33->Checked=mask[3][32]=='1';
 	C40->Checked=mask[5][39]=='1';
 	C41->Checked=mask[5][40]=='1';
-	C18->Checked=mask[5][11]=='1';
+	C12->Checked=mask[5][11]=='1';
 	C27->Checked=mask[5][26]=='1';
 	C28->Checked=mask[5][27]=='1';
 	C29->Checked=mask[5][28]=='1';
@@ -172,9 +172,9 @@ void __fastcall TCodeOptDialog::BtnOkClick(TObject *Sender)
 	if (J35->Checked) mask[3][34]='1';
 	if (J36->Checked) mask[3][35]='1';
 	if (J33->Checked) mask[3][32]='1';
-	if (C40->Checked){mask[5][39]='1';mask[5][46]='1';}
-	if (C41->Checked){mask[5][40]='1';mask[5][47]='1';}
-	if (C18->Checked){mask[5][17]='1';mask[5][11]='1';}
+	if (C40->Checked) mask[5][39]='1';
+	if (C41->Checked) mask[5][40]='1';
+	if (C12->Checked) mask[5][11]='1';
 	if (C27->Checked) mask[5][26]='1';
 	if (C28->Checked) mask[5][27]='1';
 	if (C29->Checked) mask[5][28]='1';
@@ -263,7 +263,7 @@ void __fastcall TCodeOptDialog::BtnSetAllClick(TObject *Sender)
 	J33->Checked=set;
 	C40->Checked=set;
 	C41->Checked=set;
-	C18->Checked=set;
+	C12->Checked=set;
 	C27->Checked=set;
 	C28->Checked=set;
 	C29->Checked=set;
@@ -323,9 +323,9 @@ void __fastcall TCodeOptDialog::UpdateEnable(void)
 	E24->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_L5);
 	E25->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_L5);
 	E26->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_L5);
-	E27->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_E5b);
-	E28->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_E5b);
-	E29->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_E5b);
+	E27->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_L2);
+	E28->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_L2);
+	E29->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_L2);
 	E30->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_E6);
 	E31->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_E6);
 	E32->Enabled=(NavSys&SYS_GAL)&&(FreqType&FREQTYPE_E6);
@@ -342,18 +342,18 @@ void __fastcall TCodeOptDialog::UpdateEnable(void)
 	J16->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_L2);
 	J17->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_L2);
 	J18->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_L2);
-	J24->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_E5b);
-	J25->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_E5b);
-	J26->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_E5b);
+	J24->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_L2);
+	J25->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_L2);
+	J26->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_L2);
 	J35->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_E6);
 	J36->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_E6);
 	J33->Enabled=(NavSys&SYS_QZS)&&(FreqType&FREQTYPE_E6);
-	C40->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_L2);
-	C41->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_L2);
-	C18->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_L2);
-	C27->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_E5b);
-	C28->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_E5b);
-	C29->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_E5b);
+	C40->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_L1);
+	C41->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_L1);
+	C12->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_L1);
+	C27->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_L2);
+	C28->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_L2);
+	C29->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_L2);
 	C42->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_E6);
 	C43->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_E6);
 	C33->Enabled=(NavSys&SYS_CMP)&&(FreqType&FREQTYPE_E6);
diff --git a/app/rtkconv/codeopt.dfm b/app/rtkconv/codeopt.dfm
index b6d3984..08944d4 100644
--- a/app/rtkconv/codeopt.dfm
+++ b/app/rtkconv/codeopt.dfm
@@ -67,7 +67,7 @@ object CodeOptDialog: TCodeOptDialog
     OnClick = BtnOkClick
   end
   object BtnCancel: TButton
-    Left = 318
+    Left = 324
     Top = 301
     Width = 71
     Height = 29
@@ -317,7 +317,7 @@ object CodeOptDialog: TCodeOptDialog
     end
   end
   object GroupBox3: TGroupBox
-    Left = 0
+    Left = 1
     Top = 107
     Width = 394
     Height = 69
@@ -606,23 +606,23 @@ object CodeOptDialog: TCodeOptDialog
     OnClick = BtnSetAllClick
   end
   object GroupBox6: TGroupBox
-    Left = 4
-    Top = 230
+    Left = 0
+    Top = 228
     Width = 393
     Height = 34
     Caption = 'BeiDou'
     TabOrder = 8
     object C40: TCheckBox
-      Left = 5
-      Top = 15
-      Width = 40
+      Left = 10
+      Top = 14
+      Width = 35
       Height = 16
-      Caption = '1I/2I'
+      Caption = '2I'
       Enabled = False
       TabOrder = 2
     end
     object C42: TCheckBox
-      Left = 270
+      Left = 238
       Top = 14
       Width = 32
       Height = 16
@@ -631,25 +631,25 @@ object CodeOptDialog: TCodeOptDialog
       TabOrder = 0
     end
     object C27: TCheckBox
-      Left = 157
+      Left = 124
       Top = 14
-      Width = 33
+      Width = 34
       Height = 16
       Caption = '7I'
       Enabled = False
       TabOrder = 3
     end
     object C28: TCheckBox
-      Left = 192
+      Left = 162
       Top = 14
-      Width = 34
+      Width = 44
       Height = 16
       Caption = '7Q'
       Enabled = False
       TabOrder = 4
     end
     object C29: TCheckBox
-      Left = 232
+      Left = 201
       Top = 14
       Width = 34
       Height = 16
@@ -658,25 +658,25 @@ object CodeOptDialog: TCodeOptDialog
       TabOrder = 1
     end
     object C41: TCheckBox
-      Left = 52
+      Left = 48
       Top = 14
-      Width = 50
+      Width = 34
       Height = 16
-      Caption = '1Q/2Q'
+      Caption = '2Q'
       Enabled = False
       TabOrder = 5
     end
-    object C18: TCheckBox
-      Left = 106
+    object C12: TCheckBox
+      Left = 86
       Top = 14
-      Width = 49
+      Width = 34
       Height = 16
-      Caption = '1X/2X'
+      Caption = '2X'
       Enabled = False
       TabOrder = 6
     end
     object C43: TCheckBox
-      Left = 308
+      Left = 276
       Top = 14
       Width = 32
       Height = 16
@@ -685,10 +685,10 @@ object CodeOptDialog: TCodeOptDialog
       TabOrder = 7
     end
     object C33: TCheckBox
-      Left = 344
-      Top = 12
-      Width = 33
-      Height = 19
+      Left = 314
+      Top = 14
+      Width = 32
+      Height = 16
       Caption = '6X'
       Enabled = False
       TabOrder = 8
diff --git a/app/rtkconv/codeopt.h b/app/rtkconv/codeopt.h
index c97d216..7d62497 100644
--- a/app/rtkconv/codeopt.h
+++ b/app/rtkconv/codeopt.h
@@ -81,13 +81,13 @@ __published:
 	TButton *BtnSetAll;
 	TCheckBox *J33;
 	TGroupBox *GroupBox6;
-    TCheckBox *C40;
+	TCheckBox *C40;
 	TCheckBox *C42;
 	TCheckBox *C27;
 	TCheckBox *C28;
 	TCheckBox *C29;
-    TCheckBox *C41;
-    TCheckBox *C18;
+	TCheckBox *C41;
+	TCheckBox *C12;
 	TCheckBox *C43;
 	TCheckBox *C33;
 	TCheckBox *R44;
diff --git a/app/rtkconv/convmain.cpp b/app/rtkconv/convmain.cpp
index f9b79b8..eede251 100644
--- a/app/rtkconv/convmain.cpp
+++ b/app/rtkconv/convmain.cpp
@@ -454,7 +454,7 @@ void __fastcall TMainWindow::BtnInFileViewClick(TObject *Sender)
 		!strcmp(ext+3,"g"  )||!strcmp(ext+3,"G"  )||!strcmp(ext+3,"h" )||
 		!strcmp(ext+3,"H"  )||!strcmp(ext+3,"q"  )||!strcmp(ext+3,"Q" )||
 		!strcmp(ext+3,"l"  )||!strcmp(ext+3,"L"  )||!strcmp(ext+3,"c" )||
-        !strcmp(ext+3,"C"  )||!strcmp(ext+3,"i"  )||!strcmp(ext+3,"I" )) {
+        !strcmp(ext+3,"C"  )) {
 		viewer->Show();
 		viewer->Read(RepPath(InFile_Text));
 	}
@@ -832,8 +832,6 @@ void __fastcall TMainWindow::ConvertFile(void)
 		else if (!strcmp(p+3,"L"   )) format=STRFMT_RINEX;
 		else if (!strcmp(p+3,"c"   )) format=STRFMT_RINEX;
 		else if (!strcmp(p+3,"C"   )) format=STRFMT_RINEX;
-		else if (!strcmp(p+3,"i"   )) format=STRFMT_RINEX;
-		else if (!strcmp(p+3,"I"   )) format=STRFMT_RINEX;
 		else {
 			showmsg("file format can not be recognized");
 			return;
@@ -866,7 +864,7 @@ void __fastcall TMainWindow::ConvertFile(void)
 	if (OutFile9->Enabled&&OutFileEna9->Checked) strcpy(ofile[8],OutFile9_Text.c_str());
 	
 	// check overwrite output file
-	for (i=0;i<8;i++) {
+	for (i=0;i<9;i++) {
 		if (!*ofile[i]||!(fp=fopen(ofile[i],"r"))) continue;
 		fclose(fp);
 		ConfDialog->Label2->Caption=ofile[i];
diff --git a/app/rtkconv/convmain.dfm b/app/rtkconv/convmain.dfm
index 84cf243559b5132245bd43c7b9c44928f9537d1f..2014eaa50577a7d5dec2f5e9cc538cb58c4e6fd6 100644
GIT binary patch
literal 19082
zcmeHP&2J<}74PY>r{}}=dN*q}2?Rz+tdfv;$K&122Lfb|y=y1_TF>lygM^@GrsHY0
z-EDf>UOO^Mq`;8_7Z4&BBrb>pLL4|C;1Hqw1)xZX3lb9I1_*In-mCYj`eS;=UN6~L
zXhwE-SJkgx)qC};kABtN4~kl2b#8fWYk6&9eM_rM?!BgIjg1?XQe)M$-7VW~d-sds
z<;aTlW}s`?hPSJ0rFqY9TmEv(bGxOnrd>bm2G-81<?a=m_NwjLJN8?aX4K5x!1mmn
zvDtXNw!U^}tmfF38!TD&b|=VwJ5!?Ymfa3I*$*?LHP7*U!)Q5M9Xqh5Y9KxEp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vKrXHKZNH!f?ab&F_|1uKlqcNDnUJD^>4o0$hprtt^U81^lMq-P{
z5cIY&of*lM;UY_X$&1L01e}^f^6BjnMYh~^i6n7iXmWeBq^3zE$+i5tL<-jg%GOp*
zfK0rgAT+aRLEsZaPpk-MUrd{;ayFAiL7W+*!ei^MG)wEg|DnAbE_kJ6uu13Jo~Zo(
z7fKAB`x0u?r5H<XP|8=^zM^${U)Fn7F==kpK^ix-m(|k-`U(^}{l(5?()sf1wXeT=
zR6mdB7o*pmJ`kq!tGhlB+ZEk0z>WcS3?5%}{)@0qns@V^dD#Nq+|PhXEgl~(C(Q@g
z^x^UY(A45_{BU1R^}TjSN6@GA{YqjfK1F&wEbpq>{cSldf$6fU0YEJt|EG9YsC#L?
zUi-Tiq!y3oM<@F~c20N4iY~F%n#<WYYIvuxv0DEVtQ)JFnT<MO`cw1sVRc=em&NsI
zJ^A=er}_D$X>Z{u)x%lP)R!N})vxLr^xyQT@!DD6Tn95(&id_D+n8hEmXD=9BgPgS
zj~V^R&Ks~wUA&VPfYG18&l#9Nb%F^_;OES2_sVQ|qdI}{6)-{rm|jUNv%#U+;MQz#
z2pd2HHaIj)-y5cX7^d$Plf+ts4%py(v%#_1U}82n22^MO)3IS18K$dRVrjicu)&qt
zU}QEpG8<F|^$3`t0jNih<K3Nc=U8GjH(<osWgEk4q4>tT<HutaUdOs`Qns<I7OGFt
Rf75X4t(&X<emJ!;^?xufI=27-

diff --git a/app/rtkconv/convopt.cpp b/app/rtkconv/convopt.cpp
index d92d3a3..3a3d275 100644
--- a/app/rtkconv/convopt.cpp
+++ b/app/rtkconv/convopt.cpp
@@ -78,7 +78,6 @@ void __fastcall TConvOptDialog::FormShow(TObject *Sender)
 	Obs4->Checked=MainWindow->ObsType&OBSTYPE_SNR;
 	Freq1->Checked=MainWindow->FreqType&FREQTYPE_L1;
 	Freq2->Checked=MainWindow->FreqType&FREQTYPE_L2;
-	Freq3->Checked=MainWindow->FreqType&FREQTYPE_E5b;
 	Freq4->Checked=MainWindow->FreqType&FREQTYPE_L5;
 	Freq5->Checked=MainWindow->FreqType&FREQTYPE_E6;
 	Freq6->Checked=MainWindow->FreqType&FREQTYPE_E5ab;
@@ -139,7 +138,6 @@ void __fastcall TConvOptDialog::BtnOkClick(TObject *Sender)
 	if (Obs4->Checked) obstype|=OBSTYPE_SNR;
 	if (Freq1->Checked) freqtype|=FREQTYPE_L1;
 	if (Freq2->Checked) freqtype|=FREQTYPE_L2;
-	if (Freq3->Checked) freqtype|=FREQTYPE_E5b;
 	if (Freq4->Checked) freqtype|=FREQTYPE_L5;
 	if (Freq5->Checked) freqtype|=FREQTYPE_E6;
 	if (Freq6->Checked) freqtype|=FREQTYPE_E5ab;
@@ -181,7 +179,6 @@ void __fastcall TConvOptDialog::BtnMaskClick(TObject *Sender)
 	if (Nav7->Checked) CodeOptDialog->NavSys|=SYS_IRN;
 	if (Freq1->Checked) CodeOptDialog->FreqType|=FREQTYPE_L1;
 	if (Freq2->Checked) CodeOptDialog->FreqType|=FREQTYPE_L2;
-	if (Freq3->Checked) CodeOptDialog->FreqType|=FREQTYPE_E5b;
 	if (Freq4->Checked) CodeOptDialog->FreqType|=FREQTYPE_L5;
 	if (Freq5->Checked) CodeOptDialog->FreqType|=FREQTYPE_E6;
 	if (Freq6->Checked) CodeOptDialog->FreqType|=FREQTYPE_E5ab;
diff --git a/app/rtkconv/convopt.dfm b/app/rtkconv/convopt.dfm
index 700c41f..e6d6c3c 100644
--- a/app/rtkconv/convopt.dfm
+++ b/app/rtkconv/convopt.dfm
@@ -377,8 +377,8 @@ object ConvOptDialog: TConvOptDialog
     end
   end
   object TraceLevel: TComboBox
-    Left = 190
-    Top = 326
+    Left = 188
+    Top = 327
     Width = 63
     Height = 21
     Style = csDropDownList
@@ -420,36 +420,28 @@ object ConvOptDialog: TConvOptDialog
     object Freq2: TCheckBox
       Left = 42
       Top = 14
-      Width = 37
+      Width = 52
       Height = 17
-      Caption = 'L2'
+      Caption = 'L2/E5b'
       Checked = True
       State = cbChecked
       TabOrder = 1
     end
-    object Freq3: TCheckBox
-      Left = 74
-      Top = 14
-      Width = 53
-      Height = 17
-      Caption = 'E5b'
-      TabOrder = 2
-    end
     object Freq4: TCheckBox
-      Left = 113
-      Top = 14
+      Left = 100
+      Top = 16
       Width = 45
-      Height = 17
+      Height = 13
       Caption = 'L5'
-      TabOrder = 3
+      TabOrder = 2
     end
     object Freq5: TCheckBox
-      Left = 145
-      Top = 14
+      Left = 135
+      Top = 11
       Width = 39
-      Height = 17
+      Height = 24
       Caption = 'E6'
-      TabOrder = 4
+      TabOrder = 3
     end
     object Freq6: TCheckBox
       Left = 174
@@ -457,7 +449,7 @@ object ConvOptDialog: TConvOptDialog
       Width = 40
       Height = 17
       Caption = 'E5ab'
-      TabOrder = 5
+      TabOrder = 4
     end
     object Freq7: TCheckBox
       Left = 218
@@ -465,7 +457,7 @@ object ConvOptDialog: TConvOptDialog
       Width = 31
       Height = 17
       Caption = 'S'
-      TabOrder = 6
+      TabOrder = 5
     end
   end
   object ExSats: TEdit
diff --git a/app/rtkconv/convopt.h b/app/rtkconv/convopt.h
index b98ff66..c4c1034 100644
--- a/app/rtkconv/convopt.h
+++ b/app/rtkconv/convopt.h
@@ -51,7 +51,6 @@ __published:
 	TGroupBox *GroupBox4;
 	TCheckBox *Freq1;
 	TCheckBox *Freq2;
-	TCheckBox *Freq3;
 	TCheckBox *Freq4;
 	TCheckBox *Obs1;
 	TCheckBox *Nav5;
diff --git a/app/rtkconv/rtkconv.cbproj b/app/rtkconv/rtkconv.cbproj
index 5462fde..c3c5ef1 100644
--- a/app/rtkconv/rtkconv.cbproj
+++ b/app/rtkconv/rtkconv.cbproj
@@ -6,7 +6,7 @@
         <Base>True</Base>
         <Config Condition="'$(Config)'==''">Release</Config>
         <FrameworkType>VCL</FrameworkType>
-        <ProjectVersion>18.4</ProjectVersion>
+        <ProjectVersion>18.6</ProjectVersion>
         <Platform Condition="'$(Platform)'==''">Win32</Platform>
         <TargetedPlatforms>1</TargetedPlatforms>
         <AppType>Application</AppType>
@@ -243,6 +243,10 @@
         <CppCompile Include="..\..\src\rcv\cmr.c">
             <BuildOrder>37</BuildOrder>
         </CppCompile>
+        <CppCompile Include="..\..\src\rcv\comnav.c">
+            <BuildOrder>5</BuildOrder>
+            <BuildOrder>15</BuildOrder>
+        </CppCompile>
         <CppCompile Include="..\..\src\rcv\crescent.c">
             <BuildOrder>20</BuildOrder>
             <BuildOrder>10</BuildOrder>
@@ -279,10 +283,6 @@
             <BuildOrder>5</BuildOrder>
             <BuildOrder>15</BuildOrder>
         </CppCompile>
-        <CppCompile Include="..\..\src\rcv\comnav.c">
-            <BuildOrder>5</BuildOrder>
-            <BuildOrder>15</BuildOrder>
-        </CppCompile>
         <CppCompile Include="..\..\src\rcv\tersus.c">
             <BuildOrder>38</BuildOrder>
         </CppCompile>
@@ -321,11 +321,11 @@
         <FormResources Include="codeopt.dfm"/>
         <FormResources Include="convmain.dfm"/>
         <FormResources Include="convopt.dfm"/>
-        <FormResources Include="..\appcmn\viewer.dfm"/>
         <FormResources Include="..\appcmn\aboutdlg.dfm"/>
         <FormResources Include="..\appcmn\confdlg.dfm"/>
         <FormResources Include="..\appcmn\keydlg.dfm"/>
         <FormResources Include="..\appcmn\timedlg.dfm"/>
+        <FormResources Include="..\appcmn\viewer.dfm"/>
         <FormResources Include="startdlg.dfm"/>
         <BuildConfiguration Include="Release">
             <Key>Cfg_2</Key>
@@ -414,67 +414,71 @@
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
+                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32c260.dll" Class="DependencyModule">
+                    <Platform Name="Win32">
+                        <Overwrite>true</Overwrite>
+                    </Platform>
+                </DeployFile>
                 <DeployFile LocalName="..\..\src\rcv\cmr.c" Configuration="Debug" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\rcv\novatel.c" Configuration="Release" Class="ProjectFile">
+                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin\cc32260.dll" Class="DependencyModule">
                     <Platform Name="Win32">
-                        <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\rtkcmn.c" Configuration="Debug" Class="ProjectFile">
+                <DeployFile LocalName="Debug_Build\rtkconv.exe" Configuration="Debug" Class="ProjectOutput">
                     <Platform Name="Win32">
-                        <RemoteDir>.\</RemoteDir>
+                        <RemoteName>rtkconv.exe</RemoteName>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\pntpos.c" Configuration="Debug" Class="ProjectFile">
+                <DeployFile LocalName="..\..\src\ephemeris.c" Configuration="Release" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="Debug_Build\rtkconv.exe" Configuration="Debug" Class="ProjectOutput">
+                <DeployFile LocalName="..\..\src\rtcm2.c" Configuration="Release" Class="ProjectFile">
                     <Platform Name="Win32">
-                        <RemoteName>rtkconv.exe</RemoteName>
+                        <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\ephemeris.c" Configuration="Release" Class="ProjectFile">
+                <DeployFile LocalName="..\..\src\rtkcmn.c" Configuration="Debug" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\rcv\nvs.c" Configuration="Release" Class="ProjectFile">
+                <DeployFile LocalName="..\..\src\rcv\novatel.c" Configuration="Release" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\rtcm2.c" Configuration="Release" Class="ProjectFile">
+                <DeployFile LocalName="..\..\src\rcv\nvs.c" Configuration="Release" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\ionex.c" Configuration="Release" Class="ProjectFile">
+                <DeployFile LocalName="..\..\src\pntpos.c" Configuration="Debug" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\rcv\swiftnav.c" Configuration="Debug" Class="ProjectFile">
+                <DeployFile LocalName="..\..\src\ionex.c" Configuration="Release" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\rcv\comnav.c" Configuration="Debug" Class="ProjectFile">
+                <DeployFile LocalName="..\..\src\rcv\swiftnav.c" Configuration="Debug" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
@@ -492,13 +496,13 @@
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\rcv\skytraq.c" Configuration="Release" Class="ProjectFile">
+                <DeployFile LocalName="..\..\src\rtkcmn.c" Configuration="Release" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\rtkcmn.c" Configuration="Release" Class="ProjectFile">
+                <DeployFile LocalName="..\..\src\rcv\skytraq.c" Configuration="Release" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
@@ -584,6 +588,11 @@
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
+                <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx64\libcgcrtl.dylib" Class="DependencyModule">
+                    <Platform Name="OSX64">
+                        <Overwrite>true</Overwrite>
+                    </Platform>
+                </DeployFile>
                 <DeployFile LocalName="..\..\src\rcv\rcvlex.c" Configuration="Debug" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
@@ -626,12 +635,23 @@
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
+                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin64\cc64260mt.dll" Class="DependencyModule">
+                    <Platform Name="Win64">
+                        <Overwrite>true</Overwrite>
+                    </Platform>
+                </DeployFile>
                 <DeployFile LocalName="..\..\src\rinex.c" Configuration="Release" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
+                <DeployFile LocalName="..\..\src\rcv\comnav.c" Configuration="Debug" Class="ProjectFile">
+                    <Platform Name="Win32">
+                        <RemoteDir>.\</RemoteDir>
+                        <Overwrite>true</Overwrite>
+                    </Platform>
+                </DeployFile>
                 <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32250mt.dll" Class="DependencyModule">
                     <Platform Name="Win32">
                         <Overwrite>true</Overwrite>
@@ -777,15 +797,13 @@
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\rcv\swiftnav.c" Configuration="Release" Class="ProjectFile">
-                    <Platform Name="Win32">
-                        <RemoteDir>.\</RemoteDir>
+                <DeployFile Condition="'$(DynamicRTL)'=='true'" LocalName="$(BDS)\Redist\osx64\libcgstl.dylib" Class="DependencyModule">
+                    <Platform Name="OSX64">
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
-                <DeployFile LocalName="..\..\src\rcv\comnav.c" Configuration="Release" Class="ProjectFile">
+                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32260mt.dll" Class="DependencyModule">
                     <Platform Name="Win32">
-                        <RemoteDir>.\</RemoteDir>
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
@@ -812,6 +830,16 @@
                         <Overwrite>true</Overwrite>
                     </Platform>
                 </DeployFile>
+                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'!='true'" LocalName="$(BDS)\bin64\cc64260.dll" Class="DependencyModule">
+                    <Platform Name="Win64">
+                        <Overwrite>true</Overwrite>
+                    </Platform>
+                </DeployFile>
+                <DeployFile Condition="'$(DynamicRTL)'=='true' And '$(Multithreaded)'=='true'" LocalName="$(BDS)\bin\cc32c260mt.dll" Class="DependencyModule">
+                    <Platform Name="Win32">
+                        <Overwrite>true</Overwrite>
+                    </Platform>
+                </DeployFile>
                 <DeployFile LocalName="..\..\src\rcv\crescent.c" Configuration="Debug" Class="ProjectFile">
                     <Platform Name="Win32">
                         <RemoteDir>.\</RemoteDir>
@@ -839,7 +867,6 @@
                         <Operation>1</Operation>
                     </Platform>
                     <Platform Name="Win32">
-                        <RemoteDir>Contents\MacOS</RemoteDir>
                         <Operation>0</Operation>
                     </Platform>
                 </DeployClass>
@@ -849,6 +876,12 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="AndroidFileProvider">
+                    <Platform Name="Android">
+                        <RemoteDir>res\xml</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="AndroidGDBServer">
                     <Platform Name="Android">
                         <RemoteDir>library\lib\armeabi-v7a</RemoteDir>
@@ -885,6 +918,12 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="AndroidSplashStylesV21">
+                    <Platform Name="Android">
+                        <RemoteDir>res\values-v21</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="Android_DefaultAppIcon">
                     <Platform Name="Android">
                         <RemoteDir>res\drawable</RemoteDir>
@@ -963,6 +1002,11 @@
                         <Operation>1</Operation>
                         <Extensions>.framework</Extensions>
                     </Platform>
+                    <Platform Name="OSX64">
+                        <RemoteDir>Contents\MacOS</RemoteDir>
+                        <Operation>1</Operation>
+                        <Extensions>.framework</Extensions>
+                    </Platform>
                     <Platform Name="Win32">
                         <Operation>0</Operation>
                     </Platform>
@@ -985,6 +1029,11 @@
                         <Operation>1</Operation>
                         <Extensions>.dylib</Extensions>
                     </Platform>
+                    <Platform Name="OSX64">
+                        <RemoteDir>Contents\MacOS</RemoteDir>
+                        <Operation>1</Operation>
+                        <Extensions>.dylib</Extensions>
+                    </Platform>
                     <Platform Name="Win32">
                         <Operation>0</Operation>
                         <Extensions>.dll;.bpl</Extensions>
@@ -1008,6 +1057,11 @@
                         <Operation>1</Operation>
                         <Extensions>.dylib</Extensions>
                     </Platform>
+                    <Platform Name="OSX64">
+                        <RemoteDir>Contents\MacOS</RemoteDir>
+                        <Operation>1</Operation>
+                        <Extensions>.dylib</Extensions>
+                    </Platform>
                     <Platform Name="Win32">
                         <Operation>0</Operation>
                         <Extensions>.bpl</Extensions>
@@ -1030,6 +1084,10 @@
                         <RemoteDir>Contents\Resources\StartUp\</RemoteDir>
                         <Operation>0</Operation>
                     </Platform>
+                    <Platform Name="OSX64">
+                        <RemoteDir>Contents\Resources\StartUp\</RemoteDir>
+                        <Operation>0</Operation>
+                    </Platform>
                     <Platform Name="Win32">
                         <Operation>0</Operation>
                     </Platform>
@@ -1166,23 +1224,41 @@
                         <Operation>1</Operation>
                     </Platform>
                 </DeployClass>
+                <DeployClass Name="ProjectOSXDebug">
+                    <Platform Name="OSX64">
+                        <RemoteDir>..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
+                </DeployClass>
                 <DeployClass Name="ProjectOSXEntitlements">
                     <Platform Name="OSX32">
                         <RemoteDir>..\</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="OSX64">
+                        <RemoteDir>..\</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectOSXInfoPList">
                     <Platform Name="OSX32">
                         <RemoteDir>Contents</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="OSX64">
+                        <RemoteDir>Contents</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Name="ProjectOSXResource">
                     <Platform Name="OSX32">
                         <RemoteDir>Contents\Resources</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="OSX64">
+                        <RemoteDir>Contents\Resources</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                 </DeployClass>
                 <DeployClass Required="true" Name="ProjectOutput">
                     <Platform Name="Android">
@@ -1205,6 +1281,10 @@
                         <RemoteDir>Contents\MacOS</RemoteDir>
                         <Operation>1</Operation>
                     </Platform>
+                    <Platform Name="OSX64">
+                        <RemoteDir>Contents\MacOS</RemoteDir>
+                        <Operation>1</Operation>
+                    </Platform>
                     <Platform Name="Win32">
                         <Operation>0</Operation>
                     </Platform>
@@ -1244,6 +1324,7 @@
                 <ProjectRoot Platform="Win32" Name="$(PROJECTNAME)"/>
                 <ProjectRoot Platform="OSX32" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="Android" Name="$(PROJECTNAME)"/>
+                <ProjectRoot Platform="OSX64" Name="$(PROJECTNAME).app"/>
                 <ProjectRoot Platform="iOSSimulator" Name="$(PROJECTNAME).app"/>
             </Deployment>
         </BorlandProject>
diff --git a/app/rtknavi/navimain.cpp b/app/rtknavi/navimain.cpp
index f1b0cfe..3a2413c 100644
--- a/app/rtknavi/navimain.cpp
+++ b/app/rtknavi/navimain.cpp
@@ -2613,6 +2613,10 @@ void __fastcall TMainForm::LoadOpt(void)
     TrkScale2       =ini->ReadInteger("setting","trkscale2",       5);
     TrkScale3       =ini->ReadInteger("setting","trkscale3",       5);
     TrkScale4       =ini->ReadInteger("setting","trkscale4",       5);
+    FreqType1       =ini->ReadInteger("setting","freqtype1",       0);
+    FreqType2       =ini->ReadInteger("setting","freqtype2",       0);
+    FreqType3       =ini->ReadInteger("setting","freqtype3",       0);
+    FreqType4       =ini->ReadInteger("setting","freqtype4",       0);
     BLMode1         =ini->ReadInteger("setting","blmode1",         0);
     BLMode2         =ini->ReadInteger("setting","blmode2",         0);
     BLMode3         =ini->ReadInteger("setting","blmode3",         0);
@@ -2867,6 +2871,10 @@ void __fastcall TMainForm::SaveOpt(void)
     ini->WriteInteger("setting","trkscale2",  TrkScale2          );
     ini->WriteInteger("setting","trkscale3",  TrkScale3          );
     ini->WriteInteger("setting","trkscale4",  TrkScale4          );
+    ini->WriteInteger("setting","freqtype1",  FreqType1          );
+    ini->WriteInteger("setting","freqtype2",  FreqType2          );
+    ini->WriteInteger("setting","freqtype3",  FreqType3          );
+    ini->WriteInteger("setting","freqtype4",  FreqType4          );
     ini->WriteInteger("setting","blmode1",    BLMode1            );
     ini->WriteInteger("setting","blmode2",    BLMode2            );
     ini->WriteInteger("setting","blmode3",    BLMode3            );
diff --git a/src/convrnx.c b/src/convrnx.c
index 2292cbd..f744973 100644
--- a/src/convrnx.c
+++ b/src/convrnx.c
@@ -547,7 +547,6 @@ static void update_halfc(halfc_t *halfc, obsd_t *obs)
     }
 }
 /* dump half-cycle ambiguity status ------------------------------------------*/
-#if 1
 static void dump_halfc(halfc_t *halfc)
 {
     halfd_t *p;
@@ -565,7 +564,6 @@ static void dump_halfc(halfc_t *halfc)
         }
     }
 }
-#endif
 /* resolve half-cycle ambiguity ----------------------------------------------*/
 static void resolve_halfc(halfc_t *halfc, obsd_t *obs)
 {
diff --git a/src/options.c b/src/options.c
index 104b559..b3737ba 100644
--- a/src/options.c
+++ b/src/options.c
@@ -40,7 +40,7 @@ static char snrmask_[NFREQ][1024];
 /* system options table ------------------------------------------------------*/
 #define SWTOPT  "0:off,1:on"
 #define MODOPT  "0:single,1:dgps,2:kinematic,3:static,4:static-start,5:movingbase,6:fixed,7:ppp-kine,8:ppp-static,9:ppp-fixed"
-#define FRQOPT  "1:l1,2:l1+l2,3:l1+l2+e5b,4:l1+l2+e5b+l5"
+#define FRQOPT  "1:l1,2:l1+l2,3:l1+l2+l5,4:l1+l2+l5+l6"
 #define TYPOPT  "0:forward,1:backward,2:combined"
 #define IONOPT  "0:off,1:brdc,2:sbas,3:dual-freq,4:est-stec,5:ionex-tec,6:qzs-brdc,7:qzs-lex,8:stec"
 #define TRPOPT  "0:off,1:saas,2:sbas,3:est-ztd,4:est-ztdgrad,5:ztd"
diff --git a/src/rcv/binex.c b/src/rcv/binex.c
index 0616244..afd9bff 100644
--- a/src/rcv/binex.c
+++ b/src/rcv/binex.c
@@ -1,7 +1,7 @@
 /*------------------------------------------------------------------------------
 * binex.c : binex dependent functions
 *
-*          Copyright (C) 2013-2017 by T.TAKASU, All rights reserved.
+*          Copyright (C) 2013-2019 by T.TAKASU, All rights reserved.
 *
 * reference :
 *     [1] UNAVCO, BINEX: Binary exchange format
@@ -627,7 +627,7 @@ static int decode_bnx_01_04(raw_t *raw, unsigned char *buff, int len)
     if (eph_sel==2&&!(eph.code&(1<<8))) return 0; /* only F/NAV */
     
     eph.A=sqrtA*sqrtA;
-    eph.iode=eph.iodc;
+    eph.iodc=eph.iode;
     eph.toe=gpst2time(eph.week,eph.toes);
     eph.toc=gpst2time(eph.week,eph.toes);
     eph.ttr=adjweek(eph.toe,tow);
@@ -983,6 +983,9 @@ static unsigned char *decode_bnx_7f_05_obs(raw_t *raw, unsigned char *buff,
             if      (freq[i]==5) freq[i]=2; /* B2 */
             else if (freq[i]==4) freq[i]=3; /* B3 */
         }
+        else if (sys==SYS_GAL) {
+            if (freq[i]==5) freq[i]=2; /* E5b */
+        }
     }
     for (i=0;i<NFREQ;i++) {
         for (j=0,k=-1;j<nobs;j++) {
diff --git a/src/rcv/javad.c b/src/rcv/javad.c
index e3eaf83..5f2a198 100644
--- a/src/rcv/javad.c
+++ b/src/rcv/javad.c
@@ -1,7 +1,7 @@
 /*------------------------------------------------------------------------------
 * javad.c : javad receiver dependent functions
 *
-*          Copyright (C) 2011-2018 by T.TAKASU, All rights reserved.
+*          Copyright (C) 2011-2019 by T.TAKASU, All rights reserved.
 *
 * reference :
 *     [1] Javad GNSS, GREIS GNSS Receiver External Interface Specification,
@@ -43,6 +43,7 @@
 *                           fix problem to set eph->code for beidou and galileo
 *                           fix bug on saving galileo bgd to ephemeris
 *                           add receiver option -GALINAV, -GALFNAV
+*           2019/05/10 1.15 save galileo E5b data to obs index 2
 *-----------------------------------------------------------------------------*/
 #include "rtklib.h"
 
@@ -107,7 +108,7 @@ static int tofreq(char sig, int sys, int *type)
     };
     const int freqs[7][6]={
         {1,1,2,2,3,1}, {1,1,4,2,3,1}, {1,0,0,0,3,0},     /* GPS,QZS,SBS */
-        {1,6,5,4,3,0}, {1,1,2,2,3,0}, {1,0,2,3,3,1},     /* GAL,GLO,BDS */
+        {1,6,2,4,3,0}, {1,1,2,2,3,0}, {1,0,2,3,3,1},     /* GAL,GLO,BDS */
         {0,0,0,0,3,0}                                    /* IRN */
     };
     int i,j;
@@ -183,6 +184,9 @@ static double freq_sys(int sys, int freq, int freqn)
         }
         return 0.0;
     }
+    else if (sys==SYS_GAL&&freq==1) { /* Galileo E5b */
+        return FREQE5b;
+    }
     else {
         return CLIGHT/lam_carr[freq];
     }
diff --git a/src/rcv/novatel.c b/src/rcv/novatel.c
index c182758..656a2cf 100644
--- a/src/rcv/novatel.c
+++ b/src/rcv/novatel.c
@@ -1,7 +1,7 @@
 /*------------------------------------------------------------------------------
-* notvatel.c : NovAtel OEM6/OEM5/OEM4 receiver functions
+* notvatel.c : NovAtel OEM6/OEM5/OEM4/OEM3 receiver functions
 *
-*          Copyright (C) 2007-2018 by T.TAKASU, All rights reserved.
+*          Copyright (C) 2007-2019 by T.TAKASU, All rights reserved.
 *
 * reference :
 *     [1] NovAtel, OM-20000094 Rev6 OEMV Family Firmware Reference Manual, 2008
@@ -54,6 +54,7 @@
 *           2018/10/10 1.16 fix problem on data souce for galileo ephemeris
 *                           output L2W instead of L2D for L2Pcodeless
 *                           test toc difference to output beidou ephemeris
+*           2019/05/10 1.17 save galileo E5b data to obs index 2
 *-----------------------------------------------------------------------------*/
 #include "rtklib.h"
 
@@ -219,7 +220,7 @@ static int decode_trackstat(unsigned int stat, int *sys, int *code, int *track,
             case  1: freq=0; *code=CODE_L1B; break; /* E1B  (OEM6) */
             case  2: freq=0; *code=CODE_L1C; break; /* E1C  (OEM6) */
             case 12: freq=2; *code=CODE_L5Q; break; /* E5aQ (OEM6) */
-            case 17: freq=4; *code=CODE_L7Q; break; /* E5bQ (OEM6) */
+            case 17: freq=1; *code=CODE_L7Q; break; /* E5bQ (OEM6) */
             case 20: freq=5; *code=CODE_L8Q; break; /* AltBOCQ (OEM6) */
             default: freq=-1; break;
         }
@@ -264,7 +265,6 @@ static int checkpri(const char *opt, int sys, int code, int freq)
     else if (sys==SYS_GAL) {
         if (strstr(opt,"-EL1B")&&freq==0) return code==CODE_L1B?0:-1;
         if (code==CODE_L1B) return nex<1?-1:NFREQ;
-        if (code==CODE_L7Q) return nex<2?-1:NFREQ+1;
         if (code==CODE_L8Q) return nex<3?-1:NFREQ+2;
     }
     return freq<NFREQ?freq:-1;
diff --git a/src/rcv/tersus.c b/src/rcv/tersus.c
index eeaec08..c75488c 100644
--- a/src/rcv/tersus.c
+++ b/src/rcv/tersus.c
@@ -1,14 +1,15 @@
 /*------------------------------------------------------------------------------
 * tersus.c : Tersus Precis receiver functions
 *
-*          Copyright (C) 2017 by T.TAKASU, All rights reserved.
+*          Copyright (C) 2017-2019 by T.TAKASU, All rights reserved.
 *
 * reference :
 *     [1] Tersus GNSS Inc., Command & Log Reference For Precis-BX306 & BX316
 *         GNSS RTK Board, Version V1.0-20170421
 *
 * version : $Revision:$ $Date:$
-* history : 2017/05/26 1.0 new
+* history : 2017/05/26 1.0  new
+*           2019/05/10 1.1  save galileo E5b data to obs index 2
 *-----------------------------------------------------------------------------*/
 #include "rtklib.h"
 
@@ -137,7 +138,7 @@ static int decode_trackstat(unsigned int stat, int *sys, int *code, int *track,
             case  1: freq=0; *code=CODE_L1B; break; /* E1B */
             case  2: freq=0; *code=CODE_L1C; break; /* E1C */
             case 12: freq=2; *code=CODE_L5Q; break; /* E5aQ */
-            case 17: freq=4; *code=CODE_L7Q; break; /* E5bQ */
+            case 17: freq=1; *code=CODE_L7Q; break; /* E5bQ */
             case 20: freq=5; *code=CODE_L8Q; break; /* AltBOCQ */
             default: freq=-1; break;
         }
@@ -183,7 +184,6 @@ static int checkpri(const char *opt, int sys, int code, int freq)
     else if (sys==SYS_GAL) {
         if (strstr(opt,"-EL1B")&&freq==0) return code==CODE_L1B?0:-1;
         if (code==CODE_L1B) return nex<1?-1:NFREQ;
-        if (code==CODE_L7Q) return nex<2?-1:NFREQ+1;
         if (code==CODE_L8Q) return nex<3?-1:NFREQ+2;
     }
     return freq<NFREQ?freq:-1;
diff --git a/src/rcv/ublox.c b/src/rcv/ublox.c
index d61765f..ffb0289 100644
--- a/src/rcv/ublox.c
+++ b/src/rcv/ublox.c
@@ -62,6 +62,9 @@
 *           2018/11/05 1.26 fix problem on missing QZSS L2C signal
 *                           save signal in obs data by signal index
 *                           suppress warning for cnav in ubx-rxm-sfrbx
+*           2019/05/10 1.27 disable half-cyc-subtract flag on LLI for RXM-RAWX
+*                           save galileo E5b data to obs index 2
+*                           handle C17 as no-GEO (MEO/IGSO)
 *-----------------------------------------------------------------------------*/
 #include "rtklib.h"
 
@@ -202,8 +205,8 @@ static int sig_idx(int sys, int code)
     else if (sys == SYS_GAL) {
         if (code==CODE_L1C) return 1;
         if (code==CODE_L1B) return 1;
-        if (code==CODE_L7Q) return 3;
-        if (code==CODE_L7I) return 3;
+        if (code==CODE_L7I) return 2; /* E5bI */
+        if (code==CODE_L7Q) return 2; /* E5bQ */
     }
     else if (sys == SYS_QZS) {
         if (code==CODE_L1C) return 1;
@@ -988,7 +991,7 @@ static int decode_cnav(raw_t *raw, int sat, int off)
         trace(2,"ubx rawsfrbx subfrm id error: sat=%2d\n",sat);
         return -1;
     }
-    if (prn>5&&prn!=17) { /* IGSO/MEO */
+    if (prn>5&&prn<59) { /* IGSO/MEO */
         
         for (i=0;i<10;i++) {
             setbitu(raw->subfrm[sat-1]+(id-1)*38,i*30,30,words[i]);
@@ -998,7 +1001,7 @@ static int decode_cnav(raw_t *raw, int sat, int off)
         /* decode beidou D1 ephemeris */
         if (!decode_bds_d1(raw->subfrm[sat-1],&eph)) return 0;
     }
-    else { /* GEO (C01-05,C17) */
+    else { /* GEO (C01-05, C59-63) */
         if (id!=1) return 0;
         
         /* subframe 1 */
diff --git a/src/rcvraw.c b/src/rcvraw.c
index 3ef9010..aad1d21 100644
--- a/src/rcvraw.c
+++ b/src/rcvraw.c
@@ -36,6 +36,7 @@
 *           2017/05/26 1.14 support TERSUS
 *           2018/10/10 1.15 update reference [5]
 *                           add set of eph->code/flag for galileo and beidou
+*           2018/12/05 1.16 add test of galileo i/nav word type 5
 *-----------------------------------------------------------------------------*/
 #include "rtklib.h"
 #include <stdint.h>
@@ -160,9 +161,9 @@ extern int decode_gal_inav(const unsigned char *buff, eph_t *eph)
     e1b_dvs    =getbitu(buff,i, 1);
     
     /* test word types */
-    if (type[0]!=0||type[1]!=1||type[2]!=2||type[3]!=3||type[4]!=4) {
-        trace(3,"decode_gal_inav error: type=%d %d %d %d %d\n",type[0],type[1],
-              type[2],type[3],type[4]);
+    if (type[0]!=0||type[1]!=1||type[2]!=2||type[3]!=3||type[4]!=4||type[5]!=5) {
+        trace(3,"decode_gal_inav error: type=%d %d %d %d %d %d\n",type[0],
+              type[1],type[2],type[3],type[4],type[5]);
         return 0;
     }
     /* test word type 0 time field */
diff --git a/src/rtcm3.c b/src/rtcm3.c
index 82801c6..195f0bc 100644
--- a/src/rtcm3.c
+++ b/src/rtcm3.c
@@ -1,7 +1,7 @@
 /*------------------------------------------------------------------------------
 * rtcm3.c : rtcm ver.3 message decorder functions
 *
-*          Copyright (C) 2009-2018 by T.TAKASU, All rights reserved.
+*          Copyright (C) 2009-2019 by T.TAKASU, All rights reserved.
 *
 * references :
 *     see rtcm.c
@@ -37,6 +37,7 @@
 *                           change mt for ssr 7 phase biases
 *                           add rtcm option -GALINAV, -GALFNAV
 *           2018/11/05 1.20 fix problem on invalid time in message monitor
+*           2019/05/10 1.21 save galileo E5b data to obs index 2
 *-----------------------------------------------------------------------------*/
 #include "rtklib.h"
 
@@ -1346,7 +1347,6 @@ static int decode_ssr2_head(rtcm_t *rtcm, int sys, int *sync, int *iod,
     *hsize=i;
     return nsat;
 }
-
 /* ssr signal and tracking mode ids ------------------------------------------*/
 static const int codes_gps[]={
     CODE_L1C,CODE_L1P,CODE_L1W,CODE_L1Y,CODE_L1M,CODE_L2C,CODE_L2D,CODE_L2S,
@@ -1824,6 +1824,14 @@ static void save_msm_obs(rtcm_t *rtcm, int sys, msm_h_t *h, const double *r,
         /* signal to rinex obs type */
         code[i]=obs2code(sys,sig[i],freq+i);
 
+        /* freqency index for beidou and galileo */
+        if (sys==SYS_CMP) {
+            if      (freq[i]==5) freq[i]=2; /* B2 */
+            else if (freq[i]==4) freq[i]=3; /* B3 */
+        }
+        else if (sys==SYS_GAL) {
+            if (freq[i]==5) freq[i]=2; /* E5b */
+        }
         if (code[i]!=CODE_NONE) {
             if (q) q+=sprintf(q,"L%s%s",sig[i],i<h->nsig-1?",":"");
         }
diff --git a/src/rtcm3e.c b/src/rtcm3e.c
index 7ffcb5e..ccedcde 100644
--- a/src/rtcm3e.c
+++ b/src/rtcm3e.c
@@ -1,7 +1,7 @@
 /*------------------------------------------------------------------------------
 * rtcm3e.c : rtcm ver.3 message encoder functions
 *
-*          Copyright (C) 2012-2018 by T.TAKASU, All rights reserved.
+*          Copyright (C) 2012-2019 by T.TAKASU, All rights reserved.
 *
 * references :
 *     see rtcm.c
@@ -34,6 +34,7 @@
 *           2017/04/11 1.16 fix bug on gst-week in MT1045/1046
 *           2018/10/10 1.17 merge changes for 2.4.2 p13
 *                           change mt for ssr 7 phase biases
+*           2019/05/10 1.21 save galileo E5b data to obs index 2
 *-----------------------------------------------------------------------------*/
 #include "rtklib.h"
 
@@ -1771,11 +1772,14 @@ static int to_sigid(int sys, unsigned char code, int *freq)
         case SYS_CMP: msm_sig=msm_sig_cmp; break;
         default: return 0;
     }
-    /* freqency index for beidou */
+    /* freqency index for beidou and galileo */
     if (sys==SYS_CMP) {
         if      (*freq==5) *freq=2; /* B2 */
         else if (*freq==4) *freq=3; /* B3 */
     }
+    else if (sys==SYS_GAL) {
+        if (*freq==5) *freq=2; /* E5b */
+    }
     for (i=0;i<32;i++) {
         if (!strcmp(sig,msm_sig[i])) return i+1;
     }
diff --git a/src/rtkcmn.c b/src/rtkcmn.c
index edb1c86..d2d0e9c 100644
--- a/src/rtkcmn.c
+++ b/src/rtkcmn.c
@@ -16,8 +16,6 @@
 *     [1] IS-GPS-200D, Navstar GPS Space Segment/Navigation User Interfaces,
 *         7 March, 2006
 *     [2] RTCA/DO-229C, Minimum operational performanc standards for global
-*         positioning system/wide area augmentation system airborne equipment,
-*         RTCA inc, November 28, 2001
 *     [3] M.Rothacher, R.Schmid, ANTEX: The Antenna Exchange Format Version 1.4,
 *         15 September, 2010
 *     [4] A.Gelb ed., Applied Optimal Estimation, The M.I.T Press, 1974
@@ -253,14 +251,15 @@ static char *obscodes[]={       /* observation code strings */
     "5B","5C","9A","9B","9C", "9X",""  ,""  ,""  ,""    /* 50-59 */
 };
 static unsigned char obsfreqs[]={
-    /* 1:L1/E1, 2:L2, 3:E5b, 4:L5/E5a/L3, 5:E6/LEX, 6:E5(a+b), 7:S */
+    /* 1:L1/E1, 2:L2/E5b, 3:L5/E5a/L3, 4:E6/LEX, 5:E5(a+b), 6:S */
     0, 1, 1, 1, 1,  1, 1, 1, 1, 1, /*  0- 9 */
     1, 1, 1, 1, 2,  2, 2, 2, 2, 2, /* 10-19 */
-    2, 2, 2, 2, 4,  4, 4, 3, 3, 3, /* 20-29 */
+    2, 2, 2, 2, 3,  3, 3, 2, 2, 2, /* 20-29 */
     5, 5, 5, 5, 5,  5, 5, 6, 6, 6, /* 30-39 */
     1, 1, 3, 3, 4,  4, 4, 1, 1, 4, /* 40-49 */
     4, 4, 7, 7, 7,  7, 0, 0, 0, 0  /* 50-59 */
 };
+
 static unsigned char obsfreqs_cmp[]={
     /* 1:B1, 2:B2, 3:B3 */
     0, 1, 1, 1, 1,  1, 1, 1, 1, 1, /*  0- 9 */
@@ -3389,7 +3388,7 @@ extern double satwavelen(int sat, int frq, const nav_t *nav)
     int i,sys=satsys(sat,NULL);
     
     if (sys==SYS_GLO) {
-        if (0<=frq&&frq<=1) {
+        if (0<=frq&&frq<=1) { /* L1,L2 */
             for (i=0;i<nav->ng;i++) {
                 if (nav->geph[i].sat!=sat) continue;
                 return CLIGHT/(freq_glo[frq]+dfrq_glo[frq]*nav->geph[i].frq);
@@ -3404,13 +3403,18 @@ extern double satwavelen(int sat, int frq, const nav_t *nav)
         else if (frq==1) return CLIGHT/FREQ2_CMP; /* B2 */
         else if (frq==2) return CLIGHT/FREQ3_CMP; /* B3 */
     }
-    else {
-        if      (frq==0) return CLIGHT/FREQL1; /* L1/E1 */
+    else if (sys==SYS_GAL) {
+        if      (frq==0) return CLIGHT/FREQL1; /* E1 */
+        else if (frq==1) return CLIGHT/FREQE5b; /* E5b */
+        else if (frq==2) return CLIGHT/FREQL5; /* E5a */
+        else if (frq==3) return CLIGHT/FREQE6; /* E6 */
+        else if (frq==5) return CLIGHT/FREQE5ab; /* E5ab */
+    }
+    else { /* GPS,QZS */
+        if      (frq==0) return CLIGHT/FREQL1; /* L1 */
         else if (frq==1) return CLIGHT/FREQL2; /* L2 */
-        else if (frq==2) return CLIGHT/FREQE5b; /* E5b */
-        else if (frq==3) return CLIGHT/FREQL5; /* L5/E5a */
-        else if (frq==4) return CLIGHT/FREQE6; /* L6/LEX */
-        else if (frq==5) return CLIGHT/FREQE5ab; /* E5a+b */
+        else if (frq==2) return CLIGHT/FREQL5; /* L5 */
+        else if (frq==3) return CLIGHT/FREQE6; /* L6/LEX */
         else if (frq==6) return CLIGHT/FREQs; /* S */
     }
     return 0.0;
diff --git a/src/rtklib.h b/src/rtklib.h
index 5ebb6b0..2abdfe5 100644
--- a/src/rtklib.h
+++ b/src/rtklib.h
@@ -1,7 +1,7 @@
 /*------------------------------------------------------------------------------
 * rtklib.h : rtklib constants, types and function prototypes
 *
-*          Copyright (C) 2007-2016 by T.TAKASU, All rights reserved.
+*          Copyright (C) 2007-2019 by T.TAKASU, All rights reserved.
 *
 * options : -DENAGLO   enable GLONASS
 *           -DENAGAL   enable Galileo
@@ -58,10 +58,10 @@ extern "C" {
 
 #define VER_RTKLIB  "demo5"             /* library version */
 
-#define PATCH_LEVEL "b31a"               /* patch level */
+#define PATCH_LEVEL "b32"               /* patch level */
 
 #define COPYRIGHT_RTKLIB \
-            "Copyright (C) 2007-2018 T.Takasu\nAll rights reserved."
+            "Copyright (C) 2007-2019 T.Takasu\nAll rights reserved."
 
 #define PI          3.1415926535897932  /* pi */
 #define D2R         (PI/180.0)          /* deg to rad */
@@ -80,13 +80,13 @@ extern "C" {
 
 #define MAXFREQ     7                   /* max NFREQ */
 
-#define FREQL1      1.57542E9           /* L1/E1  frequency 1 (Hz) */
-#define FREQL2      1.22760E9           /* L2     frequency 2 (Hz) */
-#define FREQE5b      1.20714E9          /* E5b    frequency 3 (Hz) */
-#define FREQL5      1.17645E9           /* L5/E5a frequency 4 (Hz) */
-#define FREQE6      1.27875E9           /* E6/LEX frequency 5 (Hz) */
-#define FREQE5ab    1.191795E9          /* E5a+b  frequency 6 (Hz) */
-#define FREQs       2.492028E9           /* S      frequency 7 (Hz) */
+#define FREQL1      1.57542E9           /* L1/E1/B1  frequency (Hz) */
+#define FREQL2      1.22760E9           /* L2     frequency (Hz) */
+#define FREQE5b     1.20714E9           /* E5b    frequency (Hz) */
+#define FREQL5      1.17645E9           /* L5/E5a frequency (Hz) */
+#define FREQE6      1.27875E9           /* E6/LEX frequency (Hz) */
+#define FREQE5ab    1.191795E9          /* E5a+b/B2  frequency (Hz) */
+#define FREQs       2.492028E9           /* S      frequency (Hz) */
 #define FREQ1_GLO   1.60200E9           /* GLONASS G1 base frequency (Hz) */
 #define DFRQ1_GLO   0.56250E6           /* GLONASS G1 bias frequency (Hz/n) */
 #define FREQ2_GLO   1.24600E9           /* GLONASS G2 base frequency (Hz) */
@@ -176,7 +176,7 @@ extern "C" {
 #endif
 #ifdef ENACMP
 #define MINPRNCMP   1                   /* min satellite sat number of BeiDou */
-#define MAXPRNCMP   35                  /* max satellite sat number of BeiDou */
+#define MAXPRNCMP   37                  /* max satellite sat number of BeiDou */
 #define NSATCMP     (MAXPRNCMP-MINPRNCMP+1) /* number of BeiDou satellites */
 #define NSYSCMP     1
 #else
@@ -272,12 +272,11 @@ extern "C" {
 #define OBSTYPE_ALL 0xFF                /* observation type: all */
 
 #define FREQTYPE_L1 0x01                /* frequency type: L1/E1 */
-#define FREQTYPE_L2 0x02                /* frequency type: L2/B1 */
-#define FREQTYPE_E5b 0x04               /* frequency type: E5b/B2 */
-#define FREQTYPE_L5 0x08                /* frequency type: L5/E5a/L3 */
-#define FREQTYPE_E6 0x10                /* frequency type: E6/LEX/B3 */
-#define FREQTYPE_E5ab 0x20              /* frequency type: E5(a+b) */
-#define FREQTYPE_S 0x40                 /* frequency type: S */
+#define FREQTYPE_L2 0x02                /* frequency type: L2/B1/E5b */
+#define FREQTYPE_L5 0x04                /* frequency type: L5/E5a/L3 */
+#define FREQTYPE_E6 0x08                /* frequency type: E6/LEX/B3 */
+#define FREQTYPE_E5ab 0x10              /* frequency type: E5(a+b) */
+#define FREQTYPE_S 0x20                 /* frequency type: S */
 #define FREQTYPE_ALL 0xFF               /* frequency type: all */
 
 #define CODE_NONE   0                   /* obs code: none or unknown */
@@ -1064,7 +1063,7 @@ typedef struct {        /* SNR mask type */
 typedef struct {        /* processing options type */
     int mode;           /* positioning mode (PMODE_???) */
     int soltype;        /* solution type (0:forward,1:backward,2:combined) */
-    int nf;             /* number of frequencies (1:L1,2:L1+L2,3:L1+L2+E5b,4:L1+L2+E5b+L5) */
+    int nf;             /* number of frequencies (1:L1,2:L1+L2,3:L1+L2+L3,4:L1+L2+L3+L4) */
     int navsys;         /* navigation system */
     double elmin;       /* elevation mask angle (rad) */
     snrmask_t snrmask;  /* SNR mask */
diff --git a/src/rtkpos.c b/src/rtkpos.c
index c2f38ef..bfd77e9 100644
--- a/src/rtkpos.c
+++ b/src/rtkpos.c
@@ -40,6 +40,7 @@
 *                           fix bug on slip detection of backward filter
 *           2016/08/20 1.22 fix bug on ddres() function
 *           2018/10/10 1.13 support api change of satexclude()
+*           2018/12/15 1.14 disable ambiguity resolution for gps-qzss
 *-----------------------------------------------------------------------------*/
 #include <stdarg.h>
 #include "rtklib.h"
@@ -1174,16 +1175,16 @@ static double gloicbcorr(int sat1, int sat2, const prcopt_t *opt, double lam1,
     
     return opt->exterr.gloicb[f]*0.01*dfreq; /* (m) */
 }
-/* test navi system (m=0:gps/qzs/sbs,1:glo,2:gal,3:bds) ----------------------*/
+/* test navi system (m=0:gps/sbs,1:glo,2:gal,3:bds,4:qzs) --------------------*/
 static int test_sys(int sys, int m)
 {
     switch (sys) {
         case SYS_GPS: return m==0;
-        case SYS_QZS: return m==0;
         case SYS_SBS: return m==0;
         case SYS_GLO: return m==1;
         case SYS_GAL: return m==2;
         case SYS_CMP: return m==3;
+        case SYS_QZS: return m==4;
     }
     return 0;
 }
@@ -1244,8 +1245,8 @@ static int ddres(rtk_t *rtk, const nav_t *nav, const obsd_t *obs, double dt, con
             tropr[i]=prectrop(rtk->sol.time,posr,1,azel+ir[i]*2,opt,x,dtdxr+i*3);
         }
     }
-    /* step through sat systems: m=0:gps/qzs/sbs,1:glo,2:gal,3:bds */
-    for (m=0;m<4;m++) { 
+    /* step through sat systems: m=0:gps/sbs,1:glo,2:gal,3:bds 4:qzs*/
+    for (m=0;m<5;m++) { 
 
         /* step through phases/codes */
         for (f=opt->mode>PMODE_DGPS?0:nf;f<nf*2;f++) {
@@ -1489,7 +1490,7 @@ static int ddmat(rtk_t *rtk, double *D,int gps,int glo,int sbs)
     /* set diaganol elements for all non sat phase-bias states */
     for (i=0;i<na;i++) D[i+i*nx]=1.0;
     
-    for (m=0;m<4;m++) { /* m=0:gps/qzs/sbs,1:glo,2:gal,3:bds */
+    for (m=0;m<5;m++) { /* m=0:gps/sbs,1:glo,2:gal,3:bds,4:qzs */
         
         /* skip if ambiguity resolution turned off for this sys */
         nofix=(m==0&&gps==0)||(m==1&&glo==0)||(m==3&&rtk->opt.bdsmodear==0);        
@@ -1555,7 +1556,7 @@ static void restamb(rtk_t *rtk, const double *bias, int nb, double *xa)
     for (i=0;i<rtk->nx;i++) xa[i]=rtk->x [i];  /* init all fixed states to float state values */
     for (i=0;i<rtk->na;i++) xa[i]=rtk->xa[i];  /* overwrite non phase-bias states with fixed values */
     
-    for (m=0;m<4;m++) for (f=0;f<nf;f++) {
+    for (m=0;m<5;m++) for (f=0;f<nf;f++) {
         
         for (n=i=0;i<MAXSAT;i++) {
             if (!test_sys(rtk->ssat[i].sys,m)||rtk->ssat[i].fix[f]!=2) {
@@ -1583,7 +1584,7 @@ static void holdamb(rtk_t *rtk, const double *xa)
     
     v=mat(nb,1); H=zeros(nb,rtk->nx);
     
-    for (m=0;m<4;m++) for (f=0;f<nf;f++) {
+    for (m=0;m<5;m++) for (f=0;f<nf;f++) {
         
         for (n=i=0;i<MAXSAT;i++) {
             if (!test_sys(rtk->ssat[i].sys,m)||rtk->ssat[i].fix[f]!=2||
diff --git a/src/solution.c b/src/solution.c
index 5fc7a64..d079651 100644
--- a/src/solution.c
+++ b/src/solution.c
@@ -1477,7 +1477,7 @@ extern int outprcopts(unsigned char *buff, const prcopt_t *opt)
     const int sys[]={SYS_GPS,SYS_GLO,SYS_GAL,SYS_QZS,SYS_CMP,SYS_IRN,SYS_SBS,0};
     const char *s1[]={"single","dgps","kinematic","static","static-start","moving-base","fixed",
                  "ppp-kinematic","ppp-static","ppp-fixed",""};
-    const char *s2[]={"L1","L1+L2","L1+L2+E5b","L1+L2+E5b+L5"};
+    const char *s2[]={"L1","L1+L2","L1+L2+L5","L1+L2+L5+L6"};
     const char *s3[]={"forward","backward","combined"};
     const char *s4[]={"off","broadcast","sbas","iono-free","estimation",
                       "ionex tec","qzs","lex","vtec_sf","vtec_ef","gtec",""};
diff --git a/src/stream.c b/src/stream.c
index be01516..6452f59 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -1,7 +1,7 @@
 /*------------------------------------------------------------------------------
 * stream.c : stream input/output functions
 *
-*          Copyright (C) 2008-2018 by T.TAKASU, All rights reserved.
+*          Copyright (C) 2008-2019 by T.TAKASU, All rights reserved.
 *
 * options : -DWIN32    use WIN32 API
 *           -DSVR_REUSEADDR reuse tcp server address
@@ -62,6 +62,7 @@
 *                           fix bug on file playback as slave mode
 *                           fix bug on timeset() in gpst instead of utc
 *                           update trace levels and buffer sizes
+*           2019/05/10 1.27 fix bug on dropping message on tcp stream (#144)
 *-----------------------------------------------------------------------------*/
 #include <ctype.h>
 #include "rtklib.h"
@@ -1246,7 +1247,6 @@ static int readtcpsvr(tcpsvr_t *tcpsvr, unsigned char *buff, int n, char *msg)
             }
             discontcp(&tcpsvr->cli[i],ticonnect);
             updatetcpsvr(tcpsvr,msg);
-            return 0;
         }
         if (nr>0) {
             tcpsvr->cli[i].tact=tickget();
@@ -1274,7 +1274,6 @@ static int writetcpsvr(tcpsvr_t *tcpsvr, unsigned char *buff, int n, char *msg)
             }
             discontcp(&tcpsvr->cli[i],ticonnect);
             updatetcpsvr(tcpsvr,msg);
-            return 0;
         }
         if (ns>0) tcpsvr->cli[i].tact=tickget();
     }
-- 
GitLab