Template Class CubicSplineProfileGenerator#
Defined in File ProfileGenerator.h
Inheritance Relationships#
Base Type#
public Karana::Models::ProfileGenerator< T >(Template Class ProfileGenerator)
Class Documentation#
-
template<typename T>
class CubicSplineProfileGenerator : public Karana::Models::ProfileGenerator<T># A simple cubic spline profile generator.
This does cubic interpolation between (t_i,q_i,u_i) and (t_f,q_f,u_f). Times provided outside the given range, less than t_i or greater than t_f, will yield q_i and q_f, respectively.
- Template Parameters:
T – The type of object to generate a profile for.
Public Functions
-
inline CubicSplineProfileGenerator(std::string_view name, const Karana::Math::Ktime &t_i, const T &q_i, const T &u_i, const Karana::Math::Ktime &t_f, const T &q_f, const T &u_f)#
CubicSplineProfileGenerator constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.
- Parameters:
name – The name of the CubicSplineProfileGenerator.
t_i – Time associated with q_i
q_i – The starting coordinate
u_i – The starting velocity
t_f – Time associated with q_f
q_f – The ending coordinate
u_f – The ending velocity
-
inline virtual const T &getQ(const Karana::Math::Ktime &t) override#
Get the profile coordinate for the provided time.
- Parameters:
t – The current time
- Returns:
The profile coordinate at the provided time.
-
inline virtual const T &getU(const Karana::Math::Ktime &t) override#
Get the profile velocity for the provided time.
- Parameters:
t – The current time
- Returns:
The profile velocity at the provided time.
-
inline virtual const T &getUdot(const Karana::Math::Ktime &t) override#
Get the profile acceleration for the provided time.
- Parameters:
t – The current time
- Returns:
The profile acceleration at the provided time.
-
inline virtual bool isReady() const override#
Indicate whether this CubicSplineProfileGenerator is ready for simulation.
- Returns:
true if it is ready, false otherwise.
-
inline void setValues(const Karana::Math::Ktime &t_i, const T &q_i, const T &u_i, const Karana::Math::Ktime &t_f, const T &q_f, const T &u_f)#
Set the starting/ending coordinates and calculate constants.
- Parameters:
t_i – Time associated with q_i.
q_i – The starting coordinate.
u_i – The starting velocity.
t_f – Time associated with q_f.
q_f – The ending coordinate.
u_f – The ending velocity.
Public Static Functions
-
static inline Karana::Core::ks_ptr<CubicSplineProfileGenerator> create(std::string_view name, const Karana::Math::Ktime &t_i, const T &q_i, const T &u_i, const Karana::Math::Ktime &t_f, const T &q_f, const T &u_f)#
CubicSplineProfileGenerator constructor.
- Parameters:
name – The name of the CubicSplineProfileGenerator.
t_i – Time associated with q_i
q_i – The starting coordinate
u_i – The starting velocity
t_f – Time associated with q_f
q_f – The ending coordinate
u_f – The ending velocity
- Returns:
A pointer to the newly created instance of CubicSplineProfileGenerator.
Protected Functions
Protected Attributes