WPILibC++ 2027.0.0-alpha-2
Loading...
Searching...
No Matches
SigmaPoints.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5#pragma once
6
7#include <concepts>
8
9#include "frc/EigenCore.h"
10
11namespace frc {
12
13template <typename T, int States>
14concept SigmaPoints =
15 requires(T t, Vectord<States> x, Matrixd<States, States> S, int i) {
16 { T::NumSigmas } -> std::convertible_to<const int>;
17 {
18 t.SquareRootSigmaPoints(x, S)
19 } -> std::same_as<Matrixd<States, T::NumSigmas>>;
20 { t.Wm() } -> std::convertible_to<Vectord<T::NumSigmas>>;
21 { t.Wm(i) } -> std::same_as<double>;
22 { t.Wc() } -> std::convertible_to<Vectord<T::NumSigmas>>;
23 { t.Wc(i) } -> std::same_as<double>;
24 } && std::default_initializable<T>;
25
26} // namespace frc
Definition SigmaPoints.h:14
Definition SystemServer.h:9
Eigen::Matrix< double, Rows, Cols, Options, MaxRows, MaxCols > Matrixd
Definition EigenCore.h:21
Eigen::Vector< double, Size > Vectord
Definition EigenCore.h:12
#define S(label, offset, message)
Definition Errors.h:113