Altimeter on iPhone: your altitude and the road's slope while you drive

Your iPhone can already tell you your altitude: Apple’s Compass app shows the elevation along with your direction and location. For the car, though, an altimeter has to be readable at a glance with the phone in a holder. Cockpitly’s Altitude widget in Drive Mode shows your altitude in feet or meters, the slope of the road and a line of the last stretch, all from the GPS.
Where the iPhone shows your elevation
Apple’s guide puts it simply: the Compass app “shows you the direction iPhone is pointing in, your current location, and the elevation.” Open Compass and your bearings, coordinates and elevation are on the screen. Two notes from the same guide:
- It may not be available everywhere. Apple says coordinates and elevation may not be available in certain countries or regions.
- It needs your location. If it’s missing, go to Settings > Privacy & Security > Location Services, turn it on, tap Compass and choose While Using the App.
It’s handy for a quick look, but it’s an app of its own, made to be held in your hand. In a holder you want the altitude on a panel, next to your speed or your music, in numbers big enough to read in a glance.
GPS altitude vs the barometer
Some iPhones have a barometer: iPhone 17’s tech specs list one among its sensors. Cockpitly doesn’t use it for this widget. Its altitude comes from the GPS, in the same location updates as your speed, so all it needs is location access while you use the app.
Apple’s developer documentation describes the altitude iOS reports as height above mean sea level, delivered with a vertical accuracy: an estimate, in meters, of how far off it may be. In practice, GPS altitude wanders by several meters from one reading to the next. Cockpitly deals with that in three ways:
- It skips poor readings, any with a vertical accuracy worse than 12 m (about 40 feet).
- It smooths the figure over a few seconds, so it doesn’t flicker.
- It never takes the slope from just two readings, as explained below.
What the Altitude widget shows

- Your altitude, big, in feet or meters.
- The slope of the road, in percent, with an arrow: up for uphill, down for downhill, none when it’s nearly flat. A 6% slope means the road rises about 6 feet over every 100 feet you drive.
- A line with the shape of the last stretch: one point every 50 m (about 160 feet), the last 24 points, so roughly the last three quarters of a mile. It’s scaled to the stretch, but never tighter than 10 m (about 33 feet), so a flat road looks flat.
While you’re stopped, or before you’ve driven far enough, the slope shows as Slope with a dash.
How the slope is worked out
Comparing two GPS readings would make the slope jump with every bit of noise. Instead, Cockpitly takes the altitude readings of the last 50 to 200 m of road (about 160 to 650 feet) and fits the straight line that best matches them, a least-squares fit, and the steepness of that line is the slope. It only counts distance while the car moves, waits until it has at least 50 m of road, and treats anything steeper than 30% as an error, showing no slope rather than a wrong one.
Feet or meters
The Altitude widget follows the distance unit in Cockpitly’s settings. Tap the gear at the top right, then Units, and under Distance choose Miles for feet or Kilometers for meters. Until you choose, Cockpitly uses your region’s units.
How to set up the Altitude widget in Cockpitly
Cockpitly is free to download. Do this while you’re parked.
- Open Widgets and tap Drive Mode at the top.
- Tap the slot you want. The big one is the Main widget; the others are Slot 2, Slot 3 and so on.
- Under Your trip, tap Altitude.
- Choose its design: Background (Original, Color or Image), Lettering, Lettering color and Accent, which also colors the line. Designing is free.
- Tap Put on the main one (or Put on slot 2, and so on). Altitude needs Cockpitly Pro: without it, the button shows a lock and opens the Pro screen. If you’ve never answered the location question, iOS asks now.
- Under Layout, pick Classic (1 big + 4), Balanced (1 big + 2) or Duo (2 equal), then tap Try Drive Mode.
Put the iPhone in its holder in landscape, with the screen facing you. From then on, tap Drive in the middle of the tab bar when you get in.
What it can’t do
- Be a precision instrument. It’s a GPS estimate. Don’t use it for anything where the exact altitude matters.
- Work without the sky. In tunnels and garages it waits for a signal (Searching for GPS…). On a device without GPS it says No GPS, and if Cockpitly can’t use your location, Location is off with Open Settings.
- Keep a history. Readings stay in memory and aren’t saved, so there’s no elevation profile of past drives.
- Appear on CarPlay. CarPlay widgets are snapshots iOS refreshes on its own schedule, typically 40 to 70 times a day for a widget you look at often, according to Apple’s developer documentation. Altitude changes as you drive, so it stays on the phone.
Altitude is one of nine Drive Mode widgets in the iPhone car dashboard guide. If you like knowing which way you’re heading too, add the Compass. The free Speedometer and the G-force meter round out a mountain-road panel.
Questions
Does the iPhone have an altimeter?
The Compass app shows your elevation, according to Apple's guide, though elevation may not be available in some countries or regions. Some models also have a barometer: iPhone 17's tech specs list one.
How accurate is GPS altitude on iPhone?
iOS reports each altitude with an estimate of its uncertainty, and that varies with the signal. Cockpitly skips readings worse than 12 m (about 40 feet) and smooths the rest, so treat the figure as a good estimate, not a survey.
Can an altitude app show feet?
Cockpitly's Altitude widget shows feet when your distances are in miles and meters when they're in kilometers. Change it in Cockpitly's Settings, under Units.
Can I see my altitude on CarPlay?
Not with Cockpitly. Its Altitude is a live Drive Mode widget on the iPhone or iPad in a holder. CarPlay widgets aren't live, so they can't follow your altitude as you drive.