From f341e1b2beccae54a94ce8aea3afc227b60d8b31 Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sat, 14 May 2022 15:31:06 -0700 Subject: [PATCH] [wpimath] Document standard coordinate systems better (NFC) (#4228) --- .../first/math/geometry/CoordinateSystem.java | 18 ++++++++++++------ .../include/frc/geometry/CoordinateSystem.h | 10 ++++++++-- 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/wpimath/src/main/java/edu/wpi/first/math/geometry/CoordinateSystem.java b/wpimath/src/main/java/edu/wpi/first/math/geometry/CoordinateSystem.java index 93b57312b0..dae9eb8d84 100644 --- a/wpimath/src/main/java/edu/wpi/first/math/geometry/CoordinateSystem.java +++ b/wpimath/src/main/java/edu/wpi/first/math/geometry/CoordinateSystem.java @@ -78,9 +78,11 @@ public class CoordinateSystem { } /** - * Returns an instance of the NWU coordinate system. + * Returns an instance of the North-West-Up (NWU) coordinate system. * - * @return An instance of the NWU coordinate system. + *

The +X axis is north, the +Y axis is west, and the +Z axis is up. + * + * @return An instance of the North-West-Up (NWU) coordinate system. */ @SuppressWarnings("MethodName") public static CoordinateSystem NWU() { @@ -88,9 +90,11 @@ public class CoordinateSystem { } /** - * Returns an instance of the EDN coordinate system. + * Returns an instance of the East-Down-North (EDN) coordinate system. * - * @return An instance of the EDN coordinate system. + *

The +X axis is east, the +Y axis is down, and the +Z axis is north. + * + * @return An instance of the East-Down-North (EDN) coordinate system. */ @SuppressWarnings("MethodName") public static CoordinateSystem EDN() { @@ -98,9 +102,11 @@ public class CoordinateSystem { } /** - * Returns an instance of the NED coordinate system. + * Returns an instance of the North-East-Down (NED) coordinate system. * - * @return An instance of the NED coordinate system. + *

The +X axis is north, the +Y axis is east, and the +Z axis is down. + * + * @return An instance of the North-East-Down (NED) coordinate system. */ @SuppressWarnings("MethodName") public static CoordinateSystem NED() { diff --git a/wpimath/src/main/native/include/frc/geometry/CoordinateSystem.h b/wpimath/src/main/native/include/frc/geometry/CoordinateSystem.h index 9eab85e3b7..8dd6a81f2f 100644 --- a/wpimath/src/main/native/include/frc/geometry/CoordinateSystem.h +++ b/wpimath/src/main/native/include/frc/geometry/CoordinateSystem.h @@ -38,17 +38,23 @@ class WPILIB_DLLEXPORT CoordinateSystem { CoordinateSystem& operator=(CoordinateSystem&&) = default; /** - * Returns an instance of the NWU coordinate system. + * Returns an instance of the North-West-Up (NWU) coordinate system. + * + * The +X axis is north, the +Y axis is west, and the +Z axis is up. */ static CoordinateSystem NWU(); /** - * Returns an instance of the EDN coordinate system. + * Returns an instance of the East-Down-North (EDN) coordinate system. + * + * The +X axis is east, the +Y axis is down, and the +Z axis is north. */ static CoordinateSystem EDN(); /** * Returns an instance of the NED coordinate system. + * + * The +X axis is north, the +Y axis is east, and the +Z axis is down. */ static CoordinateSystem NED();