Template Struct convert< lupnt::Real >

Struct Documentation

template<>
struct convert<lupnt::Real>

yaml-cpp convert<> specialization enabling node.as<lupnt::Real>() / node = some_real for LuPNT’s autodiff scalar type.

Lets simulation YAML config files (loaded via lupnt::GetYamlConfig, lupnt/core/file.h) be read directly into Real parameters &#8212; e.g. dynamics/device config values such as config["dt"].as<Real>(), config["mass"].as<Real>() (numerical_orbit_dynamics.cc), cfg["lat_ref"].as<Real>() (rover.cc) &#8212; without callers needing to round-trip through double themselves.

Public Static Functions

static inline Node encode(const lupnt::Real &rhs)

Encode a Real as a YAML scalar node (its underlying double value).

static inline bool decode(const Node &node, lupnt::Real &rhs)

Decode a YAML scalar node into a Real. Returns false (decode failure) if node is not a scalar.