Changeset 4586 in ntrip


Ignore:
Timestamp:
Aug 29, 2012, 6:24:00 PM (12 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNC/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bnctime.cpp

    r4278 r4586  
    6464    _mjd--;
    6565  }
     66  return *this;
     67}
     68
     69//
     70//////////////////////////////////////////////////////////////////////////////
     71bncTime& bncTime::setmjd(double mjddec) {
     72  _mjd = static_cast<unsigned int>(mjddec);
     73  _sec = (mjddec - _mjd)*86400.0;
    6674  return *this;
    6775}
  • trunk/BNC/src/bnctime.h

    r4584 r4586  
    1515  bncTime& set(int year, int month, int day, double daysec);
    1616  bncTime& setmjd(double daysec, int mjd);
     17  bncTime& setmjd(double mjddec);
    1718
    1819  void         reset() {_mjd = 0; _sec = 0;}
  • trunk/BNC/src/rinex/availplot.cpp

    r4585 r4586  
    22#include <qwt_symbol.h>
    33#include <qwt_plot_curve.h>
     4#include <qwt_scale_draw.h>
     5#include <qwt_text.h>
    46
    57#include "availplot.h"
    68#include "reqcanalyze.h"
    79
     10//
     11//////////////////////////////////////////////////////////////////////////////
     12class t_scaleDraw : public QwtScaleDraw {
     13 public:
     14  t_scaleDraw() {}
     15  virtual QwtText label(double mjd) const {
     16    bncTime epoTime; epoTime.setmjd(mjd);
     17    return QwtText(epoTime.timestr(0,':').c_str());
     18  }
     19};
     20
     21//
     22//////////////////////////////////////////////////////////////////////////////
    823t_availPlot::t_availPlot(QWidget* parent,
    924                        QMap<QString, t_availData>* availDataMap)
     
    1429  // Axes
    1530  // ----
    16   setAxisTitle(QwtPlot::xBottom, "Epoch");
     31  setAxisScaleDraw(QwtPlot::xBottom, new t_scaleDraw());
     32  setAxisLabelRotation(QwtPlot::xBottom, -50.0);
     33  setAxisLabelAlignment(QwtPlot::xBottom, Qt::AlignLeft | Qt::AlignBottom);
     34
    1735  setAxisTitle(QwtPlot::yLeft, "PRN");
    1836
Note: See TracChangeset for help on using the changeset viewer.