Initial Level 3 header and description information

This commit is contained in:
Dan Paulat 2021-12-24 10:03:53 -06:00
parent a280f37289
commit 0303412519
6 changed files with 855 additions and 0 deletions

View file

@ -0,0 +1,45 @@
#pragma once
#include <cstdint>
#include <memory>
namespace scwx
{
namespace wsr88d
{
namespace rpg
{
class Level3MessageHeaderImpl;
class Level3MessageHeader
{
public:
explicit Level3MessageHeader();
~Level3MessageHeader();
Level3MessageHeader(const Level3MessageHeader&) = delete;
Level3MessageHeader& operator=(const Level3MessageHeader&) = delete;
Level3MessageHeader(Level3MessageHeader&&) noexcept;
Level3MessageHeader& operator=(Level3MessageHeader&&) noexcept;
int16_t message_code() const;
uint16_t date_of_message() const;
uint32_t time_of_message() const;
uint32_t length_of_message() const;
uint16_t source_id() const;
uint16_t destination_id() const;
uint16_t number_blocks() const;
bool Parse(std::istream& is);
static const size_t SIZE = 18u;
private:
std::unique_ptr<Level3MessageHeaderImpl> p;
};
} // namespace rpg
} // namespace wsr88d
} // namespace scwx

View file

@ -0,0 +1,61 @@
#pragma once
#include <scwx/wsr88d/message.hpp>
#include <cstdint>
#include <memory>
namespace scwx
{
namespace wsr88d
{
namespace rpg
{
class ProductDescriptionBlockImpl;
class ProductDescriptionBlock : public Message
{
public:
explicit ProductDescriptionBlock();
~ProductDescriptionBlock();
ProductDescriptionBlock(const ProductDescriptionBlock&) = delete;
ProductDescriptionBlock& operator=(const ProductDescriptionBlock&) = delete;
ProductDescriptionBlock(ProductDescriptionBlock&&) noexcept;
ProductDescriptionBlock& operator=(ProductDescriptionBlock&&) noexcept;
int16_t block_divider() const;
int32_t latitude_of_radar() const;
int32_t 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;
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;
bool IsCompressionEnabled() const;
bool Parse(std::istream& is);
static const size_t SIZE = 102u;
private:
std::unique_ptr<ProductDescriptionBlockImpl> p;
};
} // namespace rpg
} // namespace wsr88d
} // namespace scwx

View file

@ -0,0 +1,55 @@
#pragma once
#include <memory>
#include <string>
namespace scwx
{
namespace wsr88d
{
namespace rpg
{
class WmoHeaderImpl;
/**
* @brief The WMO Header is defined in WMO Manual No. 386, with additional codes
* defined in WMO Codes Manual 306. The NWS summarizes the relevant
* information.
*
* <https://www.roc.noaa.gov/WSR88D/Level_III/Level3Info.aspx>
* <https://www.weather.gov/tg/head>
* <https://www.weather.gov/tg/headef>
* <https://www.weather.gov/tg/bbb>
* <https://www.weather.gov/tg/awips>
*/
class WmoHeader
{
public:
explicit WmoHeader();
~WmoHeader();
WmoHeader(const WmoHeader&) = delete;
WmoHeader& operator=(const WmoHeader&) = delete;
WmoHeader(WmoHeader&&) noexcept;
WmoHeader& operator=(WmoHeader&&) noexcept;
const std::string& data_type() const;
const std::string& geographic_designator() const;
const std::string& bulletin_id() const;
const std::string& icao() const;
const std::string& date_time() const;
const std::string& bbb_indicator() const;
const std::string& product_category() const;
const std::string& product_designator() const;
bool Parse(std::istream& is);
private:
std::unique_ptr<WmoHeaderImpl> p;
};
} // namespace rpg
} // namespace wsr88d
} // namespace scwx