mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 20:50:06 +00:00
Plot -> Sweep, standardizing signal/slot naming convention
This commit is contained in:
parent
d7e60a0d8c
commit
2f1f15938a
9 changed files with 67 additions and 66 deletions
|
|
@ -86,6 +86,10 @@
|
||||||
<element xmi:type="uml:Operation" href="scwx.uml#_Cb_1kC9_EeyWgvKLGfX-VA"/>
|
<element xmi:type="uml:Operation" href="scwx.uml#_Cb_1kC9_EeyWgvKLGfX-VA"/>
|
||||||
<layoutConstraint xmi:type="notation:Location" xmi:id="_CcI_gS9_EeyWgvKLGfX-VA"/>
|
<layoutConstraint xmi:type="notation:Location" xmi:id="_CcI_gS9_EeyWgvKLGfX-VA"/>
|
||||||
</children>
|
</children>
|
||||||
|
<children xmi:type="notation:Shape" xmi:id="_ZAK94DqHEey_nYE4G1Fl-w" type="Operation_ClassOperationLabel">
|
||||||
|
<element xmi:type="uml:Operation" href="scwx.uml#_Y__XsDqHEey_nYE4G1Fl-w"/>
|
||||||
|
<layoutConstraint xmi:type="notation:Location" xmi:id="_ZAK94TqHEey_nYE4G1Fl-w"/>
|
||||||
|
</children>
|
||||||
<styles xmi:type="notation:TitleStyle" xmi:id="_Yt5RmQKhEeyIXMJVZXHk6Q"/>
|
<styles xmi:type="notation:TitleStyle" xmi:id="_Yt5RmQKhEeyIXMJVZXHk6Q"/>
|
||||||
<styles xmi:type="notation:SortingStyle" xmi:id="_Yt5RmgKhEeyIXMJVZXHk6Q"/>
|
<styles xmi:type="notation:SortingStyle" xmi:id="_Yt5RmgKhEeyIXMJVZXHk6Q"/>
|
||||||
<styles xmi:type="notation:FilteringStyle" xmi:id="_Yt5RmwKhEeyIXMJVZXHk6Q"/>
|
<styles xmi:type="notation:FilteringStyle" xmi:id="_Yt5RmwKhEeyIXMJVZXHk6Q"/>
|
||||||
|
|
@ -98,7 +102,7 @@
|
||||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Yt5RoQKhEeyIXMJVZXHk6Q"/>
|
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Yt5RoQKhEeyIXMJVZXHk6Q"/>
|
||||||
</children>
|
</children>
|
||||||
<element xmi:type="uml:Class" href="scwx.uml#_Yt2OQAKhEeyIXMJVZXHk6Q"/>
|
<element xmi:type="uml:Class" href="scwx.uml#_Yt2OQAKhEeyIXMJVZXHk6Q"/>
|
||||||
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Yt4qgQKhEeyIXMJVZXHk6Q" x="480" y="200" height="181"/>
|
<layoutConstraint xmi:type="notation:Bounds" xmi:id="_Yt4qgQKhEeyIXMJVZXHk6Q" x="480" y="200" height="201"/>
|
||||||
</children>
|
</children>
|
||||||
<children xmi:type="notation:Shape" xmi:id="_a0fKoAKhEeyIXMJVZXHk6Q" type="Class_Shape">
|
<children xmi:type="notation:Shape" xmi:id="_a0fKoAKhEeyIXMJVZXHk6Q" type="Class_Shape">
|
||||||
<children xmi:type="notation:DecorationNode" xmi:id="_a0fKogKhEeyIXMJVZXHk6Q" type="Class_NameLabel"/>
|
<children xmi:type="notation:DecorationNode" xmi:id="_a0fKogKhEeyIXMJVZXHk6Q" type="Class_NameLabel"/>
|
||||||
|
|
|
||||||
|
|
@ -81,11 +81,12 @@
|
||||||
<ownedOperation xmi:type="uml:Operation" xmi:id="_BfETQC9_EeyWgvKLGfX-VA" name="LoadColorTable">
|
<ownedOperation xmi:type="uml:Operation" xmi:id="_BfETQC9_EeyWgvKLGfX-VA" name="LoadColorTable">
|
||||||
<ownedParameter xmi:type="uml:Parameter" xmi:id="_ZiBNADQAEeyGO_jIbsSKUw" type="_8fCdAC-AEeyWgvKLGfX-VA"/>
|
<ownedParameter xmi:type="uml:Parameter" xmi:id="_ZiBNADQAEeyGO_jIbsSKUw" type="_8fCdAC-AEeyWgvKLGfX-VA"/>
|
||||||
</ownedOperation>
|
</ownedOperation>
|
||||||
<ownedOperation xmi:type="uml:Operation" xmi:id="_Cb_1kC9_EeyWgvKLGfX-VA" name="PlotTime">
|
<ownedOperation xmi:type="uml:Operation" xmi:id="_Cb_1kC9_EeyWgvKLGfX-VA" name="SweepTime">
|
||||||
<ownedParameter xmi:type="uml:Parameter" xmi:id="_tZRrUDQAEeyGO_jIbsSKUw" direction="return">
|
<ownedParameter xmi:type="uml:Parameter" xmi:id="_tZRrUDQAEeyGO_jIbsSKUw" direction="return">
|
||||||
<type xmi:type="uml:Class" href="std.uml#_L1eGYC9_EeyWgvKLGfX-VA"/>
|
<type xmi:type="uml:Class" href="std.uml#_L1eGYC9_EeyWgvKLGfX-VA"/>
|
||||||
</ownedParameter>
|
</ownedParameter>
|
||||||
</ownedOperation>
|
</ownedOperation>
|
||||||
|
<ownedOperation xmi:type="uml:Operation" xmi:id="_Y__XsDqHEey_nYE4G1Fl-w" name="ComputeSweep" visibility="protected"/>
|
||||||
</packagedElement>
|
</packagedElement>
|
||||||
</packagedElement>
|
</packagedElement>
|
||||||
<packagedElement xmi:type="uml:Package" xmi:id="_qBoqQAKhEeyIXMJVZXHk6Q" name="map">
|
<packagedElement xmi:type="uml:Package" xmi:id="_qBoqQAKhEeyIXMJVZXHk6Q" name="map">
|
||||||
|
|
@ -97,10 +98,10 @@
|
||||||
</ownedParameter>
|
</ownedParameter>
|
||||||
</ownedOperation>
|
</ownedOperation>
|
||||||
<ownedOperation xmi:type="uml:Operation" xmi:id="_ZE4jgALIEeyIXMJVZXHk6Q" name="deinitialize"/>
|
<ownedOperation xmi:type="uml:Operation" xmi:id="_ZE4jgALIEeyIXMJVZXHk6Q" name="deinitialize"/>
|
||||||
<ownedOperation xmi:type="uml:Operation" xmi:id="_ZfuscALIEeyIXMJVZXHk6Q" name="UpdateColorTable"/>
|
<ownedOperation xmi:type="uml:Operation" xmi:id="_ZfuscALIEeyIXMJVZXHk6Q" name="UpdateColorTable" visibility="private"/>
|
||||||
<ownedOperation xmi:type="uml:Operation" xmi:id="_aEsasALIEeyIXMJVZXHk6Q" name="UpdatePlot"/>
|
<ownedOperation xmi:type="uml:Operation" xmi:id="_aEsasALIEeyIXMJVZXHk6Q" name="UpdateSweep" visibility="private"/>
|
||||||
<ownedOperation xmi:type="uml:Operation" xmi:id="_a_EYQALIEeyIXMJVZXHk6Q" name="ReceiveColorTableUpdate"/>
|
<ownedOperation xmi:type="uml:Operation" xmi:id="_a_EYQALIEeyIXMJVZXHk6Q" name="UpdateColorTableNextFrame" visibility="private"/>
|
||||||
<ownedOperation xmi:type="uml:Operation" xmi:id="_cBpPkALIEeyIXMJVZXHk6Q" name="ReceivePlotUpdate"/>
|
<ownedOperation xmi:type="uml:Operation" xmi:id="_cBpPkALIEeyIXMJVZXHk6Q" name="UpdateSweepNextFrame" visibility="private"/>
|
||||||
</packagedElement>
|
</packagedElement>
|
||||||
<packagedElement xmi:type="uml:Realization" xmi:id="_K0c44ALKEeyIXMJVZXHk6Q" client="_a0ejkAKhEeyIXMJVZXHk6Q">
|
<packagedElement xmi:type="uml:Realization" xmi:id="_K0c44ALKEeyIXMJVZXHk6Q" client="_a0ejkAKhEeyIXMJVZXHk6Q">
|
||||||
<supplier xmi:type="uml:Class" href="QMapbox.uml#_0wg9EALIEeyIXMJVZXHk6Q"/>
|
<supplier xmi:type="uml:Class" href="QMapbox.uml#_0wg9EALIEeyIXMJVZXHk6Q"/>
|
||||||
|
|
|
||||||
|
|
@ -1,2 +1,2 @@
|
||||||
#Sun Oct 31 14:43:42 CDT 2021
|
#Sun Oct 31 15:18:03 CDT 2021
|
||||||
_label_asdf=asdf2
|
_label_asdf=asdf2
|
||||||
|
|
|
||||||
|
|
@ -41,9 +41,7 @@ public:
|
||||||
vbo_ {GL_INVALID_INDEX},
|
vbo_ {GL_INVALID_INDEX},
|
||||||
vao_ {GL_INVALID_INDEX},
|
vao_ {GL_INVALID_INDEX},
|
||||||
texture_ {GL_INVALID_INDEX},
|
texture_ {GL_INVALID_INDEX},
|
||||||
numVertices_ {0},
|
sweepTimeNeedsUpdate_ {true}
|
||||||
colorTableUpdated_(false),
|
|
||||||
plotUpdated_(true)
|
|
||||||
{
|
{
|
||||||
// TODO: Manage font at the global level, texture at the view level
|
// TODO: Manage font at the global level, texture at the view level
|
||||||
}
|
}
|
||||||
|
|
@ -61,10 +59,7 @@ public:
|
||||||
GLuint vao_;
|
GLuint vao_;
|
||||||
GLuint texture_;
|
GLuint texture_;
|
||||||
|
|
||||||
GLsizeiptr numVertices_;
|
bool sweepTimeNeedsUpdate_;
|
||||||
|
|
||||||
bool colorTableUpdated_;
|
|
||||||
bool plotUpdated_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
OverlayLayer::OverlayLayer(
|
OverlayLayer::OverlayLayer(
|
||||||
|
|
@ -127,32 +122,32 @@ void OverlayLayer::initialize()
|
||||||
gl.glUniform4f(p->uColorLocation_, 0.0f, 0.0f, 0.0f, 0.75f);
|
gl.glUniform4f(p->uColorLocation_, 0.0f, 0.0f, 0.0f, 0.75f);
|
||||||
|
|
||||||
connect(p->radarProductView_.get(),
|
connect(p->radarProductView_.get(),
|
||||||
&view::RadarProductView::PlotUpdated,
|
&view::RadarProductView::SweepComputed,
|
||||||
this,
|
this,
|
||||||
&OverlayLayer::ReceivePlotUpdate);
|
&OverlayLayer::UpdateSweepTimeNextFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverlayLayer::render(const QMapbox::CustomLayerRenderParameters& params)
|
void OverlayLayer::render(const QMapbox::CustomLayerRenderParameters& params)
|
||||||
{
|
{
|
||||||
gl::OpenGLFunctions& gl = p->gl_;
|
gl::OpenGLFunctions& gl = p->gl_;
|
||||||
|
|
||||||
static std::string plotTimeString;
|
static std::string sweepTimeString;
|
||||||
|
|
||||||
if (p->plotUpdated_)
|
if (p->sweepTimeNeedsUpdate_)
|
||||||
{
|
{
|
||||||
using namespace std::chrono;
|
using namespace std::chrono;
|
||||||
auto plotTime =
|
auto sweepTime =
|
||||||
time_point_cast<seconds>(p->radarProductView_->PlotTime());
|
time_point_cast<seconds>(p->radarProductView_->SweepTime());
|
||||||
|
|
||||||
if (plotTime.time_since_epoch().count() != 0)
|
if (sweepTime.time_since_epoch().count() != 0)
|
||||||
{
|
{
|
||||||
zoned_time zt = {current_zone(), plotTime};
|
zoned_time zt = {current_zone(), sweepTime};
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
os << zt;
|
os << zt;
|
||||||
plotTimeString = os.str();
|
sweepTimeString = os.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
p->plotUpdated_ = false;
|
p->sweepTimeNeedsUpdate_ = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
glm::mat4 projection = glm::ortho(0.0f,
|
glm::mat4 projection = glm::ortho(0.0f,
|
||||||
|
|
@ -181,7 +176,7 @@ void OverlayLayer::render(const QMapbox::CustomLayerRenderParameters& params)
|
||||||
gl.glDrawArrays(GL_TRIANGLES, 0, 6);
|
gl.glDrawArrays(GL_TRIANGLES, 0, 6);
|
||||||
|
|
||||||
// Render time
|
// Render time
|
||||||
p->textShader_.RenderText(plotTimeString,
|
p->textShader_.RenderText(sweepTimeString,
|
||||||
params.width - 7.0f,
|
params.width - 7.0f,
|
||||||
7.0f,
|
7.0f,
|
||||||
16.0f,
|
16.0f,
|
||||||
|
|
@ -211,14 +206,14 @@ void OverlayLayer::deinitialize()
|
||||||
p->texture_ = GL_INVALID_INDEX;
|
p->texture_ = GL_INVALID_INDEX;
|
||||||
|
|
||||||
disconnect(p->radarProductView_.get(),
|
disconnect(p->radarProductView_.get(),
|
||||||
&view::RadarProductView::PlotUpdated,
|
&view::RadarProductView::SweepComputed,
|
||||||
this,
|
this,
|
||||||
&OverlayLayer::ReceivePlotUpdate);
|
&OverlayLayer::UpdateSweepTimeNextFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OverlayLayer::ReceivePlotUpdate()
|
void OverlayLayer::UpdateSweepTimeNextFrame()
|
||||||
{
|
{
|
||||||
p->plotUpdated_ = true;
|
p->sweepTimeNeedsUpdate_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace map
|
} // namespace map
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ public:
|
||||||
void deinitialize() override final;
|
void deinitialize() override final;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void ReceivePlotUpdate();
|
void UpdateSweepTimeNextFrame();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<OverlayLayerImpl> p;
|
std::unique_ptr<OverlayLayerImpl> p;
|
||||||
|
|
|
||||||
|
|
@ -41,8 +41,8 @@ public:
|
||||||
vao_ {GL_INVALID_INDEX},
|
vao_ {GL_INVALID_INDEX},
|
||||||
texture_ {GL_INVALID_INDEX},
|
texture_ {GL_INVALID_INDEX},
|
||||||
numVertices_ {0},
|
numVertices_ {0},
|
||||||
colorTableUpdated_(false),
|
colorTableNeedsUpdate_ {false},
|
||||||
plotUpdated_(false)
|
sweepNeedsUpdate_ {false}
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
~RadarProductLayerImpl() = default;
|
~RadarProductLayerImpl() = default;
|
||||||
|
|
@ -59,8 +59,8 @@ public:
|
||||||
|
|
||||||
GLsizeiptr numVertices_;
|
GLsizeiptr numVertices_;
|
||||||
|
|
||||||
bool colorTableUpdated_;
|
bool colorTableNeedsUpdate_;
|
||||||
bool plotUpdated_;
|
bool sweepNeedsUpdate_;
|
||||||
};
|
};
|
||||||
|
|
||||||
RadarProductLayer::RadarProductLayer(
|
RadarProductLayer::RadarProductLayer(
|
||||||
|
|
@ -112,18 +112,18 @@ void RadarProductLayer::initialize()
|
||||||
connect(p->radarProductView_.get(),
|
connect(p->radarProductView_.get(),
|
||||||
&view::RadarProductView::ColorTableLoaded,
|
&view::RadarProductView::ColorTableLoaded,
|
||||||
this,
|
this,
|
||||||
&RadarProductLayer::ReceiveColorTableUpdate);
|
&RadarProductLayer::UpdateColorTableNextFrame);
|
||||||
connect(p->radarProductView_.get(),
|
connect(p->radarProductView_.get(),
|
||||||
&view::RadarProductView::PlotUpdated,
|
&view::RadarProductView::SweepComputed,
|
||||||
this,
|
this,
|
||||||
&RadarProductLayer::ReceivePlotUpdate);
|
&RadarProductLayer::UpdateSweepNextFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadarProductLayer::UpdateSweep()
|
void RadarProductLayer::UpdateSweep()
|
||||||
{
|
{
|
||||||
BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "UpdateSweep()";
|
BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "UpdateSweep()";
|
||||||
|
|
||||||
p->plotUpdated_ = false;
|
p->sweepNeedsUpdate_ = false;
|
||||||
|
|
||||||
gl::OpenGLFunctions& gl = p->gl_;
|
gl::OpenGLFunctions& gl = p->gl_;
|
||||||
|
|
||||||
|
|
@ -187,12 +187,12 @@ void RadarProductLayer::render(
|
||||||
{
|
{
|
||||||
gl::OpenGLFunctions& gl = p->gl_;
|
gl::OpenGLFunctions& gl = p->gl_;
|
||||||
|
|
||||||
if (p->colorTableUpdated_)
|
if (p->colorTableNeedsUpdate_)
|
||||||
{
|
{
|
||||||
UpdateColorTable();
|
UpdateColorTable();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p->plotUpdated_)
|
if (p->sweepNeedsUpdate_)
|
||||||
{
|
{
|
||||||
UpdateSweep();
|
UpdateSweep();
|
||||||
}
|
}
|
||||||
|
|
@ -241,18 +241,18 @@ void RadarProductLayer::deinitialize()
|
||||||
disconnect(p->radarProductView_.get(),
|
disconnect(p->radarProductView_.get(),
|
||||||
&view::RadarProductView::ColorTableLoaded,
|
&view::RadarProductView::ColorTableLoaded,
|
||||||
this,
|
this,
|
||||||
&RadarProductLayer::ReceiveColorTableUpdate);
|
&RadarProductLayer::UpdateColorTableNextFrame);
|
||||||
disconnect(p->radarProductView_.get(),
|
disconnect(p->radarProductView_.get(),
|
||||||
&view::RadarProductView::PlotUpdated,
|
&view::RadarProductView::SweepComputed,
|
||||||
this,
|
this,
|
||||||
&RadarProductLayer::ReceivePlotUpdate);
|
&RadarProductLayer::UpdateSweepNextFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadarProductLayer::UpdateColorTable()
|
void RadarProductLayer::UpdateColorTable()
|
||||||
{
|
{
|
||||||
BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "UpdateColorTable()";
|
BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "UpdateColorTable()";
|
||||||
|
|
||||||
p->colorTableUpdated_ = false;
|
p->colorTableNeedsUpdate_ = false;
|
||||||
|
|
||||||
gl::OpenGLFunctions& gl = p->gl_;
|
gl::OpenGLFunctions& gl = p->gl_;
|
||||||
|
|
||||||
|
|
@ -272,14 +272,14 @@ void RadarProductLayer::UpdateColorTable()
|
||||||
gl.glGenerateMipmap(GL_TEXTURE_1D);
|
gl.glGenerateMipmap(GL_TEXTURE_1D);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadarProductLayer::ReceiveColorTableUpdate()
|
void RadarProductLayer::UpdateColorTableNextFrame()
|
||||||
{
|
{
|
||||||
p->colorTableUpdated_ = true;
|
p->colorTableNeedsUpdate_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadarProductLayer::ReceivePlotUpdate()
|
void RadarProductLayer::UpdateSweepNextFrame()
|
||||||
{
|
{
|
||||||
p->plotUpdated_ = true;
|
p->sweepNeedsUpdate_ = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static glm::vec2
|
static glm::vec2
|
||||||
|
|
|
||||||
|
|
@ -30,12 +30,13 @@ public:
|
||||||
void render(const QMapbox::CustomLayerRenderParameters&) override final;
|
void render(const QMapbox::CustomLayerRenderParameters&) override final;
|
||||||
void deinitialize() override final;
|
void deinitialize() override final;
|
||||||
|
|
||||||
|
private:
|
||||||
void UpdateColorTable();
|
void UpdateColorTable();
|
||||||
void UpdateSweep();
|
void UpdateSweep();
|
||||||
|
|
||||||
public slots:
|
private slots:
|
||||||
void ReceiveColorTableUpdate();
|
void UpdateColorTableNextFrame();
|
||||||
void ReceivePlotUpdate();
|
void UpdateSweepNextFrame();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<RadarProductLayerImpl> p;
|
std::unique_ptr<RadarProductLayerImpl> p;
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public:
|
||||||
explicit RadarProductViewImpl(
|
explicit RadarProductViewImpl(
|
||||||
std::shared_ptr<manager::RadarProductManager> radarProductManager) :
|
std::shared_ptr<manager::RadarProductManager> radarProductManager) :
|
||||||
radarProductManager_(radarProductManager),
|
radarProductManager_(radarProductManager),
|
||||||
plotTime_(),
|
sweepTime_(),
|
||||||
colorTable_ {boost::gil::rgba8_pixel_t(0, 128, 0, 255),
|
colorTable_ {boost::gil::rgba8_pixel_t(0, 128, 0, 255),
|
||||||
boost::gil::rgba8_pixel_t(255, 192, 0, 255),
|
boost::gil::rgba8_pixel_t(255, 192, 0, 255),
|
||||||
boost::gil::rgba8_pixel_t(255, 0, 0, 255)}
|
boost::gil::rgba8_pixel_t(255, 0, 0, 255)}
|
||||||
|
|
@ -40,7 +40,7 @@ public:
|
||||||
std::vector<uint8_t> dataMoments8_;
|
std::vector<uint8_t> dataMoments8_;
|
||||||
std::vector<uint16_t> dataMoments16_;
|
std::vector<uint16_t> dataMoments16_;
|
||||||
|
|
||||||
std::chrono::system_clock::time_point plotTime_;
|
std::chrono::system_clock::time_point sweepTime_;
|
||||||
|
|
||||||
std::vector<boost::gil::rgba8_pixel_t> colorTable_;
|
std::vector<boost::gil::rgba8_pixel_t> colorTable_;
|
||||||
};
|
};
|
||||||
|
|
@ -52,7 +52,7 @@ RadarProductView::RadarProductView(
|
||||||
connect(radarProductManager.get(),
|
connect(radarProductManager.get(),
|
||||||
&manager::RadarProductManager::Level2DataLoaded,
|
&manager::RadarProductManager::Level2DataLoaded,
|
||||||
this,
|
this,
|
||||||
&RadarProductView::UpdatePlot);
|
&RadarProductView::ComputeSweep);
|
||||||
}
|
}
|
||||||
RadarProductView::~RadarProductView() = default;
|
RadarProductView::~RadarProductView() = default;
|
||||||
|
|
||||||
|
|
@ -69,7 +69,7 @@ RadarProductView::color_table() const
|
||||||
|
|
||||||
void RadarProductView::Initialize()
|
void RadarProductView::Initialize()
|
||||||
{
|
{
|
||||||
UpdatePlot();
|
ComputeSweep();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::tuple<const void*, size_t, size_t> RadarProductView::GetMomentData()
|
std::tuple<const void*, size_t, size_t> RadarProductView::GetMomentData()
|
||||||
|
|
@ -117,14 +117,14 @@ void RadarProductView::LoadColorTable(
|
||||||
emit ColorTableLoaded();
|
emit ColorTableLoaded();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::chrono::system_clock::time_point RadarProductView::PlotTime()
|
std::chrono::system_clock::time_point RadarProductView::SweepTime()
|
||||||
{
|
{
|
||||||
return p->plotTime_;
|
return p->sweepTime_;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadarProductView::UpdatePlot()
|
void RadarProductView::ComputeSweep()
|
||||||
{
|
{
|
||||||
BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "UpdatePlot()";
|
BOOST_LOG_TRIVIAL(debug) << logPrefix_ << "ComputeSweep()";
|
||||||
|
|
||||||
boost::timer::cpu_timer timer;
|
boost::timer::cpu_timer timer;
|
||||||
|
|
||||||
|
|
@ -143,8 +143,8 @@ void RadarProductView::UpdatePlot()
|
||||||
auto radarData = level2Data->radar_data()[0];
|
auto radarData = level2Data->radar_data()[0];
|
||||||
wsr88d::rda::DataBlockType blockType = wsr88d::rda::DataBlockType::MomentRef;
|
wsr88d::rda::DataBlockType blockType = wsr88d::rda::DataBlockType::MomentRef;
|
||||||
|
|
||||||
p->plotTime_ = TimePoint(radarData[0]->modified_julian_date(),
|
p->sweepTime_ = TimePoint(radarData[0]->modified_julian_date(),
|
||||||
radarData[0]->collection_time());
|
radarData[0]->collection_time());
|
||||||
|
|
||||||
// Calculate vertices
|
// Calculate vertices
|
||||||
timer.start();
|
timer.start();
|
||||||
|
|
@ -352,7 +352,7 @@ void RadarProductView::UpdatePlot()
|
||||||
BOOST_LOG_TRIVIAL(debug)
|
BOOST_LOG_TRIVIAL(debug)
|
||||||
<< logPrefix_ << "Vertices calculated in " << timer.format(6, "%ws");
|
<< logPrefix_ << "Vertices calculated in " << timer.format(6, "%ws");
|
||||||
|
|
||||||
emit PlotUpdated();
|
emit SweepComputed();
|
||||||
}
|
}
|
||||||
|
|
||||||
static std::chrono::system_clock::time_point
|
static std::chrono::system_clock::time_point
|
||||||
|
|
|
||||||
|
|
@ -33,14 +33,14 @@ public:
|
||||||
std::tuple<const void*, size_t, size_t> GetMomentData();
|
std::tuple<const void*, size_t, size_t> GetMomentData();
|
||||||
void LoadColorTable(std::shared_ptr<common::ColorTable> colorTable);
|
void LoadColorTable(std::shared_ptr<common::ColorTable> colorTable);
|
||||||
|
|
||||||
std::chrono::system_clock::time_point PlotTime();
|
std::chrono::system_clock::time_point SweepTime();
|
||||||
|
|
||||||
public slots:
|
protected slots:
|
||||||
void UpdatePlot();
|
void ComputeSweep();
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void ColorTableLoaded();
|
void ColorTableLoaded();
|
||||||
void PlotUpdated();
|
void SweepComputed();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unique_ptr<RadarProductViewImpl> p;
|
std::unique_ptr<RadarProductViewImpl> p;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue