namespace RobotNet10.Shared.Geometry; /// /// AccelWithCovariance message (geometry_msgs/AccelWithCovariance) /// An Accel with associated covariance matrix /// public struct AccelWithCovariance { /// /// Acceleration /// public Accel Accel { get; set; } /// /// Covariance matrix (row-major order) /// The orientation parameters use a fixed-axis representation. /// In order, the parameters are: /// (ax, ay, az, wx, wy, wz) /// public double[] Covariance { get; set; } /// /// Size of covariance matrix (6x6 = 36 elements) /// public const int CovarianceSize = 36; /// /// Default constructor /// public AccelWithCovariance() { Accel = new Accel(); Covariance = new double[CovarianceSize]; } /// /// Constructor with parameters /// public AccelWithCovariance(Accel accel, double[] covariance) { Accel = accel; if (covariance == null || covariance.Length != CovarianceSize) { throw new ArgumentException($"Covariance array must have {CovarianceSize} elements", nameof(covariance)); } Covariance = covariance; } }