LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
point.hpp
Go to the documentation of this file.
1
/*
2
* This Source Code Form is subject to the terms of the Mozilla Public
3
* License, v. 2.0. If a copy of the MPL was not distributed with this
4
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
5
*/
6
#pragma once
7
8
#include "
okapi/api/odometry/stateMode.hpp
"
9
#include "
okapi/api/units/QLength.hpp
"
10
11
namespace
okapi
{
12
struct
Point
{
13
QLength
x
{0_m};
14
QLength
y
{0_m};
15
22
Point
inFT
(
const
StateMode
&imode)
const
{
23
if
(imode ==
StateMode::FRAME_TRANSFORMATION
) {
24
return
*
this
;
25
}
else
{
26
return
{
y
,
x
};
27
}
28
}
29
};
30
}
// namespace okapi
QLength.hpp
okapi
Definition
chassisController.hpp:16
okapi::StateMode
StateMode
The mode for the OdomState calculated by Odometry.
Definition
stateMode.hpp:12
okapi::StateMode::FRAME_TRANSFORMATION
@ FRAME_TRANSFORMATION
+x is forward, +y is right, 0 degrees is along +x
stateMode.hpp
okapi::Point
Definition
point.hpp:12
okapi::Point::x
QLength x
Definition
point.hpp:13
okapi::Point::y
QLength y
Definition
point.hpp:14
okapi::Point::inFT
Point inFT(const StateMode &imode) const
Computes the value of this point in StateMode::FRAME_TRANSFORMATION.
Definition
point.hpp:22
include
okapi
api
odometry
point.hpp
Generated by
1.9.8