Index: /trunk/BNS/bnseph.cpp
===================================================================
--- /trunk/BNS/bnseph.cpp	(revision 770)
+++ /trunk/BNS/bnseph.cpp	(revision 771)
@@ -55,6 +55,5 @@
     while (true) {
       if (_socket->canReadLine()) {
-        QByteArray line = _socket->readLine();
-        cout << line.data();
+        readEph();
       }
       else {
@@ -65,2 +64,50 @@
 }
 
+// Read One Ephemeris 
+////////////////////////////////////////////////////////////////////////////
+void t_bnseph::readEph() {
+
+  gpsephemeris* ep = new gpsephemeris;
+
+  QByteArray line = _socket->readLine();
+  QTextStream in1(line);
+
+  QString prn;
+  int     year, month, day, hour, minute, second;
+
+  in1 >> prn >> year >> month >> day >> hour >> minute >> second
+      >> ep->clock_bias >> ep->clock_drift >> ep->clock_driftrate;
+
+  line = _socket->readLine();
+  QTextStream in2(line);
+  in2 >> ep->IODE >> ep->Crs >> ep->Delta_n >> ep->M0;
+
+  line = _socket->readLine();
+  QTextStream in3(line);
+  in3 >> ep->Cuc >> ep->e >> ep->Cus >> ep->sqrt_A;
+
+  line = _socket->readLine();
+  QTextStream in4(line);
+  in4 >> ep->TOE >> ep->Cic >> ep->OMEGA0 >> ep->Cis;
+
+  line = _socket->readLine();
+  QTextStream in5(line);
+  in5 >> ep->i0 >> ep->Crc >> ep->omega >> ep->OMEGADOT;
+
+  line = _socket->readLine();
+  QTextStream in6(line);
+
+  double dd;
+  int    ii;
+  in6 >>  ep->IDOT >> dd >> ep->GPSweek >> ii;
+
+  line = _socket->readLine();
+  QTextStream in7(line);
+
+  double hlp;
+  in7 >>  hlp >> ep->SVhealth >> ep->TGD >> ep->IODC;
+
+  line = _socket->readLine();
+  QTextStream in8(line);
+  in8 >> ep->TOW;
+}
Index: /trunk/BNS/bnseph.h
===================================================================
--- /trunk/BNS/bnseph.h	(revision 770)
+++ /trunk/BNS/bnseph.h	(revision 771)
@@ -4,4 +4,36 @@
 #include <QThread>
 #include <QtNetwork>
+
+struct gpsephemeris {
+  int    flags;            /* GPSEPHF_xxx */
+  int    satellite;        /*  SV ID   ICD-GPS data position */
+  int    IODE;             /*          [s2w3b01-08]              */
+  int    URAindex;         /*  [1..15] [s1w3b13-16]              */
+  int    SVhealth;         /*          [s1w3b17-22]              */
+  int    GPSweek;          /*          [s1w3b01-10]              */
+  int    IODC;             /*          [s1w3b23-32,w8b01-08]     */
+  int    TOW;              /*  [s]     [s1w2b01-17]              */
+  int    TOC;              /*  [s]     [s1w8b09-24]              */
+  int    TOE;              /*  [s]     [s2w10b1-16]              */
+  double clock_bias;       /*  [s]     [s1w10b1-22, af0]         */
+  double clock_drift;      /*  [s/s]   [s1w9b09-24, af1]         */
+  double clock_driftrate;  /*  [s/s^2] [s1w9b01-08, af2]         */
+  double Crs;              /*  [m]     [s2w3b09-24]              */
+  double Delta_n;          /*  [rad/s] [s2w4b01-16 * Pi]         */
+  double M0;               /*  [rad]   [s2w4b17-24,w5b01-24 * Pi]*/
+  double Cuc;              /*  [rad]   [s2w6b01-16]              */
+  double e;                /*          [s2w6b17-24,w6b01-24]     */
+  double Cus;              /*  [rad]   [s2w8b01-16]              */
+  double sqrt_A;           /*  [m^0.5] [s2w8b16-24,w9b01-24]     */
+  double Cic;              /*  [rad]   [s3w3b01-16]              */
+  double OMEGA0;           /*  [rad]   [s3w3b17-24,w4b01-24 * Pi]*/
+  double Cis;              /*  [rad]   [s3w5b01-16]              */
+  double i0;               /*  [rad]   [s3w5b17-24,w6b01-24 * Pi]*/
+  double Crc;              /*  [m]     [s3w701-16]               */
+  double omega;            /*  [rad]   [s3w7b17-24,w8b01-24 * Pi]*/
+  double OMEGADOT;         /*  [rad/s] [s3w9b01-24 * Pi]         */
+  double IDOT;             /*  [rad/s] [s3w10b9-22 * Pi]         */
+  double TGD;              /*  [s]     [s1w7b17-24]              */
+};
 
 class t_bnseph : public QThread {
@@ -17,4 +49,5 @@
  
  private:
+  void readEph();
   QTcpSocket* _socket;
 };
