Changeset 199 in ntrip


Ignore:
Timestamp:
Oct 5, 2006, 5:32:52 PM (18 years ago)
Author:
weber
Message:

* empty log message *

Location:
trunk/BNC
Files:
2 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/bnc.pro

    r184 r199  
    2727          RTIGS/rtigs.cpp RTIGS/cgps_transform.cpp
    2828
     29RC_FILE = bnc.rc
     30
    2931QT += network
    3032
  • trunk/BNC/bncapp.cpp

    r189 r199  
    6464
    6565  if (_logStream) {
    66     *_logStream << QTime::currentTime().toString("hh:mm::ss ").toAscii().data();
     66    *_logStream << QTime::currentTime().toString("hh:mm:ss ").toAscii().data();
    6767    *_logStream << msg.data() << endl;
    6868    _logStream->flush();
  • trunk/BNC/bncgetthread.cpp

    r194 r199  
    8383  hlp.setPath(mountPoint.path());
    8484
    85   QByteArray  reqStr = "GET " + hlp.toEncoded() +
    86                        " HTTP/1.0\r\n"
    87                        "User-Agent: NTRIP BNC 1.0\r\n"
    88                        "Authorization: Basic " +
    89                        userAndPwd.toBase64() + "\r\n\r\n";
     85  QByteArray reqStr;
     86  if ( proxyHost.isEmpty() ) {
     87  if (hlp.path().indexOf("/") != 0) hlp.setPath("/");
     88  reqStr = "GET " + hlp.path().toAscii() +
     89           " HTTP/1.0\r\n"
     90           "User-Agent: NTRIP BNC 1.0\r\n"
     91           "Authorization: Basic " +
     92           userAndPwd.toBase64() + "\r\n\r\n";
     93                             } else
     94                             {
     95  reqStr = "GET " + hlp.toEncoded() +
     96           " HTTP/1.0\r\n"
     97           "User-Agent: NTRIP BNC 1.0\r\n"
     98           "Authorization: Basic " +
     99           userAndPwd.toBase64() + "\r\n\r\n";
     100                             }
    90101
    91102  msg += reqStr;
  • trunk/BNC/bnchelp.html

    r198 r199  
    1 
    2 <p><h3>BKG Ntrip Client (BNC)</h3></p>
     1<h3>BKG Ntrip Client (BNC)</h3>
    32
    43<p>
     
    87BNC has been developed for the Federal Agency for Cartography and Geodesy (BKG) within the framework of the EUREF-IP Pilot Project (EUREF-IP) and the Real-Time IGS Working Group (RTIGS).
    98</p>
    10 
    11 <p>
     9<p>
     10BNC is written under GNU General Public License (GPL). Binaries for BNC are available for Windows, Linux, and Solaris systems. It is likely that BNC can be compiled on other systems where a GNU compiler and Qt Version 4 are available.
     11</p>
    1212<h3>Contents</h3>
     13<p>
    1314<h4>
    1415<a href=#purpose>A - Purpose</a><br>
     
    2930<ul>
    3031<li>Retrieve real-time GNSS data streams available through NTRIP transport protocol,</li>
    31 <li>Generate high-rate RINEX files to feed near real-time GNSS post-processing applications, and/or</li>
    32 <li>Output synchronize observations through an IP port to feed real-time GNSS engines.</li>
     32<li>Generate high-rate RINEX files to support near real-time GNSS post-processing applications, and/or</li>
     33<li>Output synchronize observations through an IP port to support real-time GNSS engines.</li>
    3334</ul>
    3435<p>
     
    4142</ul>
    4243</p>
    43 
    44 <p>
    45 BNC has been developed under GNU General Public License (GPL). Binaries for BNC are available for Windows, Linux, and Solaris systems. It is likely that BNC can be compiled on other systems where a GNU compiler and Qt Version 4 are available.
    46 </p>
    47 
    48 <br>
    4944<a name="options">
    5045<p><h3>B - Options</h3></p>
     
    6964&nbsp; &nbsp; &nbsp; B - 6.4. <a href=#GetTable>Get Table</a><br>
    7065&nbsp; &nbsp; &nbsp; B - 6.5. <a href=#delete>Delete Mountpoints</a><br>
     66&nbsp; &nbsp; &nbsp; B - 6.6. <a href=#edit>Edit Mountpoints</a><br>
    7167B - 7. <a href=#log>Log File</a><br>
    7268B - 8. <a href=#start>Start</a><br>
     
    8379<li>
    8480Select an appropriate font.<br>
    85 Use a small font size in case the BNC window exceeds the size of your screen.
     81Use a small font size if the BNC main window exceeds the size of your screen.
    8682</li>
    8783<li> Save selected options.<br>
     
    115111
    116112<p>
    117 You may like to run BNC in a Local Area Network (LAN) environment. LAN's are often protected by a proxy server. Enter your proxy server IP and port number in case one is operated in front of BNC. If you don't know the IP and port of your proxy server, check out the proxy server settings of your Windows browser or ask your network administrator.</p>
     113You may like to run BNC in a Local Area Network (LAN). LAN's are often protected by a proxy server. Enter your proxy server IP and port number in case one is operated in front of BNC. If you don't know the IP and port of your proxy server, check out the proxy server settings of your Windows browser or ask your network administrator.</p>
    118114<p>
    119115Note that IP streaming may be generally denied in a LAN. In such a case you need to request an appropriate modification of the security policy from your network administrator or ask for the installation of a TCP relay to involved NTRIP broadcasters. If that doesn't work out, run BNC on a host that is connected to the Internet through an Internet Service Provider (ISP).
     
    122118<a name="output"> <p><h4>B - 4. Synchronized Output</h4></p>
    123119<p>
    124 BNC lets you output synchronized observations epoch by epoch. This output is made available in ASCII format and in binary format. The output comprises the following observations if available:</p>
     120BNC lets you output synchronized observations epoch by epoch. This output is made available in ASCII format and in a binary format. The output comprises the following observations if available:</p>
    125121StatID, SVPRN, GPSWeek, GPSWeeks, sec, C1, P2, L1, L2, SNR1, SNR2, pCodeIndicator, cumuLossOfCont.
    126122</p>
     
    129125<p><h4>B - 4.1 Wait for Full Epoch - optional</h4></p>
    130126<p>
    131 When feeding a real-time GNSS engine waiting for input from BNC epoch by
    132 epoch, BNC ignores whatever is received later then 'Wait for full epoch'
    133 seconds. A value of 2 to 5 seconds may be an appropriate choice for that,
    134 depending on the delay you can accept for your real-time product. Default
    135 value for 'Wait for full ecpch' is 1 second.
     127When feeding a real-time GNSS engine waiting for input epoch by epoch, BNC ignores whatever is received later then 'Wait for full epoch' seconds. A value of 2 to 5 seconds may be an appropriate choice for that, depending on the delay you can accept for your real-time GNSS product. Default value for 'Wait for full ecpch' is 1 second.
    136128</p>
    137129<p>
     
    142134<p><h4>B - 4.2 ASCII Output File - optional</h4></p>
    143135<p>
    144 Enter the full path for a file to save synchronized observations in plain ASCII format. Default value is an empty option field, meaning that no ASCII output file is generated.
     136Enter the full path for a file to save synchronized observations in plain ASCII format. Default value is an empty option field, meaning that no ASCII output file is created.
    145137</p>
    146138
     
    148140<p><h4>B - 4.3 Port for Binary Output - optional</h4></p>
    149141<p>
    150 BNC makes synchronized observations available in a binary format through an IP
    151 port. Enter the port number to activate this function. Default is an empty
    152 option field, meaning that no binary output is generated.
    153 </p>
    154 <p>The Binary output is provided as a continuous stream
     142BNC makes synchronized observations available in a binary format through an IP port on your local host IP 127.0.0.1. Enter the port number to activate this function. Default is an empty option field, meaning that no binary output is generated.</p>
     143<p>The binary output is provided as a continuous stream in the order</p>
    155144<pre>
    156145begEpoch
     
    166155...
    167156</pre>
    168 where the corresponding structures are defined as
     157<p>where the corresponding structures are defined as</p>
    169158<pre>
    170159const char begEpoch = 'A';
     
    187176} ;
    188177</pre>
    189 </p>
    190178
    191179<a name="rinex">
     
    194182Observations are converted to RINEX Version 2.1. RINEX file names are derived by BNC from the first 4 characters of the corresponding mountpoint (4Char Station ID) while truncating the residual part of the mountpoint string. Thus, retrieving data from mountpoints FRANKFURT and WETTZELL leads to RINEX files named FRAN*.* and WETT*.*.</p>
    195183<p>
    196 In case you retrieve streams that show mountpoints with an identical 4Char Station ID (same first 4 characters), the mountpoint string is split in two sub-strings and both become part of the RINEX file name. Example: When simultaneously retrieving data from mountpoints FRANKFURT and FRANCE, there RINEX file names are defined as FRAN*_KFURT.* and FRAN*_CE.*.
     184If you retrieve streams that show mountpoints with an identical 4Char Station ID (same first 4 characters), the mountpoint string is split in two sub-strings and both become part of the RINEX file name. Example: When simultaneously retrieving data from mountpoints FRANKFURT and FRANCE, there RINEX file names are defined as FRAN*_KFURT.* and FRAN*_CE.*.
     185</p>
     186<p>
     187Note that RINEX file names for file intervals less than 1 hour are created following the file name convention for 15 minute RINEX files.
    197188</p>
    198189
     
    200191<p><h4>B - 5.1 RINEX Directory Path - optional</h4></p>
    201192<p>
    202 Enter a path for saving the RINEX files in a directory. If this directory does not exist, BNC will not generate RINEX files. Default value for 'RINEX directory path' is an empty option field, meaning that streams are not converted to RINEX.
     193Enter a path for saving the RINEX files in a directory. If this directory does not exist, BNC will not create RINEX files. Default value for 'RINEX directory path' is an empty option field, meaning that streams are not converted to RINEX.
    203194</p>
    204195
    205196<a name="rnxscript">
    206 <p><h4>B - 5.2 RINEX Script</h4></p>
    207 <p>
    208 Whenever a RINEX file is generated, you may like to compress, copy, or upload it immediately. For that you enter the full path of a script or batch file carrying out these operations. The RINEX file name will be passed to the script as a command line parameter.
     197<p><h4>B - 5.2 RINEX Script - optional</h4></p>
     198<p>
     199Whenever a RINEX file is generated, you may like to compress, copy, or upload it immediately. For that you enter the full path of a script or batch file carrying out these operations. The RINEX file path and name will be passed to the script as a command line parameter (%1 on Windows systems, $1 on UNIX/Linux systems).
    209200</p>
    210201
     
    224215<p><h4>B - 5.5 RINEX Skeleton Extension - optional</h4></p>
    225216<p>
    226 BNC lets you introduce RINEX skeleton files that contain the header records you would like to see instead of a default header. You may like to derive RINEX skeleton files from the information given in sitelogs. A file in the 'RINEX directory path' with the 'RINEX skeleton extension' is understood by BNC as a RINEX skeleton file for the affected stream.
    227 </p>
    228 <p>
    229 Example: Mountpoint FRAN0 leads to the generation of RINEX files FRAN*.*. The header part of this files would be overwritten by the content of an existing skeleton file FRAN.skl in case 'RINEX skeleton extension' is set to 'skl' .
    230 </p>
     217BNC lets you introduce RINEX header skeleton files that contain the header records you would like to see instead of a default header. You may like to derive RINEX skeleton files from the information given in sitelogs. A file in the 'RINEX directory path' with the 'RINEX skeleton extension' is understood by BNC as a RINEX header skeleton file for the affected stream.
     218</p>
     219<p>
     220Example: Mountpoint FRAN0 leads to the generation of RINEX files FRAN*.*. The header part of this files would be overwritten by the content of an existing skeleton file named FRAN.skl if 'RINEX skeleton extension' is set to 'skl' .
     221</p>
     222<p>
     223Note the following conditions regarding RINEX header skeleton files.
     224<ul>
     225<li>They should contain empty header records of type:</li>
     226<br>&nbsp; &nbsp; PGM / RUN BY / DATE
     227<br>&nbsp; &nbsp; # / TYPES OF OBSERVATIONS
     228<br>&nbsp; &nbsp; TIME OF FIRST OBS
     229<br>The existence of these empty records will force BNC to include such lines in the final RINEX file header together with an additional COMMENT line mentioning the source of the stream.
     230<li>They must contain an empty header record of type:</li>
     231<br>&nbsp; &nbsp; END OF HEADER
     232<li>They may contain any other complete header record as defined in the RINEX Version 2.1 documentation. Its contents may be derived from sitelog files.</li>
     233</ul>
     234<p>
    231235
    232236<a name="mountpoints">
     
    239243<p><h4>B - 6.1 Add Mountpoints</h4></p>
    240244<p>
    241 Button 'Add Mountpoints' opens a window that lets you select data streams by their mountpoints.
     245Button 'Add Mountpoints' opens a window that lets you select data streams from an NTRIP broadcaster by their mountpoints.
    242246</p>
    243247
     
    257261<p><h4>B - 6.4 Get Table</h4></p>
    258262<p>
    259 Hit button 'Get Table' to download a sourcetable from the NTRIP broadcaster. Pay attention to data fields 'format' and 'format-details'. Remember that BNC can only decode and convert streams that come in RTCM 2.x, RTCM 3, or RTIGS format. RTCM 2.x streams must contain message types 18 and 19 while RTCM 3 streams must contain message types 1001 or 1003, better 1003 or 1004, see data field 'format-details' for available message types and their repetition rates in brackets. Select your streams line by line, use +Shift and +Ctrl when necessary. Hit 'OK' to return to the main window.
     263Hit button 'Get Table' to download the sourcetable from the NTRIP broadcaster. Pay attention to data fields 'format' and 'format-details'. Have in mind that BNC can only decode and convert streams that come in RTCM 2.x, RTCM 3, or RTIGS format. RTCM 2.x streams must contain message types 18 and 19 while RTCM 3 streams must contain message types 1001 or 1003, better 1003 or 1004, see data field 'format-details' for available message types and their repetition rates in brackets. Select your streams line by line, use +Shift and +Ctrl when necessary. Hit 'OK' to return to the main window.
    260264</p>
    261265
     
    263267<p><h4>B - 6.5 Delete Mountpoints</h4></p>
    264268<p>
    265 To delete a stream shown under 'Mountpoints' in the main window select it by mouse click and then hit 'Delete Mountpoints'. For simultaneous deletion of several streams single them out through using +Shift and +Ctrl.</p>
     269To delete a stream shown under 'Mountpoints' in the main window select it by mouse click and hit 'Delete Mountpoints'. For simultaneous deletion of several streams single them out through using +Shift and +Ctrl.</p>
     270
     271<a name="edit">
     272<p><h4>B - 6.6 Edit Mountpoints</h4></p>
    266273<p>
    267274BNC automatically selects one out of several internal decoders for a stream based on its 'format' and 'format-details' as given in the sourcetable. It may happen that you need to overrule the automated decoder selection because of sourcetable setup deficiencies. Therefore BNC allows to edit the decoder part for each stream shown under 'Mountpoints'. Accepted decoder strings allowed to be introduced are 'RTCM_2.x', 'RTCM_3', and 'RTIGS'.
     
    271278<p><h4>B - 7. Log File - optional</h4></p>
    272279<p>
    273 BNC's comments its activities in the 'Log file' section on the main windows. Comments can be saved and concatenated in a file when entering a full path for 'Log file'. Information is given about the communication between BNC and the NTRIP broadcaster as well as about problems that occur concerning communication link, stream availability, stream delay, stream conversion etc. Default value for 'Log file' is an empty option field, meaning that BNC's comments are not saved in a file.
    274 </p>
    275 <p>
    276 Note that a connection to the NTRIP broadcaster may break or a stream requested may be temporarily unavailable. When this happens, a reconnect is tried with decreasing frequency. BNC first tries to reconnect with 1 second delay, if unsuccessful, tries again in 2 seconds from the last attempt, if still unsuccessful tries with 4 seconds from the last attempt etc. Each attempt doubles the delay from the previous attempt. The maximum delay between attempts is limited to 60 seconds. The reconnection process is documented in 'Log file'.
    277 </p>
     280BNC comments its activities in the 'Log file' section on the main windows. Comments can be saved and concatenated in a file when entering a full path for 'Log file'. Information is given about the communication between BNC and the NTRIP broadcaster as well as about problems that occur concerning communication link, stream availability, stream delay, stream conversion etc. Default value for 'Log file' is an empty option field, meaning that BNC comments are not saved in a file.
     281</p>
    278282
    279283<a name="start">
     
    292296<p><h4>B - 10. No Window - optional</h4></p>
    293297<p>
    294 On all systems you may like to use BNC in batch mode with the command line
    295 option -nw. BNC then runs in 'no window' mode, reading options from the
    296 configuration file ${HOME}/.config/BKG/BNC_NTRIP_Client (Unix/Linux) or from
    297 the registers (Windows).
    298 </p>
    299 <p>
    300 Note that the self-explaining contents of the configuration file can easily be edited and option -nw is not available under Windows.
     298You can use BNC in batch mode with the command line option -nw. BNC then runs in 'no window' mode, reading options from the configuration file ${HOME}/.config/BKG/BNC_NTRIP_Client (Unix/Linux) or from the registers (Windows).
     299</p>
     300<p>
     301Note that the self-explaining contents of the configuration file or the Windows registers can easily be edited.
    301302</p>
    302303<br>
     
    305306<ul>
    306307<li>
     308A connection to the NTRIP broadcaster may break or a stream requested may be temporarily unavailable. Furthermore, a connection is interpreted by BNC to be broken if no data is coming in for a period of 20 seconds. When this happens, a reconnect is tried with decreasing frequency. BNC first tries to reconnect with ~1 second delay, if unsuccessful, tries again in ~2 seconds from the last attempt, if still unsuccessful tries with ~4 seconds from the last attempt etc. Each attempt doubles the delay from the previous attempt. The maximum delay between attempts is limited to ~128 seconds. The reconnection process is documented in 'Log file'.
     309</li>
     310<li>
    307311So far BNC only handles GPS data while ignoring GLONASS and Galileo observations. Furthermore, its function is limited today to processing L1, L2, P1, and P2 observations only.
    308312</li>
     
    325329</li>
    326330<li>
    327 BNC's 'Get Table' function only informs about the STR records of a sourcetable. Note that you can use an Internet browser to download the full sourcetable contents of any NTRIP broadcaster by simply entering its URL: http://host:port/dummy. Data field number 8 of the NET records may provide information about where to register for an NTRIP broadcaster account.
    328 </li>
    329 <li>
    330 EUREF as well as IGS follow an open data policy. Streams are made available through NTRIP broadcasters at <u>www.euref-ip.net</u> and <u>www.igs-ip.net</u> free of charge to anybody for any purpose. It is not clear today how many users will have to be supported simultaneously. The situation may develop in a way that it becomes difficult to serve all registered users at any time.  In case limited dissemination resources on the NTRIP broadcaster side (software restrictions, bandwidth limitation etc.) make it necessary, first priority in stream provision will be given to stream providers, real-time analysis centres, and re-broadcasting activities while access for others may be temporarily denied.
    331 </li>
    332 </ul>
    333 <br>
     331BNC's 'Get Table' function only informs about the STR records of a sourcetable. Note that you can use an Internet browser to download the full sourcetable contents of any NTRIP broadcaster by simply entering its URL plus a dummy string in the form http://host:port/dummy. Data field number 8 of the NET records that may show up may provide information about where to register for an NTRIP broadcaster account.
     332</li>
     333<li>
     334EUREF as well as IGS follow an open data policy. Streams are made available through NTRIP broadcasters at <u>www.euref-ip.net</u> and <u>www.igs-ip.net</u> free of charge to anybody for any purpose. It is not clear today how many users will have to be supported simultaneously. The situation may develop in a way that it becomes difficult to serve all registered users at any time.  In case limited dissemination resources on the NTRIP broadcaster side (software restrictions, bandwidth limitation etc.) make it necessary, first priority in stream provision will be given to stream providers, re-broadcasting activities, and real-time analysis centres while access for others may be temporarily denied.
     335</li>
     336<br>
     337</ul>
    334338<a name="authors">
    335339<p><h3>D - Authors</h3></p>
    336340<p>
    337 Basically BNC is an NTRIP Qt Graphic User Interface (GUI) developed for the Federal Agency for Cartography and Geodesy (BKG) by Leos Mervart (Czech Technical University Prague, Department of Advanced Geodesy). BNC integrates the following already existing GNU GPL software components:
    338 <ul>
    339 <li> RTCM 2.x decoder, written by John Sager with contributions from Carsten Becker (German Aerospace Center, DLR, Neustrelitz)</li>
    340 <li> RTCM 3 decoder, written for BKG by Dirk Stoecker (Euronik GmbH, Schoenefeld)</li>
    341 <li> RTIGS decoder, written by Ken MacLeod (Natural Resources Canada, NRCan)</li>
     341The BKG Ntrip Client (BNC) Qt Graphic User Interface (GUI) has been developed for the Federal Agency for Cartography and Geodesy (BKG) by Leos Mervart, Czech Technical University Prague, Department of Advanced Geodesy. BNC integrates the following GNU GPL software components:
     342<ul>
     343<li> RTCM 2.x decoder, written by John Sager with contributions from Carsten Becker, German Aerospace Center, DLR, Neustrelitz</li>
     344<li> RTCM 3 decoder, written for BKG by Dirk Stoecker, Euronik GmbH, Schoenefeld</li>
     345<li> RTIGS decoder, written by Ken MacLeod, Natural Resources Canada, NRCan</li>
    342346</ul>
    343347</p>
     
    356360<p><h3>E - Links</h3></p>
    357361<table>
     362<tr></tr>
    358363<tr><td>NTRIP &nbsp;</td><td><u>http://igs.bkg.bund.de/index_ntrip.htm</u></td></tr>
    359364<tr><td>EUREF-IP NTRIP broadcaster &nbsp;</td><td><u>http://www.euref-ip.net/home</u></td></tr>
     
    363368<tr><td>Real-Time IGS Working Group &nbsp;</td><td><u>http://igscb.jpl.nasa.gov/projects/rtwg/index.html</u>
    364369</table>
    365 <br><br>
     370<br>
    366371
    367372<a name="annex">
     
    402407<li>Enables streaming over mobile IP networks because of using TCP/IP.</li>
    403408</ul>
    404 </p><br>
     409</p>
    405410
    406411<a name="source">
     
    417422Sourcetable records of type NET contain the following data fields: 'identifiey', 'operator', 'authentication', 'fee', 'web-net', 'web-str', 'web-reg', 'misc'.
    418423</p>
     424<p>
     425Sourcetable records of type CAS contain the following data fields: 'host', 'port', 'identifier', 'operator', 'nmea', 'country', 'latitude', 'longitude', 'misc'.
     426</p>
    419427
    420428<a name="rtcm">
     
    431439<p><h4>F - 2.1 RTCM Version 2.x</h4></p>
    432440<p>
    433 Transmitting GNSS carrier phase data can be done through RTCM Version 2.x messages. Message that may be of interest here are types 1, 2, 3, 6, 9, 16,18/19, 20/21, and 22.
     441Transmitting GNSS carrier phase data can be done through RTCM Version 2.x messages. Messages that may be of interest here are types 1, 2, 3, 6, 9, 16,18/19, 20/21, and 22.
    434442</p>
    435443
     
    467475</p>
    468476<p>
    469 RTCM Version 3 defines a number of message types. Among them are the following:
     477RTCM Version 3 defines a number of message types. Messages that may be of interest here are:
    470478</p>
    471479<ul>
     
    504512</p>
    505513
    506 
    507 
    508 
  • trunk/BNC/bncrinex.cpp

    r188 r199  
    112112  QDate nextDate;
    113113
    114   if (intStr == "15 min") {
     114  if (intStr == "5 min") {
     115    char ch = 'A' + datTim.time().hour();
     116    hlpStr = ch;
     117    if      (datTim.time().minute() < 5) {
     118      hlpStr += "00";
     119      nextTime.setHMS(datTim.time().hour(), 5, 0);
     120      nextDate = datTim.date();
     121    }
     122    else if (datTim.time().minute() < 10) {
     123      hlpStr += "5";
     124      nextTime.setHMS(datTim.time().hour(), 10, 0);
     125      nextDate = datTim.date();
     126    }
     127    else if (datTim.time().minute() < 15) {
     128      hlpStr += "10";
     129      nextTime.setHMS(datTim.time().hour(), 15, 0);
     130      nextDate = datTim.date();
     131    }
     132    else if (datTim.time().minute() < 20) {
     133      hlpStr += "15";
     134      nextTime.setHMS(datTim.time().hour(), 20, 0);
     135      nextDate = datTim.date();
     136    }
     137    else if (datTim.time().minute() < 25) {
     138      hlpStr += "20";
     139      nextTime.setHMS(datTim.time().hour(), 25, 0);
     140      nextDate = datTim.date();
     141    }
     142    else if (datTim.time().minute() < 30) {
     143      hlpStr += "25";
     144      nextTime.setHMS(datTim.time().hour(), 30, 0);
     145      nextDate = datTim.date();
     146    }
     147    else if (datTim.time().minute() < 35) {
     148      hlpStr += "30";
     149      nextTime.setHMS(datTim.time().hour(), 35, 0);
     150      nextDate = datTim.date();
     151    }
     152    else if (datTim.time().minute() < 40) {
     153      hlpStr += "35";
     154      nextTime.setHMS(datTim.time().hour(), 40, 0);
     155      nextDate = datTim.date();
     156    }
     157    else if (datTim.time().minute() < 45) {
     158      hlpStr += "40";
     159      nextTime.setHMS(datTim.time().hour(), 45, 0);
     160      nextDate = datTim.date();
     161    }
     162    else if (datTim.time().minute() < 50) {
     163      hlpStr += "45";
     164      nextTime.setHMS(datTim.time().hour(), 50, 0);
     165      nextDate = datTim.date();
     166    }
     167    else if (datTim.time().minute() < 55) {
     168      hlpStr += "50";
     169      nextTime.setHMS(datTim.time().hour(), 55, 0);
     170      nextDate = datTim.date();
     171    }
     172    else {
     173      hlpStr += "55";
     174      if (datTim.time().hour() < 23) {
     175        nextTime.setHMS(datTim.time().hour() + 1 , 0, 0);
     176        nextDate = datTim.date();
     177      }
     178      else {
     179        nextTime.setHMS(0, 0, 0);
     180        nextDate = datTim.date().addDays(1);
     181      }
     182    }
     183  }
     184  else if (intStr == "10 min") {
     185    char ch = 'A' + datTim.time().hour();
     186    hlpStr = ch;
     187    if      (datTim.time().minute() < 10) {
     188      hlpStr += "00";
     189      nextTime.setHMS(datTim.time().hour(), 10, 0);
     190      nextDate = datTim.date();
     191    }
     192    else if (datTim.time().minute() < 20) {
     193      hlpStr += "10";
     194      nextTime.setHMS(datTim.time().hour(), 20, 0);
     195      nextDate = datTim.date();
     196    }
     197    else if (datTim.time().minute() < 30) {
     198      hlpStr += "20";
     199      nextTime.setHMS(datTim.time().hour(), 30, 0);
     200      nextDate = datTim.date();
     201    }
     202    else if (datTim.time().minute() < 40) {
     203      hlpStr += "30";
     204      nextTime.setHMS(datTim.time().hour(), 40, 0);
     205      nextDate = datTim.date();
     206    }
     207    else if (datTim.time().minute() < 50) {
     208      hlpStr += "40";
     209      nextTime.setHMS(datTim.time().hour(), 50, 0);
     210      nextDate = datTim.date();
     211    }
     212    else {
     213      hlpStr += "50";
     214      if (datTim.time().hour() < 23) {
     215        nextTime.setHMS(datTim.time().hour() + 1 , 0, 0);
     216        nextDate = datTim.date();
     217      }
     218      else {
     219        nextTime.setHMS(0, 0, 0);
     220        nextDate = datTim.date().addDays(1);
     221      }
     222    }
     223  }
     224  else if (intStr == "15 min") {
    115225    char ch = 'A' + datTim.time().hour();
    116226    hlpStr = ch;
     
    132242    else {
    133243      hlpStr += "45";
     244      if (datTim.time().hour() < 23) {
     245        nextTime.setHMS(datTim.time().hour() + 1 , 0, 0);
     246        nextDate = datTim.date();
     247      }
     248      else {
     249        nextTime.setHMS(0, 0, 0);
     250        nextDate = datTim.date().addDays(1);
     251      }
     252    }
     253  }
     254  else if (intStr == "30 min") {
     255    char ch = 'A' + datTim.time().hour();
     256    hlpStr = ch;
     257    if      (datTim.time().minute() < 30) {
     258      hlpStr += "00";
     259      nextTime.setHMS(datTim.time().hour(), 30, 0);
     260      nextDate = datTim.date();
     261    }
     262    else {
     263      hlpStr += "30";
    134264      if (datTim.time().hour() < 23) {
    135265        nextTime.setHMS(datTim.time().hour() + 1 , 0, 0);
  • trunk/BNC/bncwindow.cpp

    r189 r199  
    3131
    3232  int ww = QFontMetrics(this->font()).width('w');
     33 
     34  static const QStringList labels = QString("account,mountpoint,"
     35    "decoder,bytes").split(",");
    3336
    3437  setMinimumSize(60*ww, 80*ww);
     
    118121  _rnxIntrComboBox->setMaximumWidth(9*ww);
    119122  _rnxIntrComboBox->setEditable(false);
    120   _rnxIntrComboBox->addItems(QString("15 min,1 hour,1 day").split(","));
     123  _rnxIntrComboBox->addItems(QString("5 min,10 min,15 min,30 min,1 hour,1 day").split(","));
    121124  int ii = _rnxIntrComboBox->findText(settings.value("rnxIntr").toString());
    122125  if (ii != -1) {
     
    132135  _logFileLineEdit    = new QLineEdit(settings.value("logFile").toString());
    133136  _mountPointsTable   = new QTableWidget(0,4);
    134   _mountPointsTable->horizontalHeader()->setResizeMode(QHeaderView::Stretch);
    135   _mountPointsTable->horizontalHeader()->hide();
     137  _mountPointsTable->horizontalHeader()->setResizeMode(QHeaderView::Interactive);
     138  _mountPointsTable->setHorizontalHeaderLabels(labels);
     139//  _mountPointsTable->horizontalHeader()->hide();
    136140  _mountPointsTable->verticalHeader()->hide();
    137141  _mountPointsTable->setGridStyle(Qt::NoPen);
     
    180184  _log->setReadOnly(true);
    181185
    182   layout->addWidget(new QLabel("Proxy host"),                    0, 0);
    183   layout->addWidget(_proxyHostLineEdit,                          0, 1);
    184   layout->addWidget(new QLabel("Proxy port"),                    0, 2);
    185   layout->addWidget(_proxyPortLineEdit,                          0, 3);
     186  layout->addWidget(new QLabel("Proxy host"),                    0, 0, 1, 2);
     187  layout->addWidget(_proxyHostLineEdit,                          0, 2);
     188  layout->addWidget(new QLabel("Proxy port"),                    0, 3);
     189  layout->addWidget(_proxyPortLineEdit,                          0, 4);
    186190
    187191  layout->addWidget(new QLabel("Wait for full epoch"),           1, 0, 1, 2);
     
    194198  layout->addWidget(_outPortLineEdit,                            3, 2);
    195199
    196   layout->addWidget(new QLabel("RINEX path"),                    4, 0, 1, 2);
     200  layout->addWidget(new QLabel("RINEX directory path"),          4, 0, 1, 2);
    197201  layout->addWidget(_rnxPathLineEdit,                            4, 2, 1, 3);
    198202
     
    211215  layout->addWidget(_mountPointsTable,                           9, 0, 1, 5);
    212216
    213   layout->addWidget(new QLabel("Log (full path)"),              10, 0, 1, 2);
     217  layout->addWidget(new QLabel("Log file (full path)"),          10, 0, 1, 2);
    214218  layout->addWidget(_logFileLineEdit,                           10, 2, 1, 3);
    215219  layout->addWidget(_log,                                       11, 0, 1, 5);
Note: See TracChangeset for help on using the changeset viewer.