mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 21:40:05 +00:00
Draw 4-bit encoded radial data
This commit is contained in:
parent
41b491314b
commit
8d1be0f54a
7 changed files with 158 additions and 25 deletions
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <scwx/wsr88d/rpg/packet.hpp>
|
||||
#include <scwx/wsr88d/rpg/generic_radial_data_packet.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
|
@ -14,7 +14,7 @@ namespace rpg
|
|||
|
||||
class DigitalRadialDataArrayPacketImpl;
|
||||
|
||||
class DigitalRadialDataArrayPacket : public Packet
|
||||
class DigitalRadialDataArrayPacket : public GenericRadialDataPacket
|
||||
{
|
||||
public:
|
||||
explicit DigitalRadialDataArrayPacket();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,43 @@
|
|||
#pragma once
|
||||
|
||||
#include <scwx/wsr88d/rpg/packet.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
namespace scwx
|
||||
{
|
||||
namespace wsr88d
|
||||
{
|
||||
namespace rpg
|
||||
{
|
||||
|
||||
class GenericRadialDataPacketImpl;
|
||||
|
||||
class GenericRadialDataPacket : public Packet
|
||||
{
|
||||
public:
|
||||
explicit GenericRadialDataPacket();
|
||||
~GenericRadialDataPacket();
|
||||
|
||||
GenericRadialDataPacket(const GenericRadialDataPacket&) = delete;
|
||||
GenericRadialDataPacket& operator=(const GenericRadialDataPacket&) = delete;
|
||||
|
||||
GenericRadialDataPacket(GenericRadialDataPacket&&) noexcept;
|
||||
GenericRadialDataPacket& operator=(GenericRadialDataPacket&&) noexcept;
|
||||
|
||||
virtual int16_t i_center_of_sweep() const = 0;
|
||||
virtual int16_t j_center_of_sweep() const = 0;
|
||||
virtual uint16_t number_of_radials() const = 0;
|
||||
virtual uint16_t number_of_range_bins() const = 0;
|
||||
virtual float start_angle(uint16_t r) const = 0;
|
||||
|
||||
virtual const std::vector<uint8_t>& level(uint16_t r) const = 0;
|
||||
|
||||
private:
|
||||
std::unique_ptr<GenericRadialDataPacketImpl> p;
|
||||
};
|
||||
|
||||
} // namespace rpg
|
||||
} // namespace wsr88d
|
||||
} // namespace scwx
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#pragma once
|
||||
|
||||
#include <scwx/wsr88d/rpg/packet.hpp>
|
||||
#include <scwx/wsr88d/rpg/generic_radial_data_packet.hpp>
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
|
@ -14,7 +14,7 @@ namespace rpg
|
|||
|
||||
class RadialDataPacketImpl;
|
||||
|
||||
class RadialDataPacket : public Packet
|
||||
class RadialDataPacket : public GenericRadialDataPacket
|
||||
{
|
||||
public:
|
||||
explicit RadialDataPacket();
|
||||
|
|
@ -34,6 +34,10 @@ public:
|
|||
float scale_factor() const;
|
||||
uint16_t number_of_radials() const;
|
||||
|
||||
float start_angle(uint16_t r) const;
|
||||
float delta_angle(uint16_t r) const;
|
||||
const std::vector<uint8_t>& level(uint16_t r) const;
|
||||
|
||||
size_t data_size() const override;
|
||||
|
||||
bool Parse(std::istream& is) override;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue