Body frame, world frame: how a vehicle sees the world
A pilot says 'traffic at two o'clock'. Air traffic control says 'traffic north-east of you'. Same aircraft. Why two languages?
About 35 min · 3 goals · Checked by automated tests
1.Why should I care?
Aircraft, drones, rovers and spacecraft all juggle two frames. The world frame is where the map and the mission live. The body frame rides with the vehicle: that's where its sensors, wings, wheels and thrusters are. Navigation is the job of translating between them, quickly and correctly, all the time.
- ◇ Distinguish a vehicle's body frame (forward, left) from the world frame (east, north or star-fixed).
- ◇ Describe the same waypoint in both frames and explain which one changes when the vehicle turns.
- ◇ Convert between compass heading and the mathematical angle of the vehicle's nose.
2.Watch
→ Watch for how the rover works out where it is on the map from what its own cameras see: a body-frame view matched to a world-frame map.
A quick official look at how a rover works out where it is with no GPS, using its own images.
1 min 35 s · captions on YouTube · source
Nothing loads from YouTube until you press play.
The video is optional: everything you need is also in the lesson text and the interactive.
3.Predict
An aircraft heads due east. A waypoint is due north of it. In the aircraft's body frame (x forward, y left), where is the waypoint?
Guess first. Being wrong here is how the surprise works.
4.Discover
Start with the aircraft. Choose ALPHA and read its body-frame position. Now change only the heading, in steps of 45°. Which numbers in the readout change, and which stay the same? Switch to the spacecraft: what replaces 'north'?
Loading the interactive…
Can't use the interactive? Read a description instead
The diagram shows a top-down map with a vehicle icon, its forward (blue) and left (green) body axes, and a diamond-shaped waypoint joined to it by a dashed line. The readout gives the waypoint's world coordinates, distance and bearing, plus its body-frame forward and left distances. Turning the vehicle changes only the body-frame numbers.
5.Checkpoint: guided practice
Check what you just discovered before going on. Hints appear after a wrong answer.
Practice 1
A vehicle's compass heading is 30°. What is the mathematical angle of its nose (anticlockwise from east), in degrees?
6.Understand
Two frames, two jobs
The world frame is fixed: for an aircraft or rover, east (x) and north (y) on a flat map; for a spacecraft, axes pointing at chosen distant stars, because space has no 'north'. The body frame moves with the vehicle: x out of the nose, y out of the left side (and z up in 3D). Engines push along body axes; maps and waypoints are given in world axes.
Heading links them
Heading is the compass direction of the nose, in degrees clockwise from north. Maths angles go anticlockwise from +x (east). So the nose's maths angle is ψ = 90° − heading. A heading of 0° (north) is ψ = 90°; heading 90° (east) is ψ = 0°. Mixing the two conventions is a classic navigation bug.
What changes when you turn
Turn the vehicle and every body-frame coordinate of the outside world changes, while world-frame coordinates stay put. That is why a pilot's 'two o'clock' needs updating after every turn, while air traffic control's 'north-east' does not. Converting a world point into the body frame means: subtract the vehicle's position, then rotate by −ψ.
Explain it another way
Stand in a room and point at the door. Turn round: the door is now behind you, though it hasn't moved. 'Behind you' is a body-frame fact; 'on the east wall' is a world-frame fact.
Body-to-world is a rigid transform: p_world = R(ψ)·p_body + p_vehicle, where R is the rotation by the nose angle ψ. World-to-body is its inverse: p_body = R(−ψ)·(p_world − p_vehicle). For aircraft in 3D, the body axes are roll, pitch and yaw axes and R is 3×3.
Heading 90° (east) → ψ = 0°. Waypoint 3 km north: d = (0, 3). Rotating by −0° changes nothing: forward = 0, left = 3 km. Heading 0° (north) → ψ = 90°: forward = d·(cos 90°, sin 90°) = 3, left = d·(−sin 90°, cos 90°) = 0. Dead ahead.
An autopilot holds waypoints in world coordinates from the flight plan. Several times a second it converts the next waypoint into the body frame to decide how much to bank left or right.
Worked example 1
A simulated drone is at (0, 0) heading 180° (south). A waypoint is at (4, 0) km (east). Where is it in the body frame?
ψ = 90° − 180° = −90°: the nose points along −y. d = (4, 0). Forward = d·(cos ψ, sin ψ) = 4 × 0 + 0 × (−1) = 0. Left = d·(−sin ψ, cos ψ) = 4 × 1 + 0 = 4 km. Facing south, east is on your left.
Common mix-ups
- Heading and the mathematical angle are the same number.
✓ Heading is clockwise from north; the maths angle is anticlockwise from east. ψ = 90° − heading. - The body frame is just the world frame moved to the vehicle.
✓ It is moved AND rotated with the nose. That rotation is why turning changes every body-frame number.
7.Practice on your own
Practice, not a test. Wrong answers get a hint and another try.
Practice 2
An aircraft turns 90° to the right without moving. What happens to a waypoint's coordinates?
Practice 3 · a fresh version every time
In a simulation, an aircraft is at (−4, 0) km with its nose pointing 135° anticlockwise from the world +x axis. A waypoint is at (4, −2) km. In the aircraft's body frame (x forward, y to the left), what is the waypoint's forward (x) coordinate, in km? (2 decimal places; negative means behind)
Practice 4
Why does a spacecraft's world frame use distant stars instead of north?
Practice 5
A rover heads north (ψ = 90°) from (0, 0). A rock is at (−3, 5) m. How far to the LEFT of the rover is it, in metres? (Body frame: y is left.)
8.Apply it
In the diagram, set the aircraft at (−4, −4) km with heading 30°. Predict ALPHA's body-frame position on paper (subtract, then rotate by −ψ), then check against the readout. Repeat for BRAVO.
9.Reflect
10.Go further
- Aircraft principal axes (Wikipedia) ↗How the body frame of an aircraft extends to 3D: roll, pitch and yaw.
Concepts: Navigation frames, heading and waypoints · Coordinate frames and transforms