Project description by Vlad-Andrei Dorobantu

Alti-Variometer specification

The project consists in the realization of an accurate low-cost Alti-Variometer and Barometer instrument based on the Sparkfun Electronics Weather Board equipped with VTI's SCP1000 digital absolute pressure sensor (see Fig.1) and running on a Sony Ericsson C905 mobile phone. The project was targeted to leisure aviation (Paraglider, Hang-glider, Sailplane, Light airplanes, etc).

Fig. 1: Sparkfun Weather Board (SEN-08311)

I've made this project primary because while paragliding, I don't want looking to complex instruments, but just "feel sensations"and have fun. Therefore, my wish was to be advertized before penetrating the floor of a unauthorized controlled airspace. Indeed, as you can see on the Fig 2, my preferred paragliding flying area is overlapped by TMA (Terminal Area) Geneva 2.

Fig 2: Partial view of Geneva's TMAs (CartaBossy © 2008 Jean Bossy & Editerra)

Despite the fact there are lot of sophisticated commercial Alti-Variometers on the market (Flytec, Bräuniger and Renschler, etc.), we found no one providing this simple "set and forget" mode for altitude limit. Conversely, when I'm flying the airplane, what I might need is a second altitude and climb-rate instrument. This second altimeter could use, by instance, a different altimeter setting.

I want to take with me as less apparatuses as possible during the flight (camera, mobile phone, GPS, Alti-Variometer, etc.). Unless very rigorous, there are some chances I forget something (these gadgets could also significantly increase the total weight of a glider pilot). Anyway, I take with me the mobile phone, in the event of an emergency. Therefore, if the Alti-Variometer could be grouped with camera, mobile phone and the GPS, it would considerably simplify my life, but also improve flight security.

Improvement of flight security is obvious, because during some critical phases of flight the pilot's hands should be as much as possible available for flying controls. Even in steady flight, manipulating and switching between different apparatuses may contribute to loosing pilot's concentration on the flight attitude, leading to a possible loss of control, or even a collision.

Furthermore, as an engineer, one wonder to take advantage from a super-powerful miniature computer of the Sony Ericsson mobile phone, programmable in Java, equipped with high resolution color screen, Bluetooth, etc. The other aspects are the financial one and also the contribution to the planet ecologic saving, through reusing of the already available resources from the mobile phone computer.

Fig. 3: Project block diagram

Physical principles of Baro-altimeter

An airplane barometric altimeter measures pressure at flight altitude, and converts the pressure measurement to an indication of height above sea level, according to a standard pressure-altitude relationship.

The International Civil Aviation Organization (ICAO), an United Nations agency, defines the International Standard Atmosphere (also known as ICAO Standard Atmosphere), a model of the standard variation of pressure, temperature, density, and viscosity with altitude in the Earth's atmosphere [1]. The International Standard Atmosphere is a plausible model of atmosphere, derived from statistical observations (roughly representative over the year-round, mid-latitude conditions).

The international convention of International Standard Atmosphere (ISA) doesn't directly define a correspondence between the altitude and pressure, but defines instead a function between the altitude and temperature, witch, by the means of physic's laws, leads to an altitude-to-pressure correspondence. The ISA tropospheric model is characterized by:

Therefore, in the troposphere region, the temperaturecan be expressed as a function of H only [2]:



is the air temperature in [K]

is the standard temperature at sea level of 288.15 K (15 °C)

is the troposphere lapse rate (tropospheric temperature gradient) of

is the height above mean sea level in [m]

The air obeys to the fundamental hydrostatic principle, who expresses the variation of pressure and altitude versus air density as:



is the infinitesimal pressure variation in [Pa]

is the infinitesimal altitude variation in [m]

is the air density at this altitude in

is the average gravity acceleration on the earth's surface

Moreover, the air density depends on the pressure and temperature as indicated by an the perfect/ideal gas law:



is the pressure in [Pa]

is the air density of the air at this altitude in

is the air temperature in [K]

is the gas constant for unit mass of dry air of 287.0529 J/K/kg

Combining equations (2) and (3) yields to:


For troposphere region, substitutingfrom equation (1) into the above relation (4), assumingconstant and equal toand integrating both sides:


One obtains the form:



is the atmospheric pressure at the sea level (for)

is the atmospheric pressure value at the altitude

is the average surface gravity acceleration (assumed constant in a first approximation) with the magnitude of 9.80665

Hence, the troposphere dependence of the static ambient air pressure,is:


One can express the height in troposphere,, in explicit form [2]:


Depending on desired precision, one can use this formula also for non-standard values of "constants". For example, one can use a reduced sea level atmospheric pressure (calculated using the known height and the corresponding measured air pressure), a reduced sea level temperature (calculated with the known height and the appropriate measured air temperature) or a gravity acceleration corresponding to the real geographic coordinates.

Please note that the above hydrostatic models assume a homogeneous, still atmosphere, with no temperature inversions, which is rather rare under real conditions.

Altitude, Height or Flight level?

As far as aviation is concerned, there are several ways of indicating the vertical position of an aircraft. Unlike what most people think, Height, Altitude and Flight Level are not equivalent [3]. The difference consists in the reference pressure setting on the baro-altimeter (altimeter setting). Let's see the differences.

One defines the pressure altitude as the vertical position referred to the isobaric surface 1013,25 hPa (or 29.92 inHg). The pressure altitude results from relation (8) under standard ISA conditions:


To indicate Altitude, the altimeter is setting corresponds to a sea-level reduced atmospheric pressure named QNH 1. The QNH altimeter setting is determined by measuring the existing pressure at a known MSL (Mean sea level) height, and converting it to a pressure that would theoretically exists (ISA model) at sea level, on the same vertical.

QHN is determined as the static reference air pressure from the relation (7), using the measured absolute static air pressure , in a point with known MSL altitude.

Digital altimeters uses directly the equation (8) to determine the Altitude, taking in the model, thebeing the measured static air pressure at the point of interest (without making any temperature correction to the ISA model).

Compatibility considerations

On classical (mechanical) altimeters one use the linearized relation (10). This relation, which expresses the indicated altitude, considers a linearization about the reference altitude(pressure altitude) with a constant altitude gradient of[1].


The indication of classical (mechanical) and digital altimeters are perfectly matched only if both settings are 1013.25 hPa. Indeed, this is because the constant gradient value ofused in the linarized formula (10), is the gradient of the pressure altitude in the relation (9).

QNH is the standard altimeter setting used through the world for altitude determination in aviation. Because QNH is different from one point to another, pilots cursing long flights must regularly update the altimeter setting en route, by receiving the QNH value either from a VOLMET (meteorological information for aircraft in flight), an ATIS (Automatic Terminal Information Service), an air traffic controller, and in the future, from the CPDLC (Controller Pilot Data Link Communications). As an alternate of the inflight QNH determination, one can use the altitude information provided by a GPS receiver with autonomous integrity monitoring (RAIM).

While QNH setting refers to the mean sea level, another possible setting is the QFE, which refers directly to the local airfield elevation, defining the Height. Because of the classical (mechanical) altimeter linearity constraint, the range of the barometric pressure setting is restrained between 950 to 1050 hPa. As a consequence, QFE is not usable for airfields situated at higher altitudes or in zones with atmospheric pressures beyond these limits.

Concluding, in case of QFE setting, the altimeter indicates height above field elevation (Height), while with QNH setting, the altimeter indicates height above mean sea level (Altitude). If the airplane uses the QNH provided by the airport meteorological station (measured in the vicinity of the runway) on ground contact during landing roll-out, the on-board indicated altitude will exactly mach the real altitude of the airfield.

Fig. 4: Altitude, Height and Flight level (figure from IVAO)

Flight level (FL) represents the pressure altitude in hundreds of feet (e.g., FL 330 = 33000 ft above the isobaric surface 1013.25 hPa (29.92 inHg)). FL is an approximative altitude indication (to be used with big caution above relief) used during high altitude cursing flights, to maintain vertical separation of inbound traffic.

System description

The accuracy of the absolute air pressure from VTI's SCP1000 sensor (1.5 Pa resolution), combined with a relatively high data output frequency (max. 1.7 Hz at 17-bit resolution) of the Sparkfun's Weather Board, leads to a remarkable precise instrument, having a resolution of 8 cm (3.5 inches) on the vertical air column.

This VTI's SCP1000 sensor is slower, but more accurate compared to Intersema MS5534, a sensor largely used by commercial Alti-Variometers.

The embedded Java program was implemented on a Sony Ericsson C905 mobile phone using Sun's NetBeans IDE 6.7 and SonyEricsson JavaME SDK

Fig. 5: Photo of the complete Alti-Variometer

The absolute atmosphere pressure is read in wireless mode (Bluetooth) and processed to provide Altitude, Height, Pressure Altitude, Climb Rate, or the QNH air pressure. Climb rate is obtained with a linear regression algorithm, combined with a low-pas IIR (Infinite Impulse Response) digital filter. Altitude signal is also low-pass filtered.

Among other usefully features, figures an "Altitude Beeper" (used to warn that a preset altitude has been reached). The "Sound Vario" is mainly used by gliders to inform the pilot on the thermals activity and intensity. The system provides also a possibility to auto-compensate the indicated altitude with deviations from standard temperature conditions (see equation (8)). Finally, the "File Logger utility" is very useful for post-processing and mathematical analysis.

As an enhancement, we also integrated the possibility to correct the standard atmosphere pressure reference (QNH) by using the mobile's phone GPS, as an aid. That's what is calling the "QNH correction by GPS".

The low cost GPS, integrated in mobiles phones, generally provides HAE (Height Above Ellipsoid) and not MSL altitude. Therefore, to determine a GPS MSL altitude, HAE altitude must be corrected by the local GUND (Geoid Undulation, the height of the Geoid above the Reference Elipsoid, in this case WGS 84). So, a virtual standard atmosphere reference pressure (virtual QNH) is calculated from GPS MSL altitude. If the difference between the used QNH and virtual QNH is significant, the used QNH is replaced by the virtual one. That's a very interesting geodetic subject and there is lot more to tell about!

Fig. 6: Program flow diagram

Building tips

We warn users to don’t use the Alti-Variometer data as a primary source for certified aircraft navigation because it is not a certified instrument. Also, altitude determination using an autonomous GPS is not considered by ICAO to be enough precise or accurate, to supersede the pressure altimeter for aviation use, without employing some methods of aiding .

If you don't want to spend a lot of time to salvage ATmega8 chip, don't ever play with fuse bits without being sure that you've set the correct ones. Salvaging the microcontroller can be a good challenge:

Fig. 7: Supplying an external clock to provide the right clock option

To enable Bluetooth communication, a Bluetooth Modem (BlueSMiRF Gold from SparkFun in our case) must be soldered on the Whether Board.

Fig. 8: Sparkfun BlueSMiRF Gold (WRL-00582)

It's essential that you configure the Bluetooth Modem to set serial communications baud rate to 9600 bps. If not, the Bluetooth Modem will not be able to communicate with the Whether Board. The configuration can be done through the PC, for instance, with the HyperTerminal Windows program.

Fig. 9: Sparkfun BlueSMiRF Gold soldered at the rear of the Whether Board

To increase the Alti-Vario responsiveness we increased as much as possible the sampling rate to about 1.7 Hz instead of default 1 Hz, but still keeping the 17-bit resolution. Therefore a special version firmware of the Weather Board has to be installed. If you use the default firmware version, the calculated climb rate (in [m/s]) is distorted and the variometer responsiveness is much less effective.

Although the SCP1000 is not as light sensitive as traditional pressure components, due to the nature of the silicon based pressure sensing element, it is recommended to protect the sensing area against light. Therefore, we recommend using the following SCP1000 I-seal Gasket:

Fig. 10: Sparkfun SCP1000 I-seal Gasket (SEN-08925)

We also recommend using the SparkFun's Projects Case, shown in the figure:

Fig. 11: SparkFun Projects Case (WIG-08632)

We recommend the use of Olimex USB STK500 Compatible USB Programmer from SparkFun (PGM-08702):

Fig. 12: USB Programmer from SparkFun (PGM-08702)

Project's experiments

We first tested the Alti-Variometer set with the QNH of the very close Geneva Airport and compared the results against the AMSL altitude provided by a Garmin 295 GPS. We concluded that the absolute pressure provided by the sensor is correct.

Conversely, we put into the evidence that the previous Weather Board (v1), running a quasi similar program (a v2 program, with the piece of code which reads data from light sensor put into comments) provides erroneous absolute pressure values, well beyond absolute pressure accuracy limits given by manufacturer. Because hardware difference between v1 and v2 is minimal, we concluded that the SCP1000 sensor mounted on two different v1 boards, have been probably wrongly calibrated by manufacturer (VTI).

We tested the Alti-Variometer in my home's building elevator, on 23 m height difference. We compared the measured height difference against the real one, estimating an altitude variation precision better as 1% for this experiment.

Fig. 13: Altitude versus time – elevator experiment

During this experiment the altimeter was set at ISA temperature (no temperature compensation). Note that the drift is probably due to a temperature/light effect (the I-seal Gasket has been mounted subsequently). Indeed, to save the batteries, we switched on the Alti-Variometer just before the experiment, allowing no time to the internal temperatures to balance.

The figure below illustrates the increasing noise effect of digital derivation – vertical speed, computed as the derivative of the altitude variation, requires the use of the IIR filter for signal smoothing.

Fig. 14: Climb rate versus time – elevator experiment

The project is not yet entirely finished: we also plan to do some mathematical error analysis of obtained results from the experiment realized on Olympia Tower, in Munich (height difference: 185 m). We also plan to test the instrument with the paraglide and also in a small airplane.

Fig. 15: Experiment on Olympia Tower, in Munich, on a height difference of 185 m

Because the project is made during free time, we don't have fixed any delay.


Vlad-Andrei Dorobantu
52, chemin des Coudriers
1209 Geneva - Switzerland

Tel: +41 79 230 52 24
email: vlad at ulmpassion dot ch
Click here to see my CV.


[1] - Klopfstein G. (2008): "Comprendre l'avion - Tome 1, L'air et l'avion"

[2] - Collinson, R., P., G. (1996): "Introduction to Avionics", Chapman & Hall, UK

[3] - International Virtual Aviation Organization:
"Altimeter Settings:
"Altimetry in general explained":
"The Altimeter":

General references

Intersema: "Using MS5534 for Barometers"

Intersema: "Höhenkorrektur bei Höhenmessern"

Atmel: "ATmega8 Datasheet

Federal Aviation Administration: "The United States Standard for Area Navigation (RNAV)"

GeoTools: "The open source Java GIS Toolkit"

National Geospatial Intelligence Agency: "WGS 84, N=M=180 Earth Gravitational Model"

NetBeans: "NetBeans IDE 6.7"

Olimex Ltd.: "AVR-PG1B (Serial Port) Microcontroller Programmer"

Roving Networks: "User Guide for: Roving Networks Bluetooth Serial Module Command Set (As applied to RN-21/22/24, and RN-41 Bluetooth Modules, BluePort-XP, RN-USB-X and FireFly Serial Adapters)"

Sony Ericsson: "Java ME Platform Docs & Tools"

Sony Ericsson: "Java ME Platform CLDC MIDP2, Developer’s Guidelines"

Sony Ericsson: Unreachable JP-8 phone (C905) over the USB emulated Ethernet interface

Sparkfun Electronics, Home:;
"USB Weather Board":

Sun Developer Network: "Java ME Technology APIs & Docs"

VTI Technologies: "SCP1000 SERIES – ABSOLUTE PRESSURE SENSOR, Datasheet and specification":


1  Between the two world wars radiotelegraphy and the Morse code where used for communications between the ground and the cockpit. The Q code, initially created for maritime radio operators speaking different languages, was adapted for aviation. It's an international code, consisting of three-letter groups, all starting with the letter Q. Some elements, such as QNH and QFE are still used today.