Altitude estimation using crowd-sourced pressure sensor data

An electronic device may include a pressure sensor for measuring barometric pressure. Pressure measurements may be calibrated using crowd-sourced pressure data to remove any weather bias or sensor bias associated with the pressure measurements. Altitude of the electronic device may be determined using the calibrated pressure measurement. When it is desired to estimate altitude, the electronic device may transmit a query to a server, which returns a local reference pressure value for the electronic device based on crowd-sourced pressure data from electronic devices in the vicinity of the electronic device making the query. To determine the local reference pressure value, the server may correlate the crowd-sourced pressure data with space, taking into account variations in terrain using digital elevation models to determine location-specific reference pressures. The local reference pressure value for a given electronic device is then determined using crowd-sourced reference pressures at nearby locations.

BACKGROUND

This relates generally to electronic devices and, more particularly, to electronic devices having pressure sensors for gathering information about the electronic device and the environment.

Electronic devices often include sensors and other circuitry for detecting movement of the electronic device and for characterizing its surroundings. For example, inertial sensors such as an accelerometer or gyroscope are sometimes used to detect a rapid change in acceleration or orientation. Global Positioning System receiver circuitry and/or IEEE 802.11 (WiFi®) transceiver circuitry are sometimes used to determine where the electronic device is located. Infrared proximity sensors are used to detect when an electronic device is being held against a user's ear during a telephone call so that display and touch sensor circuitry can be temporarily disable during the call.

However, the decisions that an electronic device makes based on these types of sensors and circuitry may not always be reliable. Measuring vertical displacement with an accelerometer requires double integration of accelerometer data, and the noise associated with the accelerometer data may be too high to do this reliably. Global Positioning System receiver circuitry typically cannot be used inside of a building because the building blocks satellite signals. WiFi®-assisted positioning can be inaccurate due to multiple reflections of the radio signals. Infrared light from an infrared proximity sensor may be absorbed by dark hair, making it difficult to detect the user's head near the electronic device.

It would therefore be desirable to provide improved circuitry and methods for detecting movement and determining vertical displacement of an electronic device.

SUMMARY

An electronic device may include one or more pressure sensors for measuring barometric pressure. Pressure measurements may be calibrated using crowd-sourced pressure data to remove any weather bias or sensor bias associated with the pressure measurements. Altitude of the electronic device may be determined using the calibrated pressure measurement.

When it is desired to estimate altitude, the electronic device may transmit a query to a server over a wireless network. This may include, for example, providing to the server a geographic location of the electronic device as determined by global navigation satellite system receiver circuitry. In response to the query, the server may determine a local reference pressure value for the electronic device based on crowd-sourced pressure data from electronic devices in the vicinity of the electronic device making the query. The server may transmit the local reference pressure value to the electronic device over the wireless network.

Because the local reference pressure is determined using pressure measurements from a large number of devices, the local reference pressure value may be indicative of a weather bias associated with local atmospheric weather conditions. When it is desired to estimate the altitude of an electronic device using a pressure measurement, control circuitry in the electronic device may subtract the weather bias from the pressure measurement. The control circuitry may then convert the calibrated pressure measurement to altitude using a standard atmosphere model.

If desired, control circuitry may also determine a sensor bias associated with the pressure sensor to further refine the altitude estimate. The sensor bias may be a known value stored in the electronic device, may be a value that varies with the temperature that can be determined using a look-up table stored in the electronic device, or may be a value that can be determined using crowd-sourced pressure data.

To determine the local reference pressure value, a server may gather pressure sensor measurements from a number of electronic devices. Based on the gathered pressure measurements, the server may determine reference pressure values for respective geographic locations. When a query is received from an electronic device, the server may provide the electronic device with a local reference pressure value based on the reference pressure values determined at nearby geographic locations. The correlation between reference pressure sample points may be determined using digital elevation models or least squares collocation.

DETAILED DESCRIPTION

An illustrative electronic device that may be provided with one or more pressure sensors is shown inFIG. 1. Electronic device10ofFIG. 1may be a handheld electronic device or other electronic device. For example, electronic device10may be a cellular telephone, media player, or other handheld portable device, a somewhat smaller portable device such as a wrist-watch device, pendant device, or other wearable or miniature device, gaming equipment, a tablet computer, a notebook computer, a desktop computer, a television, a computer monitor, a computer integrated into a computer display, or other electronic equipment.

In the example ofFIG. 1, device10includes a display such as display14. Display14has been mounted in a housing such as housing12. Housing12, which may sometimes be referred to as an enclosure or case, may be formed of plastic, glass, ceramics, fiber composites, metal (e.g., stainless steel, aluminum, etc.), other suitable materials, or a combination of any two or more of these materials. Housing12may be formed using a unibody configuration in which some or all of housing12is machined or molded as a single structure or may be formed using multiple structures (e.g., an internal frame structure, one or more structures that form exterior housing surfaces, etc.).

Display14may be a touch screen display that incorporates a layer of conductive capacitive touch sensor electrodes or other touch sensor components (e.g., resistive touch sensor components, acoustic touch sensor components, force-based touch sensor components, light-based touch sensor components, etc.) or may be a display that is not touch-sensitive. Capacitive touch screen electrodes may be formed from an array of indium tin oxide pads or other transparent conductive structures.

Display14may include an array of display pixels formed from liquid crystal display (LCD) components, an array of electrophoretic display pixels, an array of plasma display pixels, an array of organic light-emitting diode display pixels, an array of electrowetting display pixels, or display pixels based on other display technologies. The brightness of display14may be adjustable. For example, display14may include a backlight unit formed from a light source such as a lamp or light-emitting diodes that can be used to increase or decrease display backlight levels and thereby adjust display brightness. Display14may also include organic light-emitting diode pixels or other pixels with adjustable intensities. In this type of display, display brightness can be adjusted by adjusting the intensities of drive signals used to control individual display pixels.

Display14may be protected using a display cover layer such as a layer of transparent glass or clear plastic. Openings may be formed in the display cover layer. For example, an opening may be formed in the display cover layer to accommodate a button such as button16. An opening may also be formed in the display cover layer to accommodate ports such as speaker port18.

In the center of display14, display14may contain an array of active display pixels. This region is sometimes referred to as the active area of the display. A rectangular ring-shaped region surrounding the periphery of the active display region may not contain any active display pixels and may therefore sometimes be referred to as the inactive area of the display. The display cover layer or other display layers in display14may be provided with an opaque masking layer in the inactive region to hide internal components from view by a user.

A schematic diagram of device10is shown inFIG. 2. As shown inFIG. 2, electronic device10may include control circuitry such as storage and processing circuitry40. Storage and processing circuitry40may include one or more different types of storage such as hard disk drive storage, nonvolatile memory (e.g., flash memory or other electrically-programmable-read-only memory), volatile memory (e.g., static or dynamic random-access-memory), etc. Processing circuitry in storage and processing circuitry40may be used in controlling the operation of device10. The processing circuitry may be based on one or more microprocessors, microcontrollers, digital signal processors, baseband processor integrated circuits, application specific integrated circuits, etc.

With one suitable arrangement, storage and processing circuitry40may be used to run software on device10such as Internet browsing applications, email applications, media playback applications, activity logging applications, fitness applications, operating system functions, software for capturing and processing images, software implementing functions associated with gathering and processing sensor data, software that makes adjustments to display brightness and touch sensor functionality, etc.

To support interactions with external equipment, storage and processing circuitry40may be used in implementing communications protocols. Communications protocols that may be implemented using storage and processing circuitry40include Internet protocols, wireless local area network protocols (e.g., IEEE 802.11 protocols—sometimes referred to as WiFi®), protocols for other short-range wireless communications links such as the Bluetooth® protocol, etc.

Input-output circuitry32may be used to allow input to be supplied to device10from a user or external devices and to allow output to be provided from device10to the user or external devices.

Input-output circuitry32may include wired and wireless communications circuitry34. Communications circuitry34may include radio-frequency (RF) transceiver circuitry formed from one or more integrated circuits, power amplifier circuitry, low-noise input amplifiers, passive RF components, one or more antennas, and other circuitry for handling RF wireless signals. Wireless signals can also be sent using light (e.g., using infrared communications). As shown inFIG. 2, circuitry34may include one or more radio-frequency transceivers such as cellular telephone transceiver circuitry42(e.g., one or more cellular telephone transmitters and/or receivers), IEEE 802.11 (WiFi®) transceiver circuitry44(e.g., one or more wireless local area network transmitters and/or receivers), Bluetooth® transceiver circuitry46such as a Bluetooth® Low Energy (Bluetooth LE) transmitter and/or receiver, and satellite navigation system receiver circuitry48(e.g., a Global Positioning System receiver or other satellite navigation system receiver).

