mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-30 21:30:05 +00:00 
			
		
		
		
	Don't create Digital Radar Data Moment Blocks for empty moment data
Fixes #150
This commit is contained in:
		
							parent
							
								
									524de364f2
								
							
						
					
					
						commit
						cca71410f5
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -532,7 +532,8 @@ bool DigitalRadarData::Parse(std::istream& is) | ||||||
|       messageValid = false; |       messageValid = false; | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|    if (messageValid && p->surveillancePointer_ != 0) |    if (messageValid && p->surveillancePointer_ != 0 && | ||||||
|  |        p->numberOfSurveillanceBins_ != 0) | ||||||
|    { |    { | ||||||
|       p->reflectivityDataBlock_ = std::make_shared<Impl::MomentDataBlock>( |       p->reflectivityDataBlock_ = std::make_shared<Impl::MomentDataBlock>( | ||||||
|          this, DataBlockType::MomentRef); |          this, DataBlockType::MomentRef); | ||||||
|  | @ -546,7 +547,7 @@ bool DigitalRadarData::Parse(std::istream& is) | ||||||
|               p->numberOfSurveillanceBins_); |               p->numberOfSurveillanceBins_); | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|    if (messageValid && p->velocityPointer_ != 0) |    if (messageValid && p->velocityPointer_ != 0 && p->numberOfDopplerBins_ != 0) | ||||||
|    { |    { | ||||||
|       p->dopplerVelocityDataBlock_ = std::make_shared<Impl::MomentDataBlock>( |       p->dopplerVelocityDataBlock_ = std::make_shared<Impl::MomentDataBlock>( | ||||||
|          this, DataBlockType::MomentVel); |          this, DataBlockType::MomentVel); | ||||||
|  | @ -561,7 +562,8 @@ bool DigitalRadarData::Parse(std::istream& is) | ||||||
|               p->numberOfDopplerBins_); |               p->numberOfDopplerBins_); | ||||||
|    } |    } | ||||||
| 
 | 
 | ||||||
|    if (messageValid && p->spectralWidthPointer_ != 0) |    if (messageValid && p->spectralWidthPointer_ != 0 && | ||||||
|  |        p->numberOfDopplerBins_ != 0) | ||||||
|    { |    { | ||||||
|       p->dopplerSpectrumWidthDataBlock_ = |       p->dopplerSpectrumWidthDataBlock_ = | ||||||
|          std::make_shared<Impl::MomentDataBlock>(this, |          std::make_shared<Impl::MomentDataBlock>(this, | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Dan Paulat
						Dan Paulat