Changeset 1305 in ntrip


Ignore:
Timestamp:
Dec 19, 2008, 11:19:41 AM (15 years ago)
Author:
mervart
Message:

* empty log message *

Location:
trunk/BNC
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM3/clock_orbit_rtcm.c

    r1207 r1305  
    33        Name:           clock_orbit_rtcm.c
    44        Project:        RTCM3
    5         Version:        $Id: clock_orbit_rtcm.c,v 1.3 2008/08/15 16:29:40 weber Exp $
     5        Version:        $Id: clock_orbit_rtcm.c,v 1.4.2.3 2008/12/19 09:29:13 mervart Exp $
    66        Authors:        Dirk Stöcker
    77        Description:    state space approach for RTCM3
     
    1010#include <stdio.h>
    1111#include <string.h>
     12
     13#ifndef sparc
    1214#include <stdint.h>
     15#endif
     16
     17#include <sys/types.h>
    1318#include "clock_orbit_rtcm.h"
    1419
  • trunk/BNC/RTCM3/rtcm3torinex.c

    r1278 r1305  
    11/*
    22  Converter for RTCM3 data to RINEX.
    3   $Id: rtcm3torinex.c,v 1.36 2008/12/03 08:33:16 stoecker Exp $
     3  $Id: rtcm3torinex.c,v 1.21.2.1 2008/12/18 12:45:53 mervart Exp $
    44  Copyright (C) 2005-2008 by Dirk Stöcker <stoecker@alberding.eu>
    55
     
    4848#endif
    4949
     50#ifndef isinf
     51#  define isinf(x) 0
     52#endif
     53
    5054#include "rtcm3torinex.h"
    5155
    5256/* CVS revision and version */
    53 static char revisionstr[] = "$Revision: 1.36 $";
     57static char revisionstr[] = "$Revision: 1.21.2.1 $";
    5458
    5559#ifndef COMPILEDATE
     
    16851689
    16861690#ifndef NO_RTCM3_MAIN
    1687 static char datestr[]     = "$Date: 2008/12/03 08:33:16 $";
     1691static char datestr[]     = "$Date: 2008/12/18 12:45:53 $";
    16881692
    16891693/* The string, which is send as agent in HTTP request */
  • trunk/BNC/bnc.pro

    r1299 r1305  
    2727          bnccaster.h bncrinex.h bncapp.h bncutils.h   bnchlpdlg.h    \
    2828          bncconst.h bnchtml.h bnctableitem.h bnczerodecoder.h        \
     29          bncnetrequest.h \
    2930          RTCM/GPSDecoder.h RTCM/RTCM2.h RTCM/RTCM2Decoder.h          \
    3031          RTCM/RTCM2_2021.h RTCM/rtcm_utils.h                         \
     
    3940          bncconst.cpp bnchtml.cpp bnchlpdlg.cpp bnctableitem.cpp     \
    4041          bnczerodecoder.cpp                                          \
     42          bncnetrequest.cpp \
    4143          RTCM/RTCM2.cpp RTCM/RTCM2Decoder.cpp                        \
    4244          RTCM/RTCM2_2021.cpp RTCM/rtcm_utils.cpp                     \
  • trunk/BNC/bncapp.cpp

    r1299 r1305  
    437437  QByteArray allLines;
    438438
    439   line.sprintf("    %18.11e %18.11e %18.11e %18.11e\n", (double)ep->IODE,
     439  line.sprintf("     %18.11e %18.11e %18.11e %18.11e\n", (double)ep->IODE,
    440440               ep->Crs, ep->Delta_n, ep->M0);
    441441  allLines += line;
    442442 
    443   line.sprintf("    %18.11e %18.11e %18.11e %18.11e\n", ep->Cuc,
     443  line.sprintf("     %18.11e %18.11e %18.11e %18.11e\n", ep->Cuc,
    444444               ep->e, ep->Cus, ep->sqrt_A);
    445445  allLines += line;
    446446
    447   line.sprintf("    %18.11e %18.11e %18.11e %18.11e\n",
     447  line.sprintf("     %18.11e %18.11e %18.11e %18.11e\n",
    448448               (double) ep->TOE, ep->Cic, ep->OMEGA0, ep->Cis);
    449449  allLines += line;
    450450 
    451   line.sprintf("    %18.11e %18.11e %18.11e %18.11e\n", ep->i0,
     451  line.sprintf("     %18.11e %18.11e %18.11e %18.11e\n", ep->i0,
    452452               ep->Crc, ep->omega, ep->OMEGADOT);
    453453  allLines += line;
     
    508508  QByteArray allLines;
    509509
    510   line.sprintf("    %18.11e %18.11e %18.11e %18.11e\n", ep->x_pos,
     510  line.sprintf("     %18.11e %18.11e %18.11e %18.11e\n", ep->x_pos,
    511511               ep->x_velocity, ep->x_acceleration,
    512512               (ep->flags & GLOEPHF_UNHEALTHY) ? 1.0 : 0.0);
    513513  allLines += line;
    514514   
    515   line.sprintf("    %18.11e %18.11e %18.11e %18.11e\n", ep->y_pos,
     515  line.sprintf("     %18.11e %18.11e %18.11e %18.11e\n", ep->y_pos,
    516516               ep->y_velocity, ep->y_acceleration,
    517517               (double) ep->frequency_number);
    518518  allLines += line;
    519519 
    520   line.sprintf("    %18.11e %18.11e %18.11e %18.11e\n", ep->z_pos,
     520  line.sprintf("     %18.11e %18.11e %18.11e %18.11e\n", ep->z_pos,
    521521               ep->z_velocity, ep->z_acceleration, (double) ep->E);
    522522  allLines += line;
  • trunk/BNC/bncnetrequest.cpp

    r1296 r1305  
    7171  // Network Request
    7272  // ---------------
    73   QNetworkRequest request;
    74   request.setUrl(mountPoint);
    75   request.setRawHeader("User-Agent", "NTRIP BNC/" AGENTVERSION);
    76   request.setRawHeader("Host", mountPoint.host().toAscii());
     73///  QNetworkRequest request;
     74///  request.setUrl(mountPoint);
     75///  request.setRawHeader("User-Agent", "NTRIP BNC/" AGENTVERSION);
     76///  request.setRawHeader("Host", mountPoint.host().toAscii());
     77///
     78///  QString uName = QUrl::fromPercentEncoding(mountPoint.userName().toAscii());
     79///  QString passW = QUrl::fromPercentEncoding(mountPoint.password().toAscii());
     80///  if (!uName.isEmpty() || !passW.isEmpty()) {
     81///    QByteArray userAndPwd = "Basic " + (uName.toAscii() + ":" +
     82///                                        passW.toAscii()).toBase64();
     83///    request.setRawHeader("Authorization", userAndPwd);
     84///  }
     85/// 
     86///  if (!ggaStr.isEmpty()) {
     87///    request.setRawHeader("", ggaStr);
     88///  }
    7789
    78   QString uName = QUrl::fromPercentEncoding(mountPoint.userName().toAscii());
    79   QString passW = QUrl::fromPercentEncoding(mountPoint.password().toAscii());
    80   if (!uName.isEmpty() || !passW.isEmpty()) {
    81     QByteArray userAndPwd = "Basic " + (uName.toAscii() + ":" +
    82                                         passW.toAscii()).toBase64();
    83     request.setRawHeader("Authorization", userAndPwd);
    84   }
    85  
    86   if (!ggaStr.isEmpty()) {
    87     request.setRawHeader("", ggaStr);
     90  QHttpRequestHeader header("GET", "/CBRU0", 1, 1);
     91
     92  header.addValue("User-Agent", "NTRIP BNC/1.7");
     93
     94  QByteArray userAndPwd = "Basic " + QByteArray("cvutlukes:monitoring").toBase64();
     95  header.addValue("Authorization", userAndPwd);
     96
     97  QHttp* http = new QHttp("czeposr.cuzk.cz", 2101);
     98
     99  connect(http, SIGNAL(readyRead(const QHttpResponseHeader&)),
     100          this, SLOT(slotReadyRead()));
     101
     102  QBuffer buffer;
     103  http->request(header, 0, &buffer);
     104
     105  while (true) {
     106    if (buffer.bytesAvailable()) {
     107      QByteArray arr = buffer.readAll();
     108      cout << arr.data();
     109    }
     110    else {
     111      buffer.waitForReadyRead(1000);
     112    }
    88113  }
    89114
    90   // Submit Request
    91   // --------------
    92   _reply = _manager->get(request);
    93 
    94   connect(_reply, SIGNAL(readyRead()), this, SLOT(slotReadyRead()));
    95 
    96   connect(_reply, SIGNAL(error(QNetworkReply::NetworkError)),
    97           this, SLOT(slotError(QNetworkReply::NetworkError)));
    98 
    99   connect(_reply, SIGNAL(sslErrors(QList<QSslError>)),
    100           this, SLOT(slotSslErrors(QList<QSslError>)));
    101115
    102116  return success;
  • trunk/BNC/bnctabledlg.cpp

    r1282 r1305  
    4141#include "bnctabledlg.h"
    4242#include "bncgetthread.h"
     43#include "bncnetrequest.h"
    4344
    4445// Constructor
     
    154155  url.setHost(casterHost);
    155156  url.setPort(casterPort);
     157
     158  //// beg test
     159  bncNetRequest* req = new bncNetRequest;
     160  req->request(url, "");
     161  return success;
     162  //// end test
    156163
    157164  // Send the Request
Note: See TracChangeset for help on using the changeset viewer.