Input-output circuitry32may include input-output devices36such as buttons, joysticks, click wheels, scrolling wheels, touch screens, other components with touch sensors such as track pads or touch-sensor-based buttons, vibrators, audio components such as microphones and speakers, image capture devices such as a camera module having an image sensor and a corresponding lens system, keyboards, status-indicator lights, tone generators, key pads, keyboards and other equipment for gathering input from a user or other external source and/or generating output for a user.

Sensor circuitry such as sensors38ofFIG. 2may include an ambient light sensor for gathering information on ambient light levels, proximity sensor components (e.g., light-based proximity sensors and/or proximity sensors based on other structures), accelerometers, gyroscopes, magnetic sensors, and other sensor structures. Sensors38ofFIG. 2may, for example, include one or more microelectromechanical systems (MEMS) sensors (e.g., accelerometers, gyroscopes, microphones, force sensors, pressure sensors, capacitive sensors, or any other suitable type of sensor formed using microelectromechanical systems technology). If desired, other components in device10may be formed using microelectromechanical systems technology.

To detect and characterize movement and location of electronic device10and to detect and characterize the environment around electronic device10, sensors38may be provided with one or more pressure sensors50. Pressure sensor50(sometimes referred to as pressure sensor circuitry50, pressure sensor array50, or pressure sensor structures50) may include one or more pressure sensors that measure the air pressure of the surrounding environment. Pressure sensors50may, for example, include absolute barometric diaphragm-based pressure sensors formed from piezo-resistors embedded in a micro-machined silicon diaphragm (sometimes referred to as a piezo-resistive pressure sensor). This is, however, merely illustrative. If desired, other suitable pressure sensor technology may be used (e.g., strain gauge based pressure sensors having a metal strain gauge on a metal diaphragm, capacitive based pressure sensors having a parallel plate capacitor structure on a diaphragm, other suitable microelectromechanical systems based pressure sensors, etc.).

Pressure sensor circuitry50may, for example, be used to determine the altitude of electronic device10(e.g., the height of electronic device10relative to seal level or ground level). Control circuitry (e.g., storage and processing circuitry40) may gather pressure measurements from pressure sensor circuitry50and may convert each pressure measurement to an altitude using a standard model of atmospheric pressure.

Challenges may arise when using a barometric pressure sensor to determine altitude. The local atmospheric pressure at a given altitude can vary due to different weather conditions. It is also possible that two pressure sensors at the same altitude and under the same weather conditions will output slightly different pressure readings due to manufacturing variations and other factors.

To obtain accurate altitude information using pressure sensor circuitry50, electronic device10may calibrate pressure measurements from sensor50using crowd-sourced reference pressure sensor data. The crowd-sourced reference pressure data may be used to determine the weather bias associated with atmospheric weather conditions at a particular location, and if desired, the sensor bias associated with pressure sensor50. The bias terms (e.g., offset due to weather conditions and offset due to the sensor itself) may be subtracted from the pressure measurement output from pressure sensor50to obtain a calibrated pressure value that can be used to accurately and reliably determine altitude.

An illustrative system in which an electronic device may communicate with a server to calibrate pressure sensor measurements is shown inFIG. 3. As shown inFIG. 3, system52may include a communications network such as network22. Communications network22may include wired and wireless local area networks and wide area networks (e.g., the Internet). Equipment such as computing equipment20may be used in implementing online services. Computing equipment20may include one or more networked computers (e.g., servers) on which software is run to implement software-based services. The services that are hosted using computing equipment such as computing equipment20may include video server services, audio server services, web page services, communications services, media playback services, online storage services, social networking services, games, etc. The servers that are used in providing online services may be implemented using one or more computers that are located at one or more different geographic locations.

Electronic devices10may communicate with online service computing equipment20over communications network22. In a typical wired connection arrangement, an electronic device may be connected to network22using a cable. The cable may connect the electronic device to equipment in network22. For example, link such as link28ofFIG. 1may be used to interconnect an electronic device to network22(e.g., using a modem). Wireless links may also be formed as part of links28or other links in system52.

For example, an electronic device may have a wireless local area network adapter that allows the device to communicate wirelessly with wireless local area network equipment such as wireless local area network equipment24. Wireless local area network equipment24may, for example, be a router or access point that supports IEEE 802.11 communications (sometimes referred to as WiFi®). As illustrated inFIG. 3, one or more electronic devices10may be connected to the network by forming a local wireless link such as one of links30A with equipment24.

In addition to forming local wireless links, electronic devices10may form remote wireless links (i.e., links that may cover distances of a mile or more). Links of this type may be made, for example, with cellular telephone base stations such as cellular telephone base stations26. In the example ofFIG. 3, one of cellular base stations26is shown as forming a remote wireless communications link30B with an associated one of electronic devices10.

Wireless local area network equipment24and cellular base stations26may be connected to other equipment in network22using wired or wireless links (shown as links28inFIG. 3). Because wireless local area network equipment24and cellular base stations26serve to provide access to network22, equipment24and cellular base stations26may serve as part of communications network22and are sometimes referred to as wireless network equipment. Other wireless equipment may also be used in network22and in forming wireless connections to network22. The example ofFIG. 3is merely illustrative.

Server20may collect data from electronic devices10in system52and may relay information back to electronic devices10based on the collected data. Information collected from each electronic device10may include local atmospheric pressure measurements from pressure sensor50and location information indicating a location of electronic device10at a given time (e.g., location information from satellite navigation receiver48and/or from IEEE 802.11 (WiFi®) transceiver circuitry44). For example, wireless communications circuitry34in each electronic device10may transmit pressure data from pressure sensor50to server20over wireless network22, and server20may transmit crowd-sourced reference pressure information to electronic devices10over network22. Server20may collect pressure measurements and location information from 5 or more devices, 10 or more devices, 50 or more devices, 100 or more devices, 1000 or more devices, or any other suitable number of electronic devices10.

By collecting pressure measurements and location data from a large number of devices, server20can correlate atmospheric pressure patterns with location and time. This information can in turn be used to separate the weather component of a pressure sensor signal from the altitude component. For example, by gathering a large number of pressure samples from electronic devices at a given latitude and longitude, a reference pressure value can be derived for that particular location. Then, for an electronic device at that particular location, the difference between the electronic device's measured pressure value and the reference pressure value will more accurately indicate the altitude of the electronic device since the weather component of the measurement will be removed.

In one suitable arrangement, an algorithm can run continuously on server20to estimate reference pressure values at different locations based on crowd-sourced pressure samples from electronic devices10. To correlate the reference pressure data with geographic location, the algorithm running on server20may use digital elevation models to select and adjust the models used for spatial correlation. For example, if there is a mountain between sample points, there is likely to be a weaker correlation between pressure samples at the sample points than if there were flat terrain between the sample points. If desired, server20may use methods such as least-squares collocation to spatially correlate the crowd-sourced pressure data.

FIG. 4is a graph showing illustrative pressure sensor data that may be crowd-sourced from a number of electronic devices in a given area. Curve54shows an illustrative distribution of pressure sensor measurements from electronic devices (e.g., 1000 electronic devices10of the type shown inFIGS. 1, 2, and 3) in a particular region (e.g., within a building, within a neighborhood, within a city, or within any other suitable area). Curve56shows an illustrative distribution of the average pressure sensor measurement from the electronic devices. To compute the average, N samples may be drawn from parent distribution54and averaged. This process is repeated a number of times, with the resulting average plotted to generate curve56.

As the sample size increases (e.g., as the number of samples N increases), the distribution of the average will approach a normal distribution (according to the Central Limit Theorem), as indicated by curve56. The distribution will be centered at PREFwith some standard deviation. In general, any suitable sample size may be used (e.g., the number of samples N may be equal to 5, 10, 20, 50, 100, 1000 more than 1000 less than 1000 etc.).

Server20ofFIG. 3may receive pressure sensor measurements from electronic devices10in different regions and may compute a reference pressure value PREFfor each region based on the received pressure measurements. For example, server20may gather pressure samples from 1000 devices at a particular location (e.g., a particular latitude and longitude) and may repeatedly compute an average of N samples drawn from the pressure samples to determine a reference pressure value PREFfor that particular location.

FIG. 5is a diagram showing how a server such as server20ofFIG. 3may calculate a reference pressure value PREFat a grid of different geographic locations58(sometimes referred to herein as sample points). Each geographic location may be associated with a longitude (λ) and latitude (φ). The reference pressure value PREFat each sample point58may be determined using pressure sensor data that is collected from electronic devices10within a given area of the sample point58(e.g., using the method described in connection withFIG. 4).

In some embodiments, server20may continuously update reference pressure values at locations58(e.g., may continuously collect pressure samples from devices10in locations58and continuously update PREFat locations58based on the collected samples). In other embodiments, server20may periodically update reference pressure values at locations58or may update reference pressure values at locations58at triggered intervals. For example, server20may continuously collect pressure samples from devices in regions58but may re-compute PREFonly when a query is received from an electronic device requesting a reference pressure value at a particular location.

When an electronic device10at a given one of geographic locations58requests a reference pressure value from server20, server20may provide the reference pressure value PREFfor that particular location to electronic device10. In many situations, however, an electronic device10may be at a location60(λ1, φ1) between locations58. In this scenario, when electronic device10at location60sends a request to server20for a reference pressure value, server20determines a reference pressure value at location60using the determined reference pressure values at nearby locations58(e.g., nearby locations58A,58B,58C, and58D). If desired, a digital elevation model (DEM) may be used to determine the correlation between sample points58. For example, if the digital elevation model indicates that a mountain is interposed between two sample points, there would be a weaker correlation between the two sample points than if there were flat terrain between the two sample points. Methods such as least-squares collocation may also be used to determine a reference pressure value for location60.

In some embodiments, the local reference pressure value at location60may be determined by server20and provided to electronic device10. In other embodiments, server20may provide nearby reference pressure values (e.g., at locations58A,58B,58C, and58D) to electronic device10and electronic device10may determine the local reference pressure value based on the nearby values.

Upon determining a local reference pressure value at location60, the altitude of electronic device10at location60with respect to a reference geoid (e.g., an equipotential surface modeling mean sea level) may be determined. For example, the altitude of electronic device10may be determined by subtracting the reference pressure value at location60from the pressure sensor signal output from pressure sensor50(FIG. 2), thereby removing any bias due to atmospheric weather conditions at location60. The calibrated reference pressure (e.g., the pressure measurement from which weather bias has been removed) may then be converted to altitude using a desired standard atmosphere model. If desired, the altitude of electronic device10may be determined by server20and provided to electronic device10or may be determined using processing circuitry40of electronic device10.

FIG. 6is a flow chart of illustrative steps involved in providing a local reference pressure from a server to an electronic device as described in connection withFIGS. 3, 4, and 5.

At step600, server20may gather pressure measurements from multiple electronic devices at different geographic locations (e.g., different latitudes and longitudes). This may include, for example, receiving pressure measurements output by pressure sensors50over network22. As an example, server20may gather pressure samples from 1000 devices at each location in a grid of locations (e.g., a grid of latitudes and longitudes). If desired, pressure measurements may be collected continuously or may be collected at designated intervals (e.g., periodic intervals that are triggered automatically or intervals that are triggered by a particular activity such as a request from a client device).

At step602, server20may determine reference pressure values at respective geographic locations (sometimes referred to herein as sample points) based on the collected pressure sensor measurements. For example, server20may repeatedly compute an average of N samples drawn from the crowd-sourced pressure data at a particular location to determine a reference pressure value PREFfor that particular location. This is, however, merely illustrative. In some embodiments, the distribution of pressure may be a normal distribution and it may not be necessary to compute the average. In general, any suitable method may be used to estimate a reference pressure value for a particular location based on crowd-sourced pressure data. Arrangements in which the distribution of the average of N pressure samples is used to determine a reference pressure value PREFis sometimes described herein as an illustrative example.

At step604, server20may receive a query from an electronic device10at a particular geographic location requesting a reference pressure value for that particular location.

At step606, server20may determine the reference pressure value at the requested location. If electronic device10is located at one of the sample points for which a reference pressure value was calculated in step604, server20may use that value as the reference pressure value for electronic device10. If, on the other hand, electronic device10is located between the sample points with calculated reference pressure values, server20may determine a local reference pressure value for electronic device10based on the reference pressure values at nearby sample points. This may include, for example, using a digital elevation model (DEM) to determine the correlation between nearby sample points, using least-squares collocation to determine the correlation between nearby sample points, and/or using other suitable methods to estimate a local reference pressure for electronic device10based on nearby crowd-sourced reference pressure values.

At step608, server20may provide the local reference pressure value to electronic device10(e.g., over network22). Electronic device10may then use the local reference pressure value to calibrate its own pressure sensor signal by subtracting the reference pressure value from the pressure sensor signal to remove any bias due to atmospheric weather conditions.

The example ofFIG. 6in which reference pressure values are calculated for different locations prior to receiving a query from electronic device10is merely illustrative. If desired, step600in which pressure samples are gathered may be repeated until a query is received from device10(step604), at which point server20may determine the reference pressure values at the grid of sample points (step602).

where Paltitude corresponds to the calibrated pressure sensor signal to be converted to altitude; Pmeasured corresponds to the pressure sensor signal output from pressure sensor50; PREFcorresponds to the local reference pressure value (determined using the process described inFIG. 6); SB corresponds to the bias associated with sensor50; E corresponds to any remaining error terms (which may be estimated or negligible); and ƒ(Paltitude) is a function of Paltitude that converts Paltitude into altitude using a desired standard atmosphere model.

In some scenarios, the sensor bias SB may be negligible and/or may be accounted for in the local reference pressure value PREF. In other scenarios, it may be desirable to determine the bias SB associated with sensor50to further improve the accuracy of the altitude estimation. If the sensor bias is significant and is not a known value (e.g., a known sensor bias value stored in device10), electronic device10can estimate the sensor bias using crowd-sourced reference pressure information. For example, if the altitude of device10is well-estimated using location detection circuitry in electronic device10(e.g., if global navigation satellite system receiver circuitry48can reliably determine the altitude of device10), control circuitry40can estimate the sensor bias by reversing equation (2) to determine Paltitude, which can then be plugged into equation (2) to determine SB.

FIG. 7is a flow chart of illustrative steps involved in estimating a sensor bias associated with pressure sensor50ofFIG. 2. The process ofFIG. 7may occur when the altitude of electronic device10can be well estimated using satellite navigation circuitry48and/or IEEE 802.11 transceiver circuitry44.

At step700, control circuitry40may gather a pressure measurement (Pmeasured) from pressure sensor50.

At step702, control circuitry40may determine the altitude of electronic device10using satellite navigation circuitry48and/or IEEE 802.11 transceiver circuitry44.

At step704, control circuitry702may request and receive the local weather bias PREFusing the process described inFIG. 6.

At step706, control circuitry40may determine the sensor bias associated with sensor50based on the altitude, weather bias (PREF), and measured pressure (Pmeasured). This may include, for example, rearranging equations (1) and (2) to determine the sensor bias SB.

If desired, server20may collect pressure sensor bias values from multiple electronic devices10. The crowd-sourced pressure sensor bias estimates may in turn be used to refine the weather bias estimate (PREF) in a particular region. For example, the crowd-sourced sensor bias estimate may be subtracted from PREF(determined using the process ofFIG. 6) to separate the sensor bias from the weather bias.

FIG. 8is a flow chart of illustrative steps involved in determining the altitude of electronic device10at a particular location using crowd-sourced pressure information.

At step800, control circuitry40may gather a pressure sensor measurement (Pmeasured) from pressure sensor50.

At step802, control circuitry40may determine a weather bias (PREF) associated with atmospheric weather conditions around electronic device10. This may include, for example, requesting and receiving a local reference pressure value from a server. The server may determine the local reference pressure value using crowd-sourced reference pressure measurements from electronic devices in the vicinity of electronic device10as described in connection withFIG. 6.

At optional step804, control circuitry40may determine a sensor bias (SB) associated with sensor50. This may include, for example, estimating the sensor bias using the process described inFIG. 7. In other scenarios, the sensor bias may be a predetermined value that is stored in electronic device10. In some arrangements, the sensor bias may be a stable value and need not be re-calculated often or at all. In other arrangements, the sensor bias may vary as the temperature of sensor50varies. If desired, a look-up table or other reference indicating the relationship between sensor bias and sensor temperature may be stored in electronic device10so that control circuitry40can accurately determine the sensor bias associated with pressure sensor50at a given time. In some scenarios, the sensor bias associated with pressure sensor50may be negligible and step804may be omitted.

At step806, control circuitry40may calibrate the pressure measurement (Pmeasured) by removing the weather bias (PREF) and sensor bias (SB) as shown in equation (1). If any other error terms (E) are known or well-estimated, those may also be subtracted from the pressure measurement in step806.

At step808, control circuitry40may determine the altitude of electronic device10by converting the calibrated pressure measurement to altitude using a standard atmosphere model as shown in equation (2).

If desired, step808may include determining the altitude of electronic device10relative to sea level. In some scenarios, it may be desirable to determine the altitude of electronic device10relative to ground level. This may be achieved using digital elevation models stored or otherwise accessed on electronic device10. Digital elevation models can provide bare earth altitude representations of a region. If a digital elevation model is available for the region in which electronic device10is located, control circuitry40can subtract the digital elevation model bare earth altitude from the altitude estimated from pressure. The resulting altitude will therefore correspond to the altitude of electronic device10relative to ground level, which in turn can be used to determine a floor level (e.g., which floor of a building electronic device10is located on).