#include
#include
#include
#include
#include
using namespace std;
The class Nread_head
{
Public:
QString PINEX_VERSION;
};
The class Nread_data
{
Public:
Int PRN.
Double year;
Double the month;
Double day;
Double hour;
Double minute;
Double second;
Double A0;
Double A1.//satellite clock drift
Double A2;//satellite drift velocity
//radio orbit - 1
Double IODE.
Double Crs.
Double n;
Double M0.
//radio -
2Double Cuc;
Double e;
Double Cus.
Double sqrt_A;
//radio orbit - 3
Double TOE;
Double Cic;
Double OMEGA;
Double Cis;
//radio orbit - 4
Double i0;
Double Crc;
Double omegad;
Double OMEGA_DOT;
//radio orbit - 5
Double I;
Double L2;
Double GPS;
Double L2P;
//radio orbit - 6
Double jingdu;
Double health;
Double TGD.
Double IODC;
//radio orbit - 7
Double sendtime.//message sending time
Double h;//fitting range
};
The class Nfile_vector
{
Public:
QVector & lt; QVector
Nfile_vector ()
{
This - & gt; Nfile_ve. Resize (33);//adjust the container size for 33
}
};
The class Nfile_record
{
Public:
Nfile_vector Nfile_vector1;
Void put_txt_toDate ();
//void put_txt_toHead ();
};
/* void Nfile_record: : put_txt_toHead ()
{
Nread_head head1;
QFile file (" E: \ \ bbdy3000.11 n ");
if(! The file open (QIODevice: : ReadOnly | QIODevice: : Text))
{
Cout<& lt;" Fail to open the file "& lt;
QTextStream read_fromN (& amp; The file);
int i=1;
Do
{
QString STR=read_fromN. ReadLine ();
If (STR. IndexOf (" RINEX VERSION ") & gt; 0)
{
i=1;
}
} while (I==0);
} */
Void Nfile_record: : put_txt_toDate ()
{
QFile file (" E: \ \ bbdy3000.11 n ");
if(! The file open (QIODevice: : ReadOnly | QIODevice: : Text))
{
Cout<& lt;" Fail to open the file "& lt;
}
QTextStream read_fromN (& amp; The file);
QString STR.
Nread_data date1.
int i=0;
Do
{
QString STR=read_fromN. ReadLine ();
If (STR. IndexOf (" the END OF the HEADER ") & gt; 0)
{
i=1;
}
} while (I==0);
While ((STR=read_fromN readLine ())!="")
{
//read PRN/epoch/star power clock
Date1. PRN=STR. Mid (0, 2). The toInt ();
Date1. Year=STR. Mid (3, 2) toInt ();
Date1. The month=STR. Mid (6, 2) toInt ();
Date1. Day=STR. Mid (9, 2) toInt ();
Date1. Hour=STR. Mid (12, 13) toInt ();
Date1. Minute=STR. Mid (15.2), toInt ();
Date1. Second=STR. Mid (17, 5). ToDouble ();
Date1. A0=(STR) mid (22 (9) + "e" + STR. The mids (38, 3)). ToDouble ();
Date1. A1=(STR. Mid (41 (9) + "e" + STR. The mids (57, 3)). ToDouble ();
Date1. A2=(STR. Mid (60 (9) + "e" + STR. The mids (76, 3)). ToDouble ();
//read orbit a
STR=read_fromN. ReadLine ();
Date1. IODE=(STR) mid (3, 2) + "e" + STR. The mids (19, 3)). ToDouble ();
Date1. Crs=(STR) mid (22 (9) + "e" + STR. The mids (38, 3)). ToDouble ();
Date1. N=(STR. Mid (41 (9) + "e" + STR. The mids (57, 3)). ToDouble ();
Date1. M0=(STR. Mid (60 (9) + "e" + STR. The mids (76, 3)). ToDouble ();
//read track 2
STR=read_fromN. ReadLine ();
Date1. Cuc=(STR) mid (3, 2) + "e" + STR. The mids (19, 3)). ToDouble ();
Date1. E=(STR) mid (22 (9) + "e" + STR. The mids (38, 3)). ToDouble ();
Date1. Cus=(STR. Mid (41 (9) + "e" + STR. The mids (57, 3)). ToDouble ();
Date1. Sqrt_A=(STR. Mid (60 (9) + "e" + STR. The mids (76, 3)). ToDouble ();
//read track three
STR=read_fromN. ReadLine ();
Date1. TOE=(STR) mid (3, 2) + "e" + STR. The mids (19, 3)). ToDouble ();
Date1. Cic=(STR) mid (22 (9) + "e" + STR. The mids (39, 3)). ToDouble ();
Date1. OMEGA=(STR. Mid (41 (9) + "e" + STR. The mids (57, 3)). ToDouble ();
Date1. Cis=(STR. Mid (60 (9) + "e" + STR. The mids (76, 3)). ToDouble ();
//read track four
STR=read_fromN. ReadLine ();
Date1. I0=(STR) mid (3, 2) + "e" + STR. The mids (19, 3)). ToDouble ();
Date1. Cic=(STR) mid (22 (9) + "e" + STR. The mids (38, 3)). ToDouble ();
Date1. Omegad=(STR. Mid (41 (9) + "e" + STR. The mids (57, 3)). ToDouble ();
Date1. OMEGA_DOT=(STR. Mid (60 (9) + "e" + STR. The mids (76, 3)). ToDouble ();
//read orbit five
STR=read_fromN. ReadLine ();
Date1. I=(STR) mid (3, 2) + "e" + STR. The mids (19, 3)). ToDouble ();
Date1. L2=(STR) mid (22 (9) + "e" + STR. The mids (38, 3)). ToDouble ();
Date1. GPS=(STR. Mid (41 (9) + "e" + STR. The mids (57, 3)). ToDouble ();
Date1. L2P=(STR. Mid (60 (9) + "e" + STR. The mids (76, 3)). ToDouble ();
//read orbit.
STR=read_fromN. ReadLine ();
Date1. Jingdu=(STR) mid (3, 2) + "e" + STR. The mids (19, 3)). ToDouble ();
Date1. Health=(STR) mid (22 (9) + "e" + STR. The mids (38, 3)). ToDouble ();
Date1. TGD=(STR. Mid (41 (9) + "e" + STR. The mids (57, 3)). ToDouble ();
Date1. IODC=(STR. Mid (60 (9) + "e" + STR. The mids (76, 3)). ToDouble ();
//read orbit.
STR=read_fromN. ReadLine ();
Date1. Sendtime=(STR) mid (3, 2) + "e" + STR. The mids (19, 3)). ToDouble ();
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull