mirror of
				https://github.com/ciphervance/supercell-wx.git
				synced 2025-10-31 00:30:05 +00:00 
			
		
		
		
	Add radar altitude data form config json file into code
This commit is contained in:
		
							parent
							
								
									62414e5b10
								
							
						
					
					
						commit
						22ed4c36fc
					
				
					 2 changed files with 23 additions and 19 deletions
				
			
		|  | @ -51,6 +51,7 @@ public: | |||
|    std::string state_ {}; | ||||
|    std::string place_ {}; | ||||
|    std::string tzName_ {}; | ||||
|    double      altitude_ {0.0}; | ||||
| 
 | ||||
|    const scwx::util::time_zone* timeZone_ {nullptr}; | ||||
| }; | ||||
|  | @ -142,6 +143,11 @@ const scwx::util::time_zone* RadarSite::time_zone() const | |||
|    return p->timeZone_; | ||||
| } | ||||
| 
 | ||||
| units::length::feet<double> RadarSite::altitude() const | ||||
| { | ||||
|    return units::length::feet<double>(p->altitude_); | ||||
| } | ||||
| 
 | ||||
| std::shared_ptr<RadarSite> RadarSite::Get(const std::string& id) | ||||
| { | ||||
|    std::shared_lock           lock(siteMutex_); | ||||
|  | @ -268,6 +274,8 @@ size_t RadarSite::ReadConfig(const std::string& path) | |||
|             site->p->state_ = boost::json::value_to<std::string>(o.at("state")); | ||||
|             site->p->place_ = boost::json::value_to<std::string>(o.at("place")); | ||||
|             site->p->tzName_ = boost::json::value_to<std::string>(o.at("tz")); | ||||
|             site->p->altitude_ = | ||||
|                boost::json::value_to<double>(o.at("elevation")); | ||||
| 
 | ||||
|             try | ||||
|             { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 AdenKoperczak
						AdenKoperczak