GAMS  1.4.0
gams::pose::StampedAcceleration Class Reference

#include <Coordinate.h>

Inheritance diagram for gams::pose::StampedAcceleration:
gams::pose::Stamped< Framed< BasicVector< StampedAcceleration, units::acceleration > > > gams::pose::Framed< Impl >

Public Types

using Base = Stamped< Framed< BasicVector< StampedAcceleration, units::acceleration > >>
 
using derived_type = typename Impl::derived_type
 

Public Member Functions

 StampedAcceleration ()=default
 
 StampedAcceleration (Acceleration o)
 
 StampedAcceleration (AccelerationVector o)
 
template<typename Base2 >
bool approximately_equal (const Framed< Base2 > &other, double epsilon) const
 Tests if this Coordinate is within epsilon in distance (as defined by this Coordinate's reference frame's distance metric). More...
 
double distance_to (const derived_type &target) const
 Calculate distance from this Coordinate to a target. More...
 
const ReferenceFrameframe () const
 Getter for the ReferenceFrame this Coordinate belongs to. More...
 
ReferenceFrame frame (ReferenceFrame new_frame)
 Setter for the ReferenceFrame this Coordinate belongs to. More...
 
uint64_t nanos () const
 Get time as nanos since std::steady_clock epoch. More...
 
uint64_t nanos (uint64_t v)
 Set time as nanos since std::steady_clock epoch. More...
 
void normalize ()
 Reduces this Coordinate to it's normalized form, should one exist. More...
 
 operator Acceleration () const
 
 operator AccelerationVector () const
 
double secs () const
 Get time as seconds since std::steady_clock epoch. More...
 
double secs (double v)
 Set time as seconds since std::steady_clock epoch. More...
 
TimeValue time () const
 Get time as std::chrono based TimeValue. More...
 
TimeValue time (TimeValue v)
 Set time from std::chrono based TimeValue. More...
 
void transform_this_to (const ReferenceFrame &new_frame)
 Transform this coordinate, in place, to a new reference frame. More...
 
derived_type WARN_UNUSED transform_to (const ReferenceFrame &new_frame) const
 Copy and transform this coordinate to a new reference frame. More...
 

Static Public Attributes

static constexpr const char * type_name = "Stamped" "Acceleration"
 

Private Attributes

ReferenceFrame frame_ = default_frame()
 
TimeValue time_
 

Detailed Description

Definition at line 1223 of file Coordinate.h.

Member Typedef Documentation

◆ Base

◆ derived_type

using gams::pose::Stamped< Framed< BasicVector< StampedAcceleration, units::acceleration > > >::derived_type = typename Impl::derived_type
inherited

Definition at line 107 of file Stamped.h.

Constructor & Destructor Documentation

◆ StampedAcceleration() [1/3]

gams::pose::StampedAcceleration::StampedAcceleration ( AccelerationVector  o)
inline

Definition at line 1223 of file Coordinate.h.

◆ StampedAcceleration() [2/3]

gams::pose::StampedAcceleration::StampedAcceleration ( Acceleration  o)
inline

Definition at line 1223 of file Coordinate.h.

◆ StampedAcceleration() [3/3]

gams::pose::StampedAcceleration::StampedAcceleration ( )
default

Member Function Documentation

◆ approximately_equal()

template<typename Impl >
template<typename Base2 >
bool gams::pose::Framed< Impl >::approximately_equal ( const Framed< Base2 > &  other,
double  epsilon 
) const
inlineinherited

Tests if this Coordinate is within epsilon in distance (as defined by this Coordinate's reference frame's distance metric).

If the other Coordinate is in a different reference frame, it is first copied, and converted to this Coordinate's reference frame.

Parameters
otherthe other Coordinate to test against
epsilonthe maximum distance permitted to return true
Returns
true if the distance is less than or equal to epsilon

Definition at line 208 of file Framed.h.

◆ distance_to()

template<typename Impl >
double gams::pose::Framed< Impl >::distance_to ( const derived_type target) const
inherited

Calculate distance from this Coordinate to a target.

If the target is in another reference frame, this and the target will be copied, and converted to their closest common frame.

Requres "ReferenceFrame.h"

Parameters
targetthe target Coordinate to calculate distance to
Returns
the distance according to the distance metric in the common frame, for CoordType. Typically, return will be meters or degrees.
Exceptions
unrelated_framesthrown if the target's reference frame is not part of the same tree as the current one.
undefined_transformthrown if no conversion between two frames along the conversion path has been defined.

◆ frame() [1/2]

