Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use of COD sp3 files #19

Open
LucaFibbi opened this issue Apr 21, 2020 · 1 comment
Open

use of COD sp3 files #19

LucaFibbi opened this issue Apr 21, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@LucaFibbi
Copy link
Collaborator

To compile on my platform (Ubuntu 18.04) I had to modify the code like this:

diff --git a/QtMyTest.cpp b/QtMyTest.cpp
--- a/QtMyTest.cpp
+++ b/QtMyTest.cpp
@@ -44,7 +44,7 @@ void testSplash()
 #ifdef _WIN32
         #include <windows.h>
         Sleep(1000);
-#elif
+#else
         sleep(1000);
 #endif
     }
@@ -87,7 +87,11 @@ void testFtpClient()
     for(int i = 0;i < 0;i++)
     {
         m_FtpClient.pushData2Http("http://127.0.0.1/testJSON.php", "{\"firstName\": \"Gongwei\", \"lastName\": \"Xiao\"}");
+#ifdef _WIN32
         Sleep(1000);
+#else
+       sleep(1000);
+#endif
     }
 
     int a = 0;

For use the program I had to modify the code like this:

diff --git a/main.cpp b/main.cpp
--- a/main.cpp
+++ b/main.cpp
@@ -10,7 +10,7 @@
 int main(int argc, char *argv[])
 {
     QApplication a(argc, argv);
-    testMain();// test some classes and functions
+    //testMain();// test some classes and functions
 
     MainWindow wnd;
     wnd.show();

Two subsequent sp3 files product of CODE centre have an epoch equal:
the last of first file and the first of second file. This produce an
problem in the program that it not find the correct epoch at boundary
of the files. To overcome the problem I made the following change:

diff --git a/QReadSP3.cpp b/QReadSP3.cpp
--- a/QReadSP3.cpp
+++ b/QReadSP3.cpp
@@ -260,7 +260,10 @@ void QReadSP3::readFileData2Vec(QStringList SP3FileNames)
                                }
                                tempLine = sp3file.readLine();//Read a row of coordinate data
                        }
-                       m_allEpochData.append(epochData);//Save a file data
+                        if (!m_allEpochData.empty() && m_allEpochData.back().GPSTime == epochData.GPSTime)
+                               m_allEpochData.back() = epochData;//Replace equal GPSTime data
+                       else
+                               m_allEpochData.append(epochData);//Save a file data
                }//End of reading file
                sp3file.close();
        }//for (int i = 0;i < SP3FileNames.length();i++)//Read multiple files at the end

I attach a test case with sp3 and clk CODE files.
test_data.zip

In the this test case the station geno have:
C 8 C2I L2I D2I S2I C7I L7I D7I S7I
observations for BeiDou costellation.
With the change from 2-7-6 to 2-6-7 in frequences selection the BeiDou observations
not are most used.

@XiaoGongWei
Copy link
Owner

Dear LucaFibbi,
Thank you for your contribution to MG-APP. These questions are very important, thank you again.
Some observaion type mybe missing in BDS (SYS / # / OBS TYPES in RINEX). so, I use C1I replace C2I, C7I replace C6I.
Below is detaill code. I have updated MG-APP according to your question.

QReadFile::ProcesCLPos: 583

else if(epochSystem.SatType.contains("C", Qt::CaseInsensitive))
{// BDS 1 7 6 or 2
// "2" -> "6" -> "7" is for BDS-III
frqenceStr[0] = "2"; frqenceStr[1] = "6"; frqenceStr[2] = "7"; frqenceStr[3] = "1";
prioLen = 3;
prioArry[0] = "I"; prioArry[1] = "Q"; prioArry[2] = "X";
}

QReadFile::ProcesCLPos: 643
// if BDS
if(epochSystem.SatType.contains("C", Qt::CaseInsensitive))
{
QString C1i = "C" + frqenceStr[3] + prioArry[i], L1i = "L" + frqenceStr[3] + prioArry[i];
QString C2i = "C" + frqenceStr[2] + prioArry[i], L2i = "L" + frqenceStr[2] + prioArry[i];
int tempPos1 = -1, tempPos2 = -1;
// If C1I is missing, use C2I instead
// C1 L1
tempPos1 = obsType.indexOf(C1i);// find pos of C1P etc
tempPos2 = obsType.indexOf(L1i);// find pos of L1P etc
if(tempPos1 != -1 && tempPos2 != -1)
{
ObsTypePos.C1Type.append(C1i);
ObsTypePos.C1Pos.append(tempPos1);
// L1
ObsTypePos.L1Type.append(L1i);
ObsTypePos.L1Pos.append(tempPos2);
}
// If C6I is missing, use C7I instead
// C2 L2
tempPos1 = obsType.indexOf(C2i);// find pos of C2P etc
tempPos2 = obsType.indexOf(L2i);// find pos of L2P etc
if(tempPos1 != -1 && tempPos2 != -1)
{
ObsTypePos.C2Type.append(C2i);
ObsTypePos.C2Pos.append(tempPos1);
// L2
ObsTypePos.L2Type.append(L2i);
ObsTypePos.L2Pos.append(tempPos2);
}
}

@XiaoGongWei XiaoGongWei added the bug Something isn't working label Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants