Spatial AI & Robotics Coordinate Frame Converter
Seamlessly convert 3D coordinates between Global Geodetic WGS84, Earth-Centered Earth-Fixed (ECEF), Local Tangent Plane (ENU / NED), ROS 2 Robot Body Frame (+X Forward, +Y Left, +Z Up), and Camera Optical Frame (+X Right, +Y Down, +Z Forward).
1. Reference Base / Origin Station (Local Tangent Frame Origin)
The local tangent plane (ENU/NED) is established tangent to the WGS84 reference ellipsoid at this geodetic origin point:
2. Target Point Input Coordinate Frame
Robot / Autonomous Vehicle Attitude (for ROS 2 Body & Camera Optical Frames)
3. Rigorous 6-Frame Transformation Results
North (Y): +200.000 m
Up (Z): +10.000 m
Used in GIS, geodesy, and map-level trajectory tracking.
East (Y): +100.000 m
Down (Z): -10.000 m
Standard in aerospace, flight controllers (PX4, ArduPilot), and IMU nav.
Y (Left): +70.711 m
Z (Up): +10.000 m
ROS / ROS 2 standard: +X Forward, +Y Left, +Z Up (at current heading 45°).
Y (Down): -10.000 m
Z (Forward/Depth): +212.132 m
Computer vision & photogrammetry: +X Right, +Y Down, +Z Forward (optical axis).
Y: +3349942.215 m
Z: +3699702.431 m
Global geocentric Cartesian space; origin at Earth's center of mass.
Lon: 139.76820546° (139°46'05.54"E)
Height: 50.000 m (Ellipsoidal)
Global GNSS reference datum (latitude, longitude, ellipsoidal height).
Interactive Vector Visualization (Local Tangent Top-Down View & Orientation) Center = Reference Origin (0,0)
Developer Integration Snippet (ROS 2 `tf2` & SciPy Rotation)
Comprehensive Reference: Reference Frames in Spatial AI & Robotics
Modern autonomous mobile robots (AMRs), self-driving vehicles, uncrewed aerial systems (UAS), and spatial computing platforms (Apple Vision Pro, Meta Quest, OpenXR) operate across multiple hierarchical coordinate frames. Converting accurately between these frames without ambiguity is critical for SLAM pose estimation, sensor fusion (GNSS/INS/LiDAR/Camera), and collision avoidance.
| Reference Frame | Axes Convention (+X, +Y, +Z) | Origin & Type | Primary Industry Application |
|---|---|---|---|
| ECEF (EPSG:4978) | X: Greenwich Eq, Y: 90°E Eq, Z: North Pole | Earth Center of Mass (3D Cartesian) | Satellite orbits, global multi-base RTK, global state estimation |
| Local ENU | X: East, Y: North, Z: Up (Ellipsoidal Normal) | Local Tangent Plane at Base Station | GIS, geodetic surveying, autonomous driving map frame (Autoware) |
| Local NED | X: North, Y: East, Z: Down (Toward Earth) | Local Tangent Plane at Aircraft/Base | Aerospace, avionics, UAV flight controllers (PX4, ArduPilot), INS/IMU |
| ROS 2 Body (REP-103) | X: Forward, Y: Left, Z: Up | Vehicle Center of Rotation (`base_link`) | ROS / ROS 2 navigation stacks, ground robotics, ISO 8855 |
| Camera Optical (RDF) | X: Right, Y: Down, Z: Forward (Depth/Z-axis) | Camera Optical Center (`camera_optical_frame`) | OpenCV, computer vision, pinhole camera models, visual SLAM, ARKit |
Mathematical Derivations for Geodetic to ENU Conversion
Given the reference origin (φ0, λ0, h0) and target geodetic point (φ, λ, h), the transformation proceeds in two stages:
-
Geodetic to ECEF: Using the WGS84 prime vertical radius of curvature N(φ) = a / √(1 − e2 sin2φ):
X = (N + h) cos(φ) cos(λ)
Y = (N + h) cos(φ) sin(λ)
Z = (N(1 - e²) + h) sin(φ) -
ECEF Vector to Local ENU: Letting Δr = [X − X0, Y − Y0, Z − Z0]T:
E = -sin(λ₀) ΔX + cos(λ₀) ΔY
N = -sin(φ₀) cos(λ₀) ΔX - sin(φ₀) sin(λ₀) ΔY + cos(φ₀) ΔZ
U = cos(φ₀) cos(λ₀) ΔX + cos(φ₀) sin(λ₀) ΔY + sin(φ₀) ΔZ