blob: 03abf191068017753afeadf1b56065cb8e533079 [file] [log] [blame]
James Kuszmaulef35d732022-02-12 16:37:32 -08001namespace frc971.controls;
2
3// This provides a minimal output from the localizer that can be forwarded to
4// the roborio and used for corrections to its (simpler) localizer.
5
James Kuszmaul10d3fd42022-02-25 21:57:36 -08006struct Quaternion {
7 w:double (id: 0);
8 x:double (id: 1);
9 y:double (id: 2);
10 z:double (id: 3);
11}
12
James Kuszmaulef35d732022-02-12 16:37:32 -080013table LocalizerOutput {
14 // Timestamp (on the source node) that this sample corresponds with. This
15 // may be older than the sent time to account for delays in sensor readings.
16 monotonic_timestamp_ns:int64 (id: 0);
17 // Current x/y position estimate, in meters.
18 x:double (id: 1);
19 y:double (id: 2);
20 // Current heading, in radians.
21 theta:double (id: 3);
James Kuszmaul10d3fd42022-02-25 21:57:36 -080022 // Current estimate of the robot's 3-D rotation.
23 orientation:Quaternion (id: 4);
James Kuszmaulef35d732022-02-12 16:37:32 -080024}
25
26root_type LocalizerOutput;