Template Class LinearProfileGenerator#
Defined in File ProfileGenerator.h
Inheritance Relationships#
Base Type#
public Karana::Models::ProfileGenerator< T >(Template Class ProfileGenerator)
Class Documentation#
-
template<typename T>
class LinearProfileGenerator : public Karana::Models::ProfileGenerator<T># A simple linear profile generator.
This does linear interpolation between (t_i,q_i) and (t_f,q_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 LinearProfileGenerator(std::string_view name, const Karana::Math::Ktime &t_i, const T &q_i, const Karana::Math::Ktime &t_f, const T &q_f)#
LinearProfileGenerator constructor. The constructor is not meant to be called directly. Please use the create(…) method instead to create an instance.
- Parameters:
t_i – Time associated with q_i
q_i – The starting coordinate for linear interpolation
t_f – Time associated with q_f
q_f – The ending coordinate for linear interpolation
name – The name of the LinearProfileGenerator.
-
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 LinearProfileGenerator is ready for simulation.
- Returns:
true if it is ready, false otherwise.
Public Members
Public Static Functions
-
static inline Karana::Core::ks_ptr<LinearProfileGenerator> create(std::string_view name, const Karana::Math::Ktime &t_i, const T &q_i, const Karana::Math::Ktime &t_f, const T &q_f)#
LinearProfileGenerator constructor.
- Parameters:
name – The name of the LinearProfileGenerator.
t_i – Time associated with q_i
q_i – The starting coordinate for linear interpolation
t_f – Time associated with q_f
q_f – The ending coordinate for linear interpolation
- Returns:
A pointer to the newly created instance of LinearProfileGenerator.