13 const double ps =
static_cast<double>(
period_ns) * 1e-9;
44 return velocity_per_second * ps_;
49 return accel_per_second_sq * ps2_;
54 return jerk_per_second_cubed * ps3_;
59 return velocity_per_cycle / ps_;
64 return accel_per_cycle_sq / ps2_;
67 constexpr double jerk_to_si(
double jerk_per_cycle_cubed)
const
69 return jerk_per_cycle_cubed / ps3_;
81 std::int64_t period_ns_ = 1'000'000;
83 double ps2_ = 0.000001;
84 double ps3_ = 0.000000001;
static constexpr CycleConfig at_1khz()
constexpr double velocity_to_cycle(double velocity_per_second) const
constexpr double acceleration_to_si(double accel_per_cycle_sq) const
constexpr double velocity_to_si(double velocity_per_cycle) const
static constexpr CycleConfig from_period_ns(std::int64_t period_ns)
constexpr double jerk_to_si(double jerk_per_cycle_cubed) const
constexpr double jerk_to_cycle(double jerk_per_second_cubed) const
static constexpr CycleConfig at_2khz()
constexpr std::int64_t period_ns() const
static constexpr CycleConfig at_4khz()
constexpr double acceleration_to_cycle(double accel_per_second_sq) const
constexpr double period_seconds() const