class mrpt::maps::CWirelessPowerGridMap2D

Overview

CWirelessPowerGridMap2D represents a PDF of wifi concentrations over a 2D area.

There are a number of methods available to build the wifi grid-map, depending on the value of “TMapRepresentation maptype” passed in the constructor (see CRandomFieldGridMap2D for a discussion).

Update the map with insertIndividualReading() or insertObservation()

See also:

mrpt::maps::CRandomFieldGridMap2D, mrpt::maps::CMetricMap, mrpt::containers::CDynamicGrid, The application icp-slam, mrpt::maps::CMultiMetricMap

#include <mrpt/maps/CWirelessPowerGridMap2D.h>

class CWirelessPowerGridMap2D: public mrpt::maps::CRandomFieldGridMap2D
{
public:
    // typedefs

    typedef std::shared_ptr<mrpt::maps ::CWirelessPowerGridMap2D> Ptr;
    typedef std::shared_ptr<const mrpt::maps ::CWirelessPowerGridMap2D> ConstPtr;
    typedef std::unique_ptr<mrpt::maps ::CWirelessPowerGridMap2D> UniquePtr;
    typedef std::unique_ptr<const mrpt::maps ::CWirelessPowerGridMap2D> ConstUniquePtr;
    typedef std::vector<TRandomFieldCell> grid_data_t;
    typedef typename grid_data_t::iterator iterator;
    typedef typename grid_data_t::const_iterator const_iterator;

    // enums

    enum TGridInterpolationMethod;

    // structs

    struct TInsertionOptions;
    struct TMapDefinition;
    struct TMapDefinitionBase;

    // fields

    static constexpr const char* className = "mrpt::maps" "::" "CWirelessPowerGridMap2D";
    static const size_t m_private_map_register_id =   mrpt::maps::internal::TMetricMapTypesRegistry::Instance().doRegister("mrpt::maps::CWirelessPowerGridMap2D,wifiGrid" ,& mrpt::maps::CWirelessPowerGridMap2D ::MapDefinition,& mrpt::maps::CWirelessPowerGridMap2D ::internal_CreateFromMapDefinition);
    mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions insertionOptions;

    // construction

    CWirelessPowerGridMap2D(
        TMapRepresentation mapType = mrKernelDM,
        double x_min = -2,
        double x_max = 2,
        double y_min = -2,
        double y_max = 2,
        double resolution = 0.1
        );

    // methods

    static constexpr auto getClassName();
    static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
    static std::shared_ptr<CObject> CreateObject();

    template <typename... Args>
    static Ptr Create(Args&&... args);

    template <typename Alloc, typename... Args>
    static Ptr CreateAlloc(
        const Alloc& alloc,
        Args&&... args
        );

    template <typename... Args>
    static UniquePtr CreateUnique(Args&&... args);

    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    virtual mrpt::rtti::CObject* clone() const;
    static std::shared_ptr<mrpt::maps::TMetricMapInitializer> MapDefinition();
    static std::shared_ptr<CWirelessPowerGridMap2D> CreateFromMapDefinition(const mrpt::maps::TMetricMapInitializer& def);
    static std::shared_ptr<mrpt::maps::CMetricMap> internal_CreateFromMapDefinition(const mrpt::maps::TMetricMapInitializer& def);
    const grid_data_t& data() const;
    iterator begin();
    const_iterator begin() const;
    iterator end();
    const_iterator end() const;
    virtual void getVisualizationInto(mrpt::viz::CSetOfObjects& outObj) const;
    float cell2float(const TRandomFieldCell& c) const;
    void enableVerbose(] bool enable_verbose);
    bool isEnabledVerbose() const;
    void enableProfiler(bool enable = true);
    bool isProfilerEnabled() const;
    mrpt::maps::CSimplePointsMap* getAsSimplePointsMap();
    int y2idx(double y) const;

    int xy2idx(
        double x,
        double y
        ) const;

    double idx2y(int cy) const;
};

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<CObject> Ptr;
    typedef std::shared_ptr<const CObject> ConstPtr;
    typedef std::shared_ptr<CSerializable> Ptr;
    typedef std::shared_ptr<const CSerializable> ConstPtr;
    typedef std::shared_ptr<CRandomFieldGridMap2D> Ptr;
    typedef std::shared_ptr<const CRandomFieldGridMap2D> ConstPtr;

    // structs

    struct TMsg;
    struct ConnectivityDescriptor;
    struct TInsertionOptionsCommon;
    struct TObservationGMRF;
    struct TPriorFactorGMRF;

    // methods

    static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
    Visualizable& operator = (const Visualizable&);
    Visualizable& operator = (Visualizable&&);
    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    virtual bool isEmpty() const = 0;
    virtual void saveMetricMapRepresentationToFile(const std::string& filNamePrefix) const = 0;
    virtual std::string asString() const = 0;
    virtual void getVisualizationInto(mrpt::viz::CSetOfObjects& o) const = 0;
    COutputLogger& operator = (const COutputLogger&);
    COutputLogger& operator = (COutputLogger&&);
    virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const;
    static const mrpt::rtti::TRuntimeClassId& GetRuntimeClassIdStatic();
    virtual void getVisualizationInto(mrpt::viz::CSetOfObjects& outObj) const;
    virtual void getAs3DObject(mrpt::viz::CSetOfObjects& meanObj, mrpt::viz::CSetOfObjects& varObj) const;

Typedefs

typedef std::shared_ptr<mrpt::maps ::CWirelessPowerGridMap2D> Ptr

A type for the associated smart pointer.

Fields

static const size_t m_private_map_register_id =   mrpt::maps::internal::TMetricMapTypesRegistry::Instance().doRegister("mrpt::maps::CWirelessPowerGridMap2D,wifiGrid" ,& mrpt::maps::CWirelessPowerGridMap2D ::MapDefinition,& mrpt::maps::CWirelessPowerGridMap2D ::internal_CreateFromMapDefinition)

ID used to initialize class registration (just ignore it)

Construction

CWirelessPowerGridMap2D(
    TMapRepresentation mapType = mrKernelDM,
    double x_min = -2,
    double x_max = 2,
    double y_min = -2,
    double y_max = 2,
    double resolution = 0.1
    )

Constructor.

Methods

virtual const mrpt::rtti::TRuntimeClassId* GetRuntimeClass() const

Returns information about the class of an object in runtime.

virtual mrpt::rtti::CObject* clone() const

Returns a deep copy (clone) of the object, indepently of its class.

static std::shared_ptr<mrpt::maps::TMetricMapInitializer> MapDefinition()

Returns default map definition initializer.

See * mrpt::maps::TMetricMapInitializer

static std::shared_ptr<CWirelessPowerGridMap2D> CreateFromMapDefinition(const mrpt::maps::TMetricMapInitializer& def)

Constructor from a map definition structure: initializes the map and * its parameters accordingly.

virtual void getVisualizationInto(mrpt::viz::CSetOfObjects& outObj) const

Returns a 3D object representing the map