template<typename Impl >
const ReferenceFrame& gams::pose::Framed< Impl >::frame ( ) const
inlineinherited

Getter for the ReferenceFrame this Coordinate belongs to.

Returns
the frame

Definition at line 179 of file Framed.h.

◆ frame() [2/2]

template<typename Impl >
ReferenceFrame gams::pose::Framed< Impl >::frame ( ReferenceFrame  new_frame)
inlineinherited

Setter for the ReferenceFrame this Coordinate belongs to.

Any further calculations using this Coordinate will use this frame.

Not thread-safe.

Parameters
new_framethe frame the Coordinate will now belong to
Returns
the old frame

Definition at line 190 of file Framed.h.

◆ nanos() [1/2]

uint64_t gams::pose::Stamped< Framed< BasicVector< StampedAcceleration, units::acceleration > > >::nanos ( ) const
inlineinherited

Get time as nanos since std::steady_clock epoch.

Definition at line 174 of file Stamped.h.

◆ nanos() [2/2]

uint64_t gams::pose::Stamped< Framed< BasicVector< StampedAcceleration, units::acceleration > > >::nanos ( uint64_t  v)
inlineinherited

Set time as nanos since std::steady_clock epoch.

Definition at line 181 of file Stamped.h.

◆ normalize()

template<typename Impl >
void gams::pose::Framed< Impl >::normalize ( )
inherited

Reduces this Coordinate to it's normalized form, should one exist.

Typically useful for Coordinate types which incorporate angles.

Requres "ReferenceFrame.h"

◆ operator Acceleration()

gams::pose::StampedAcceleration::operator Acceleration ( ) const
inline

Definition at line 1223 of file Coordinate.h.

◆ operator AccelerationVector()

gams::pose::StampedAcceleration::operator AccelerationVector ( ) const
inline

Definition at line 1223 of file Coordinate.h.

◆ secs() [1/2]

double gams::pose::Stamped< Framed< BasicVector< StampedAcceleration, units::acceleration > > >::secs ( ) const
inlineinherited

Get time as seconds since std::steady_clock epoch.

Definition at line 188 of file Stamped.h.

◆ secs() [2/2]

double gams::pose::Stamped< Framed< BasicVector< StampedAcceleration, units::acceleration > > >::secs ( double  v)
inlineinherited

Set time as seconds since std::steady_clock epoch.

Definition at line 195 of file Stamped.h.

◆ time() [1/2]

TimeValue gams::pose::Stamped< Framed< BasicVector< StampedAcceleration, units::acceleration > > >::time ( ) const
inlineinherited

Get time as std::chrono based TimeValue.

Definition at line 167 of file Stamped.h.

◆ time() [2/2]

TimeValue gams::pose::Stamped< Framed< BasicVector< StampedAcceleration, units::acceleration > > >::time ( TimeValue  v)
inlineinherited

Set time from std::chrono based TimeValue.

Returns
the new time

Definition at line 171 of file Stamped.h.

◆ transform_this_to()

template<typename Impl >
void gams::pose::Framed< Impl >::transform_this_to ( const ReferenceFrame new_frame)
inherited

Transform this coordinate, in place, to a new reference frame.

Requres "ReferenceFrame.h"

Parameters
new_framethe frame to transform to
Exceptions
unrelated_framesthrown if the new reference frame is not part of the same tree as the current one.
undefined_transformthrown if no conversion between two frames along the conversion path has been defined.

◆ transform_to()

template<typename Impl >
derived_type WARN_UNUSED gams::pose::Framed< Impl >::transform_to ( const ReferenceFrame new_frame) const
inherited

Copy and transform this coordinate to a new reference frame.

Requres "ReferenceFrame.h"

Parameters
new_framethe frame to transform to
Returns
the new coordinate in the new frame
Exceptions
unrelated_framesthrown if the new reference frame is not part of the same tree as the current one.
undefined_transformthrown if no conversion between two frames along the conversion path has been defined.

Member Data Documentation

◆ frame_

template<typename Impl >
ReferenceFrame gams::pose::Framed< Impl >::frame_ = default_frame()
privateinherited

Definition at line 278 of file Framed.h.

◆ time_

TimeValue gams::pose::Stamped< Framed< BasicVector< StampedAcceleration, units::acceleration > > >::time_
privateinherited

Definition at line 204 of file Stamped.h.

◆ type_name

constexpr const char* gams::pose::StampedAcceleration::type_name = "Stamped" "Acceleration"
staticconstexpr

Definition at line 1223 of file Coordinate.h.


The documentation for this class was generated from the following file: