TactivergeLite

Lite / Intelligent Robotic Systems / Week 11

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 · Full interactive version

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.

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?

  1. Ahead
  2. To the left
  3. To the right
  4. Behind
Guess first, then reveal

To the left. Facing east, north is on your left-hand side. In the body frame its forward coordinate is 0 and its left coordinate is positive.

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'?

What the interactive shows (text version)

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.

You can also open the interactive on the full site when you have a faster connection.

Watch (optional)

Watch for: 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.

“How Perseverance Learned to ‘Self-Locate’ on Mars” by NASA Jet Propulsion Laboratory (opens YouTube; streaming video uses a lot of data)

The video is optional. Everything you need is in this lesson's text.

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

Intuitive

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.

Technical

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.

Mathematical

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.

Applied

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

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

°

Practice 2. An aircraft turns 90° to the right without moving. What happens to a waypoint's coordinates?

km

Practice 4. Why does a spacecraft's world frame use distant stars instead of north?

m

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.

Reflect

When you give directions to a friend on the phone, do you use their body frame or a world frame? Which is less likely to go wrong, and why?

Write your answer on paper or in your own notes. Lite never stores what you write.

Go further

← One point, many addresses: coordinate framesHeading for a waypoint: bearings and turns →