/* Copyright 2020 The MathWorks, Inc. */ #ifndef UAVDUBINSCODGEN_PATHSEGMENTS_HPP_ #define UAVDUBINSCODGEN_PATHSEGMENTS_HPP_ #include #include "uavdubinscodegen_util.hpp" namespace uav{ class UavDubinsPathsegments{ public: UavDubinsPathsegments() { FlightPathAngle = 0; AirSpeed = 10; MinTurningRadius = 18.6784; HelixRadius = 0; MotionTypes = 0; MotionLengths = {0 , 0 , 0 , 0}; Length = 0; } void setMethod(std::vector startPose, std::vector goalPose, double flightPathAngle, double airSpeed, double minTurningRadius, double helixRadius, double motionTypes, std::vector motionLengths) { StartPose = startPose; GoalPose = goalPose; FlightPathAngle = flightPathAngle; AirSpeed = airSpeed; MinTurningRadius = minTurningRadius; HelixRadius = helixRadius; MotionTypes = static_cast(motionTypes); MotionLengths[0] = motionLengths[0]; MotionLengths[1] = motionLengths[1]; MotionLengths[2] = motionLengths[2]; MotionLengths[3] = motionLengths[3]; Length = 0; for(size_t i = 0 ; i < 4; i++) { Length += motionLengths[i]; } } //Properties std::vector StartPose; std::vector GoalPose; double FlightPathAngle; double AirSpeed; double MinTurningRadius; double HelixRadius; double Length; int MotionTypes; std::vector MotionLengths{0,0,0,0}; }; } #endif