mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 02:10:05 +00:00 
			
		
		
		
	Add sequence number, volume scan and elevation to product description hover
This commit is contained in:
		
							parent
							
								
									c190813946
								
							
						
					
					
						commit
						d5222eac63
					
				
					 3 changed files with 36 additions and 2 deletions
				
			
		|  | @ -1,4 +1,5 @@ | ||||||
| #include <scwx/qt/view/level3_product_view.hpp> | #include <scwx/qt/view/level3_product_view.hpp> | ||||||
|  | #include <scwx/common/characters.hpp> | ||||||
| #include <scwx/common/constants.hpp> | #include <scwx/common/constants.hpp> | ||||||
| #include <scwx/util/logger.hpp> | #include <scwx/util/logger.hpp> | ||||||
| #include <scwx/util/time.hpp> | #include <scwx/util/time.hpp> | ||||||
|  | @ -8,6 +9,7 @@ | ||||||
| 
 | 
 | ||||||
| #include <boost/range/irange.hpp> | #include <boost/range/irange.hpp> | ||||||
| #include <boost/timer/timer.hpp> | #include <boost/timer/timer.hpp> | ||||||
|  | #include <fmt/format.h> | ||||||
| 
 | 
 | ||||||
| #if !defined(_MSC_VER) | #if !defined(_MSC_VER) | ||||||
| #   include <date/date.h> | #   include <date/date.h> | ||||||
|  | @ -189,6 +191,22 @@ Level3ProductView::GetDescriptionFields() const | ||||||
|          description.emplace_back( |          description.emplace_back( | ||||||
|             "Product Time", |             "Product Time", | ||||||
|             scwx::util::TimeString(productTime, currentZone, false)); |             scwx::util::TimeString(productTime, currentZone, false)); | ||||||
|  | 
 | ||||||
|  |          description.emplace_back( | ||||||
|  |             "Sequence Number", | ||||||
|  |             fmt::format("{}", descriptionBlock->sequence_number())); | ||||||
|  |          description.emplace_back( | ||||||
|  |             "Volume Scan", | ||||||
|  |             fmt::format("{}", descriptionBlock->volume_scan_number())); | ||||||
|  | 
 | ||||||
|  |          if (descriptionBlock->elevation_number() > 0) | ||||||
|  |          { | ||||||
|  |             description.emplace_back( | ||||||
|  |                "Elevation", | ||||||
|  |                fmt::format("{}{}", | ||||||
|  |                            descriptionBlock->elevation().value(), | ||||||
|  |                            common::Unicode::kDegree)); | ||||||
|  |          } | ||||||
|       } |       } | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -5,6 +5,8 @@ | ||||||
| #include <cstdint> | #include <cstdint> | ||||||
| #include <memory> | #include <memory> | ||||||
| 
 | 
 | ||||||
|  | #include <units/angle.h> | ||||||
|  | 
 | ||||||
| namespace scwx | namespace scwx | ||||||
| { | { | ||||||
| namespace wsr88d | namespace wsr88d | ||||||
|  | @ -20,7 +22,7 @@ public: | ||||||
|    explicit ProductDescriptionBlock(); |    explicit ProductDescriptionBlock(); | ||||||
|    ~ProductDescriptionBlock(); |    ~ProductDescriptionBlock(); | ||||||
| 
 | 
 | ||||||
|    ProductDescriptionBlock(const ProductDescriptionBlock&) = delete; |    ProductDescriptionBlock(const ProductDescriptionBlock&)            = delete; | ||||||
|    ProductDescriptionBlock& operator=(const ProductDescriptionBlock&) = delete; |    ProductDescriptionBlock& operator=(const ProductDescriptionBlock&) = delete; | ||||||
| 
 | 
 | ||||||
|    ProductDescriptionBlock(ProductDescriptionBlock&&) noexcept; |    ProductDescriptionBlock(ProductDescriptionBlock&&) noexcept; | ||||||
|  | @ -62,6 +64,8 @@ public: | ||||||
|    float log_offset() const; |    float log_offset() const; | ||||||
|    float log_scale() const; |    float log_scale() const; | ||||||
| 
 | 
 | ||||||
|  |    units::angle::degrees<double> elevation() const; | ||||||
|  | 
 | ||||||
|    bool IsCompressionEnabled() const; |    bool IsCompressionEnabled() const; | ||||||
| 
 | 
 | ||||||
|    size_t data_size() const override; |    size_t data_size() const override; | ||||||
|  |  | ||||||
|  | @ -139,7 +139,7 @@ ProductDescriptionBlock::ProductDescriptionBlock() : | ||||||
| ProductDescriptionBlock::~ProductDescriptionBlock() = default; | ProductDescriptionBlock::~ProductDescriptionBlock() = default; | ||||||
| 
 | 
 | ||||||
| ProductDescriptionBlock::ProductDescriptionBlock( | ProductDescriptionBlock::ProductDescriptionBlock( | ||||||
|    ProductDescriptionBlock&&) noexcept                    = default; |    ProductDescriptionBlock&&) noexcept = default; | ||||||
| ProductDescriptionBlock& ProductDescriptionBlock::operator=( | ProductDescriptionBlock& ProductDescriptionBlock::operator=( | ||||||
|    ProductDescriptionBlock&&) noexcept = default; |    ProductDescriptionBlock&&) noexcept = default; | ||||||
| 
 | 
 | ||||||
|  | @ -590,6 +590,18 @@ float ProductDescriptionBlock::log_scale() const | ||||||
|    return logScale; |    return logScale; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
|  | units::angle::degrees<double> ProductDescriptionBlock::elevation() const | ||||||
|  | { | ||||||
|  |    double elevation = 0.0; | ||||||
|  | 
 | ||||||
|  |    if (p->elevationNumber_ > 0) | ||||||
|  |    { | ||||||
|  |       elevation = p->parameters_[2] * 0.1; | ||||||
|  |    } | ||||||
|  | 
 | ||||||
|  |    return units::angle::degrees<double> {elevation}; | ||||||
|  | } | ||||||
|  | 
 | ||||||
| bool ProductDescriptionBlock::IsCompressionEnabled() const | bool ProductDescriptionBlock::IsCompressionEnabled() const | ||||||
| { | { | ||||||
|    bool isCompressed = false; |    bool isCompressed = false; | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat