mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 04:30:05 +00:00 
			
		
		
		
	Correlation coefficient should be scaled by 100 when a % sign is shown
This commit is contained in:
		
							parent
							
								
									3f5a0056e4
								
							
						
					
					
						commit
						a92248b4d9
					
				
					 2 changed files with 25 additions and 0 deletions
				
			
		|  | @ -51,6 +51,9 @@ static const std::unordered_map<common::Level2Product, | |||
|       {common::Level2Product::ClutterFilterPowerRemoved, | ||||
|        wsr88d::rda::DataBlockType::MomentCfp}}; | ||||
| 
 | ||||
| static const std::unordered_map<common::Level2Product, float> productScale_ { | ||||
|    {common::Level2Product::CorrelationCoefficient, 100.0f}}; | ||||
| 
 | ||||
| static const std::unordered_map<common::Level2Product, std::string> | ||||
|    productUnits_ {{common::Level2Product::Reflectivity, "dBZ"}, | ||||
|                   {common::Level2Product::DifferentialReflectivity, "dB"}, | ||||
|  | @ -295,6 +298,15 @@ float Level2ProductView::unit_scale() const | |||
|       break; | ||||
|    } | ||||
| 
 | ||||
|    if (p->otherUnits_ == types::OtherUnits::Default) | ||||
|    { | ||||
|       auto it = productScale_.find(p->product_); | ||||
|       if (it != productScale_.cend()) | ||||
|       { | ||||
|          return it->second; | ||||
|       } | ||||
|    } | ||||
| 
 | ||||
|    return 1.0f; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -29,6 +29,10 @@ static const auto        logger_    = util::Logger::Create(logPrefix_); | |||
| 
 | ||||
| static constexpr uint16_t RANGE_FOLDED = 1u; | ||||
| 
 | ||||
| static const std::unordered_map<common::Level3ProductCategory, float> | ||||
|    categoryScale_ { | ||||
|       {common::Level3ProductCategory::CorrelationCoefficient, 100.0f}}; | ||||
| 
 | ||||
| static const std::unordered_map<common::Level3ProductCategory, std::string> | ||||
|    categoryUnits_ { | ||||
|       {common::Level3ProductCategory::Reflectivity, "dBZ"}, | ||||
|  | @ -217,6 +221,15 @@ float Level3ProductView::unit_scale() const | |||
|       break; | ||||
|    } | ||||
| 
 | ||||
|    if (p->otherUnits_ == types::OtherUnits::Default) | ||||
|    { | ||||
|       auto it = categoryScale_.find(p->category_); | ||||
|       if (it != categoryScale_.cend()) | ||||
|       { | ||||
|          return it->second; | ||||
|       } | ||||
|    } | ||||
| 
 | ||||
|    return 1.0f; | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat