mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 13:10:05 +00:00
Do not display an elevation number when there is non
This commit is contained in:
parent
484c08c455
commit
24f5f0a3e3
12 changed files with 166 additions and 145 deletions
|
|
@ -615,7 +615,7 @@ common::Level3ProductCategoryMap MapWidget::GetAvailableLevel3Categories()
|
|||
}
|
||||
}
|
||||
|
||||
float MapWidget::GetElevation() const
|
||||
std::optional<float> MapWidget::GetElevation() const
|
||||
{
|
||||
auto radarProductView = p->context_->radar_product_view();
|
||||
|
||||
|
|
@ -625,7 +625,7 @@ float MapWidget::GetElevation() const
|
|||
}
|
||||
else
|
||||
{
|
||||
return 0.0f;
|
||||
return {};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include <chrono>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
#include <qmaplibre.hpp>
|
||||
|
||||
|
|
@ -41,7 +42,7 @@ public:
|
|||
|
||||
[[nodiscard]] common::Level3ProductCategoryMap
|
||||
GetAvailableLevel3Categories();
|
||||
[[nodiscard]] float GetElevation() const;
|
||||
[[nodiscard]] std::optional<float> GetElevation() const;
|
||||
[[nodiscard]] std::vector<float> GetElevationCuts() const;
|
||||
[[nodiscard]] std::vector<std::string> GetLevel3Products();
|
||||
[[nodiscard]] std::string GetMapStyle() const;
|
||||
|
|
|
|||
|
|
@ -428,21 +428,30 @@ void OverlayLayer::Render(const QMapLibre::CustomLayerRenderParameters& params)
|
|||
{
|
||||
// Render product name
|
||||
const std::string productName = radarProductView->GetRadarProductName();
|
||||
const float elevation = radarProductView->elevation();
|
||||
const std::optional<float> elevation = radarProductView->elevation();
|
||||
|
||||
if (productName.length() > 0 && !productName.starts_with('?'))
|
||||
{
|
||||
const std::string elevationString =
|
||||
(QString::number(elevation, 'f', 1) + common::Characters::DEGREE)
|
||||
.toStdString();
|
||||
|
||||
ImGui::SetNextWindowPos(ImVec2 {0.0f, 0.0f});
|
||||
ImGui::Begin("Product Name",
|
||||
nullptr,
|
||||
ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize |
|
||||
ImGuiWindowFlags_AlwaysAutoResize);
|
||||
ImGui::TextUnformatted(
|
||||
fmt::format("{} ({})", productName, elevationString).c_str());
|
||||
|
||||
if (elevation.has_value())
|
||||
{
|
||||
const std::string elevationString =
|
||||
(QString::number(*elevation, 'f', 1) +
|
||||
common::Characters::DEGREE)
|
||||
.toStdString();
|
||||
ImGui::TextUnformatted(
|
||||
fmt::format("{} ({})", productName, elevationString).c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
ImGui::TextUnformatted(productName.c_str());
|
||||
}
|
||||
|
||||
ImGui::End();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,7 +242,9 @@ void Level2SettingsWidget::UpdateElevationSelection(float elevation)
|
|||
|
||||
void Level2SettingsWidget::UpdateSettings(map::MapWidget* activeMap)
|
||||
{
|
||||
float currentElevation = activeMap->GetElevation();
|
||||
std::optional<float> currentElevationOption = activeMap->GetElevation();
|
||||
float currentElevation =
|
||||
currentElevationOption.has_value() ? *currentElevationOption : 0.0f;
|
||||
std::vector<float> elevationCuts = activeMap->GetElevationCuts();
|
||||
|
||||
if (p->elevationCuts_ != elevationCuts)
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ uint16_t Level2ProductView::color_table_max() const
|
|||
}
|
||||
}
|
||||
|
||||
float Level2ProductView::elevation() const
|
||||
std::optional<float> Level2ProductView::elevation() const
|
||||
{
|
||||
return p->elevationCut_;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,7 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace view
|
||||
namespace scwx::qt::view
|
||||
{
|
||||
|
||||
class Level2ProductView : public RadarProductView
|
||||
|
|
@ -23,38 +19,47 @@ public:
|
|||
explicit Level2ProductView(
|
||||
common::Level2Product product,
|
||||
std::shared_ptr<manager::RadarProductManager> radarProductManager);
|
||||
~Level2ProductView();
|
||||
~Level2ProductView() override;
|
||||
|
||||
std::shared_ptr<common::ColorTable> color_table() const override;
|
||||
const std::vector<boost::gil::rgba8_pixel_t>&
|
||||
color_table_lut() const override;
|
||||
std::uint16_t color_table_min() const override;
|
||||
std::uint16_t color_table_max() const override;
|
||||
float elevation() const override;
|
||||
float range() const override;
|
||||
std::chrono::system_clock::time_point sweep_time() const override;
|
||||
float unit_scale() const override;
|
||||
std::string units() const override;
|
||||
std::uint16_t vcp() const override;
|
||||
const std::vector<float>& vertices() const override;
|
||||
Level2ProductView(const Level2ProductView&) = delete;
|
||||
Level2ProductView(Level2ProductView&&) = delete;
|
||||
Level2ProductView& operator=(const Level2ProductView&) = delete;
|
||||
Level2ProductView& operator=(Level2ProductView&&) = delete;
|
||||
|
||||
[[nodiscard]] std::shared_ptr<common::ColorTable>
|
||||
color_table() const override;
|
||||
[[nodiscard]] const std::vector<boost::gil::rgba8_pixel_t>&
|
||||
color_table_lut() const override;
|
||||
[[nodiscard]] std::uint16_t color_table_min() const override;
|
||||
[[nodiscard]] std::uint16_t color_table_max() const override;
|
||||
[[nodiscard]] std::optional<float> elevation() const override;
|
||||
[[nodiscard]] float range() const override;
|
||||
[[nodiscard]] std::chrono::system_clock::time_point
|
||||
sweep_time() const override;
|
||||
[[nodiscard]] float unit_scale() const override;
|
||||
[[nodiscard]] std::string units() const override;
|
||||
[[nodiscard]] std::uint16_t vcp() const override;
|
||||
[[nodiscard]] const std::vector<float>& vertices() const override;
|
||||
|
||||
void LoadColorTable(std::shared_ptr<common::ColorTable> colorTable) override;
|
||||
void SelectElevation(float elevation) override;
|
||||
void SelectProduct(const std::string& productName) override;
|
||||
|
||||
common::RadarProductGroup GetRadarProductGroup() const override;
|
||||
std::string GetRadarProductName() const override;
|
||||
std::vector<float> GetElevationCuts() const override;
|
||||
std::tuple<const void*, std::size_t, std::size_t>
|
||||
[[nodiscard]] common::RadarProductGroup
|
||||
GetRadarProductGroup() const override;
|
||||
[[nodiscard]] std::string GetRadarProductName() const override;
|
||||
[[nodiscard]] std::vector<float> GetElevationCuts() const override;
|
||||
[[nodiscard]] std::tuple<const void*, std::size_t, std::size_t>
|
||||
GetMomentData() const override;
|
||||
std::tuple<const void*, std::size_t, std::size_t>
|
||||
[[nodiscard]] std::tuple<const void*, std::size_t, std::size_t>
|
||||
GetCfpMomentData() const override;
|
||||
|
||||
std::optional<std::uint16_t>
|
||||
[[nodiscard]] std::optional<std::uint16_t>
|
||||
GetBinLevel(const common::Coordinate& coordinate) const override;
|
||||
std::optional<wsr88d::DataLevelCode>
|
||||
GetDataLevelCode(std::uint16_t level) const override;
|
||||
std::optional<float> GetDataValue(std::uint16_t level) const override;
|
||||
[[nodiscard]] std::optional<wsr88d::DataLevelCode>
|
||||
GetDataLevelCode(std::uint16_t level) const override;
|
||||
[[nodiscard]] std::optional<float>
|
||||
GetDataValue(std::uint16_t level) const override;
|
||||
|
||||
static std::shared_ptr<Level2ProductView>
|
||||
Create(common::Level2Product product,
|
||||
|
|
@ -75,6 +80,4 @@ private:
|
|||
std::unique_ptr<Impl> p;
|
||||
};
|
||||
|
||||
} // namespace view
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
} // namespace scwx::qt::view
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public:
|
|||
|
||||
float latitude_;
|
||||
float longitude_;
|
||||
float elevation_;
|
||||
std::optional<float> elevation_ {};
|
||||
float range_;
|
||||
std::uint16_t vcp_;
|
||||
|
||||
|
|
@ -92,7 +92,7 @@ boost::asio::thread_pool& Level3RadialView::thread_pool()
|
|||
return p->threadPool_;
|
||||
}
|
||||
|
||||
float Level3RadialView::elevation() const
|
||||
std::optional<float> Level3RadialView::elevation() const
|
||||
{
|
||||
return p->elevation_;
|
||||
}
|
||||
|
|
@ -312,7 +312,10 @@ void Level3RadialView::ComputeSweep()
|
|||
p->latitude_ = descriptionBlock->latitude_of_radar();
|
||||
p->longitude_ = descriptionBlock->longitude_of_radar();
|
||||
p->range_ = descriptionBlock->range();
|
||||
p->elevation_ = static_cast<float>(descriptionBlock->elevation().value());
|
||||
p->elevation_ =
|
||||
descriptionBlock->has_elevation() ?
|
||||
static_cast<float>(descriptionBlock->elevation().value()) :
|
||||
std::optional<float> {};
|
||||
p->sweepTime_ =
|
||||
scwx::util::TimePoint(descriptionBlock->volume_scan_date(),
|
||||
descriptionBlock->volume_scan_start_time() * 1000);
|
||||
|
|
|
|||
|
|
@ -6,11 +6,7 @@
|
|||
#include <memory>
|
||||
#include <vector>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace view
|
||||
namespace scwx::qt::view
|
||||
{
|
||||
|
||||
class Level3RadialView : public Level3ProductView
|
||||
|
|
@ -21,19 +17,24 @@ public:
|
|||
explicit Level3RadialView(
|
||||
const std::string& product,
|
||||
std::shared_ptr<manager::RadarProductManager> radarProductManager);
|
||||
~Level3RadialView();
|
||||
~Level3RadialView() override;
|
||||
|
||||
[[nodiscard]] float elevation() const override;
|
||||
[[nodiscard]] float range() const override;
|
||||
Level3RadialView(const Level3RadialView&) = delete;
|
||||
Level3RadialView(Level3RadialView&&) = delete;
|
||||
Level3RadialView& operator=(const Level3RadialView&) = delete;
|
||||
Level3RadialView& operator=(Level3RadialView&&) = delete;
|
||||
|
||||
[[nodiscard]] std::optional<float> elevation() const override;
|
||||
[[nodiscard]] float range() const override;
|
||||
[[nodiscard]] std::chrono::system_clock::time_point
|
||||
sweep_time() const override;
|
||||
[[nodiscard]] std::uint16_t vcp() const override;
|
||||
[[nodiscard]] const std::vector<float>& vertices() const override;
|
||||
|
||||
std::tuple<const void*, std::size_t, std::size_t>
|
||||
[[nodiscard]] std::tuple<const void*, std::size_t, std::size_t>
|
||||
GetMomentData() const override;
|
||||
|
||||
std::optional<std::uint16_t>
|
||||
[[nodiscard]] std::optional<std::uint16_t>
|
||||
GetBinLevel(const common::Coordinate& coordinate) const override;
|
||||
|
||||
static std::shared_ptr<Level3RadialView>
|
||||
|
|
@ -51,6 +52,4 @@ private:
|
|||
std::unique_ptr<Impl> p;
|
||||
};
|
||||
|
||||
} // namespace view
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
} // namespace scwx::qt::view
|
||||
|
|
|
|||
|
|
@ -85,9 +85,9 @@ std::uint16_t RadarProductView::color_table_max() const
|
|||
return kDefaultColorTableMax_;
|
||||
}
|
||||
|
||||
float RadarProductView::elevation() const
|
||||
std::optional<float> RadarProductView::elevation() const
|
||||
{
|
||||
return 0.0f;
|
||||
return {};
|
||||
}
|
||||
|
||||
std::shared_ptr<manager::RadarProductManager>
|
||||
|
|
|
|||
|
|
@ -16,11 +16,7 @@
|
|||
#include <QObject>
|
||||
#include <boost/asio/thread_pool.hpp>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace qt
|
||||
{
|
||||
namespace view
|
||||
namespace scwx::qt::view
|
||||
{
|
||||
|
||||
class RadarProductViewImpl;
|
||||
|
|
@ -32,20 +28,27 @@ class RadarProductView : public QObject
|
|||
public:
|
||||
explicit RadarProductView(
|
||||
std::shared_ptr<manager::RadarProductManager> radarProductManager);
|
||||
virtual ~RadarProductView();
|
||||
~RadarProductView() override;
|
||||
|
||||
virtual std::shared_ptr<common::ColorTable> color_table() const = 0;
|
||||
virtual const std::vector<boost::gil::rgba8_pixel_t>&
|
||||
color_table_lut() const;
|
||||
virtual std::uint16_t color_table_min() const;
|
||||
virtual std::uint16_t color_table_max() const;
|
||||
virtual float elevation() const;
|
||||
virtual float range() const;
|
||||
virtual std::chrono::system_clock::time_point sweep_time() const;
|
||||
virtual float unit_scale() const = 0;
|
||||
virtual std::string units() const = 0;
|
||||
virtual std::uint16_t vcp() const = 0;
|
||||
virtual const std::vector<float>& vertices() const = 0;
|
||||
RadarProductView(const RadarProductView&) = delete;
|
||||
RadarProductView(RadarProductView&&) = delete;
|
||||
RadarProductView& operator=(const RadarProductView&) = delete;
|
||||
RadarProductView& operator=(RadarProductView&&) = delete;
|
||||
|
||||
[[nodiscard]] virtual std::shared_ptr<common::ColorTable>
|
||||
color_table() const = 0;
|
||||
[[nodiscard]] virtual const std::vector<boost::gil::rgba8_pixel_t>&
|
||||
color_table_lut() const;
|
||||
[[nodiscard]] virtual std::uint16_t color_table_min() const;
|
||||
[[nodiscard]] virtual std::uint16_t color_table_max() const;
|
||||
[[nodiscard]] virtual std::optional<float> elevation() const;
|
||||
[[nodiscard]] virtual float range() const;
|
||||
[[nodiscard]] virtual std::chrono::system_clock::time_point
|
||||
sweep_time() const;
|
||||
[[nodiscard]] virtual float unit_scale() const = 0;
|
||||
[[nodiscard]] virtual std::string units() const = 0;
|
||||
[[nodiscard]] virtual std::uint16_t vcp() const = 0;
|
||||
[[nodiscard]] virtual const std::vector<float>& vertices() const = 0;
|
||||
|
||||
[[nodiscard]] std::shared_ptr<manager::RadarProductManager>
|
||||
radar_product_manager() const;
|
||||
|
|
@ -66,24 +69,26 @@ public:
|
|||
void SelectTime(std::chrono::system_clock::time_point time);
|
||||
void Update();
|
||||
|
||||
bool IsInitialized() const;
|
||||
[[nodiscard]] bool IsInitialized() const;
|
||||
|
||||
virtual common::RadarProductGroup GetRadarProductGroup() const = 0;
|
||||
virtual std::string GetRadarProductName() const = 0;
|
||||
virtual std::vector<float> GetElevationCuts() const;
|
||||
virtual std::tuple<const void*, std::size_t, std::size_t>
|
||||
[[nodiscard]] virtual common::RadarProductGroup
|
||||
GetRadarProductGroup() const = 0;
|
||||
[[nodiscard]] virtual std::string GetRadarProductName() const = 0;
|
||||
[[nodiscard]] virtual std::vector<float> GetElevationCuts() const;
|
||||
[[nodiscard]] virtual std::tuple<const void*, std::size_t, std::size_t>
|
||||
GetMomentData() const = 0;
|
||||
virtual std::tuple<const void*, std::size_t, std::size_t>
|
||||
[[nodiscard]] virtual std::tuple<const void*, std::size_t, std::size_t>
|
||||
GetCfpMomentData() const;
|
||||
|
||||
virtual std::optional<std::uint16_t>
|
||||
[[nodiscard]] virtual std::optional<std::uint16_t>
|
||||
GetBinLevel(const common::Coordinate& coordinate) const = 0;
|
||||
virtual std::optional<wsr88d::DataLevelCode>
|
||||
GetDataLevelCode(std::uint16_t level) const = 0;
|
||||
virtual std::optional<float> GetDataValue(std::uint16_t level) const = 0;
|
||||
virtual bool IgnoreUnits() const;
|
||||
[[nodiscard]] virtual std::optional<wsr88d::DataLevelCode>
|
||||
GetDataLevelCode(std::uint16_t level) const = 0;
|
||||
[[nodiscard]] virtual std::optional<float>
|
||||
GetDataValue(std::uint16_t level) const = 0;
|
||||
[[nodiscard]] virtual bool IgnoreUnits() const;
|
||||
|
||||
virtual std::vector<std::pair<std::string, std::string>>
|
||||
[[nodiscard]] virtual std::vector<std::pair<std::string, std::string>>
|
||||
GetDescriptionFields() const;
|
||||
|
||||
protected:
|
||||
|
|
@ -105,6 +110,4 @@ private:
|
|||
std::unique_ptr<RadarProductViewImpl> p;
|
||||
};
|
||||
|
||||
} // namespace view
|
||||
} // namespace qt
|
||||
} // namespace scwx
|
||||
} // namespace scwx::qt::view
|
||||
|
|
|
|||
|
|
@ -9,11 +9,7 @@
|
|||
|
||||
#include <units/angle.h>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace wsr88d
|
||||
{
|
||||
namespace rpg
|
||||
namespace scwx::wsr88d::rpg
|
||||
{
|
||||
|
||||
class ProductDescriptionBlockImpl;
|
||||
|
|
@ -22,7 +18,7 @@ class ProductDescriptionBlock : public awips::Message
|
|||
{
|
||||
public:
|
||||
explicit ProductDescriptionBlock();
|
||||
~ProductDescriptionBlock();
|
||||
~ProductDescriptionBlock() override;
|
||||
|
||||
ProductDescriptionBlock(const ProductDescriptionBlock&) = delete;
|
||||
ProductDescriptionBlock& operator=(const ProductDescriptionBlock&) = delete;
|
||||
|
|
@ -30,57 +26,59 @@ public:
|
|||
ProductDescriptionBlock(ProductDescriptionBlock&&) noexcept;
|
||||
ProductDescriptionBlock& operator=(ProductDescriptionBlock&&) noexcept;
|
||||
|
||||
int16_t block_divider() const;
|
||||
float latitude_of_radar() const;
|
||||
float longitude_of_radar() const;
|
||||
int16_t height_of_radar() const;
|
||||
int16_t product_code() const;
|
||||
uint16_t operational_mode() const;
|
||||
uint16_t volume_coverage_pattern() const;
|
||||
int16_t sequence_number() const;
|
||||
uint16_t volume_scan_number() const;
|
||||
uint16_t volume_scan_date() const;
|
||||
uint32_t volume_scan_start_time() const;
|
||||
uint16_t generation_date_of_product() const;
|
||||
uint32_t generation_time_of_product() const;
|
||||
uint16_t elevation_number() const;
|
||||
uint16_t data_level_threshold(size_t i) const;
|
||||
uint8_t version() const;
|
||||
uint8_t spot_blank() const;
|
||||
uint32_t offset_to_symbology() const;
|
||||
uint32_t offset_to_graphic() const;
|
||||
uint32_t offset_to_tabular() const;
|
||||
[[nodiscard]] int16_t block_divider() const;
|
||||
[[nodiscard]] float latitude_of_radar() const;
|
||||
[[nodiscard]] float longitude_of_radar() const;
|
||||
[[nodiscard]] int16_t height_of_radar() const;
|
||||
[[nodiscard]] int16_t product_code() const;
|
||||
[[nodiscard]] uint16_t operational_mode() const;
|
||||
[[nodiscard]] uint16_t volume_coverage_pattern() const;
|
||||
[[nodiscard]] int16_t sequence_number() const;
|
||||
[[nodiscard]] uint16_t volume_scan_number() const;
|
||||
[[nodiscard]] uint16_t volume_scan_date() const;
|
||||
[[nodiscard]] uint32_t volume_scan_start_time() const;
|
||||
[[nodiscard]] uint16_t generation_date_of_product() const;
|
||||
[[nodiscard]] uint32_t generation_time_of_product() const;
|
||||
[[nodiscard]] uint16_t elevation_number() const;
|
||||
[[nodiscard]] uint16_t data_level_threshold(size_t i) const;
|
||||
[[nodiscard]] uint8_t version() const;
|
||||
[[nodiscard]] uint8_t spot_blank() const;
|
||||
[[nodiscard]] uint32_t offset_to_symbology() const;
|
||||
[[nodiscard]] uint32_t offset_to_graphic() const;
|
||||
[[nodiscard]] uint32_t offset_to_tabular() const;
|
||||
|
||||
float range() const;
|
||||
uint16_t range_raw() const;
|
||||
float x_resolution() const;
|
||||
uint16_t x_resolution_raw() const;
|
||||
float y_resolution() const;
|
||||
uint16_t y_resolution_raw() const;
|
||||
[[nodiscard]] float range() const;
|
||||
[[nodiscard]] uint16_t range_raw() const;
|
||||
[[nodiscard]] float x_resolution() const;
|
||||
[[nodiscard]] uint16_t x_resolution_raw() const;
|
||||
[[nodiscard]] float y_resolution() const;
|
||||
[[nodiscard]] uint16_t y_resolution_raw() const;
|
||||
|
||||
uint16_t threshold() const;
|
||||
float offset() const;
|
||||
float scale() const;
|
||||
uint16_t number_of_levels() const;
|
||||
[[nodiscard]] uint16_t threshold() const;
|
||||
[[nodiscard]] float offset() const;
|
||||
[[nodiscard]] float scale() const;
|
||||
[[nodiscard]] uint16_t number_of_levels() const;
|
||||
|
||||
std::optional<DataLevelCode> data_level_code(std::uint8_t level) const;
|
||||
std::optional<float> data_value(std::uint8_t level) const;
|
||||
[[nodiscard]] std::optional<DataLevelCode>
|
||||
data_level_code(std::uint8_t level) const;
|
||||
[[nodiscard]] std::optional<float> data_value(std::uint8_t level) const;
|
||||
|
||||
std::uint16_t log_start() const;
|
||||
float log_offset() const;
|
||||
float log_scale() const;
|
||||
[[nodiscard]] std::uint16_t log_start() const;
|
||||
[[nodiscard]] float log_offset() const;
|
||||
[[nodiscard]] float log_scale() const;
|
||||
|
||||
float gr_scale() const;
|
||||
[[nodiscard]] float gr_scale() const;
|
||||
|
||||
std::uint8_t data_mask() const;
|
||||
std::uint8_t topped_mask() const;
|
||||
[[nodiscard]] std::uint8_t data_mask() const;
|
||||
[[nodiscard]] std::uint8_t topped_mask() const;
|
||||
|
||||
units::angle::degrees<double> elevation() const;
|
||||
[[nodiscard]] units::angle::degrees<double> elevation() const;
|
||||
[[nodiscard]] bool has_elevation() const;
|
||||
|
||||
bool IsCompressionEnabled() const;
|
||||
bool IsDataLevelCoded() const;
|
||||
[[nodiscard]] bool IsCompressionEnabled() const;
|
||||
[[nodiscard]] bool IsDataLevelCoded() const;
|
||||
|
||||
size_t data_size() const override;
|
||||
[[nodiscard]] size_t data_size() const override;
|
||||
|
||||
bool Parse(std::istream& is) override;
|
||||
|
||||
|
|
@ -90,6 +88,4 @@ private:
|
|||
std::unique_ptr<ProductDescriptionBlockImpl> p;
|
||||
};
|
||||
|
||||
} // namespace rpg
|
||||
} // namespace wsr88d
|
||||
} // namespace scwx
|
||||
} // namespace scwx::wsr88d::rpg
|
||||
|
|
|
|||
|
|
@ -724,7 +724,7 @@ units::angle::degrees<double> ProductDescriptionBlock::elevation() const
|
|||
{
|
||||
double elevation = 0.0;
|
||||
|
||||
if (p->elevationNumber_ > 0)
|
||||
if (has_elevation())
|
||||
{
|
||||
// Elevation is given in tenths of a degree
|
||||
// NOLINTNEXTLINE(cppcoreguidelines-avoid-magic-numbers)
|
||||
|
|
@ -734,6 +734,11 @@ units::angle::degrees<double> ProductDescriptionBlock::elevation() const
|
|||
return units::angle::degrees<double> {elevation};
|
||||
}
|
||||
|
||||
bool ProductDescriptionBlock::has_elevation() const
|
||||
{
|
||||
return p->elevationNumber_ > 0;
|
||||
}
|
||||
|
||||
bool ProductDescriptionBlock::IsCompressionEnabled() const
|
||||
{
|
||||
bool isCompressed = false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue