class ugcs::vsm::Panorama_action

Overview

Panorama action. More…

#include <panorama_action.h>

class Panorama_action: public ugcs::vsm::Action
{
public:
    // typedefs

    typedef std::shared_ptr<Panorama_action> Ptr;
    typedef std::weak_ptr<Panorama_action> Weak_ptr;

    // fields

    proto::Panorama_mode trigger_state;
    double angle;
    double step;
    std::chrono::milliseconds delay;
    double speed;

    // construction

    Panorama_action(
        proto::Panorama_mode trigger_state,
        double angle,
        double step,
        std::chrono::milliseconds delay,
        double speed
        );

    Panorama_action(const Property_list& p);

    // methods

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

Inherited Members

public:
    // typedefs

    typedef std::shared_ptr<Action> Ptr;
    typedef std::weak_ptr<Action> Weak_ptr;
    typedef ugcs::vsm::Param_exception<Format_exception_dummy_struct,> Format_exception;

    // enums

    enum Type;

    // structs

    struct Format_exception_dummy_struct;

    template <>
    struct Mapper<Action::Type::REPEAT_SERVO>;

    template <>
    struct Mapper<Action::Type::POI>;

    template <>
    struct Mapper<Action::Type::PAYLOAD_STEERING>;

    template <>
    struct Mapper<Action::Type::PANORAMA>;

    template <>
    struct Mapper<Action::Type::SET_HOME>;

    template <>
    struct Mapper<Action::Type::TAKEOFF>;

    template <>
    struct Mapper<Action::Type::SET_SERVO>;

    template <>
    struct Mapper<Action::Type::TASK_ATTRIBUTES>;

    template <>
    struct Mapper<Action::Type::VTOL_TRANSITION>;

    template <>
    struct Mapper<Action::Type::MOVE>;

    template <>
    struct Mapper<Action::Type::HEADING>;

    template <>
    struct Mapper<Action::Type::CAMERA_CONTROL>;

    template <Type type_val>
    struct Mapper;

    template <>
    struct Mapper<Action::Type::LANDING>;

    template <>
    struct Mapper<Action::Type::CAMERA_SERIES_BY_DISTANCE>;

    template <>
    struct Mapper<Action::Type::CAMERA_TRIGGER>;

    template <>
    struct Mapper<Action::Type::CAMERA_SERIES_BY_TIME>;

    template <>
    struct Mapper<Action::Type::CHANGE_SPEED>;

    template <>
    struct Mapper<Action::Type::WAIT>;

    // fields

    int command_id = -1;

    // methods

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

    Type Get_type() const;
    void Set_id(int id);
    std::string Get_name();

    template <Type type_val>
    Mapper<type_val>::type::Ptr Get_action();

Detailed Documentation

Panorama action.

Makes a panoramic shot. Target system rotates about its yaw axis in order to reach the target angle. Shooting is performed either in continuous (permanent exposure) or discrete (shoot per step) mode. Continuous shooting rotation can still be performed in serial steps with delays.

Typedefs

typedef std::shared_ptr<Panorama_action> Ptr

Pointer type.

typedef std::weak_ptr<Panorama_action> Weak_ptr

Pointer type.

Fields

proto::Panorama_mode trigger_state

Trigger state.

double angle

Target panorama angle in a range [-2Pi, 2Pi].

If positive the rotation direction should be clockwise, if negative the rotation direction should be counter-clockwise. Set in radians.

double step

Absolute value of a step angle in case of a discrete shooting.

Zero stands for a continuous rotation. Set in radians.

std::chrono::milliseconds delay

Delay interval between two steps.

double speed

Rotation speed in radians per second.

Construction

Panorama_action(
    proto::Panorama_mode trigger_state,
    double angle,
    double step,
    std::chrono::milliseconds delay,
    double speed
    )

Construct panorama action explicitly.

Panorama_action(const Property_list& p)

Construct action from protobuf command.

Methods

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

Create an instance.