04 – Indoor location and orientation estimation

Situm is able to provide the location and orientation of the user with a certain degree of accuracy.

  • Location:
    • In the world. Position of the device in the world, as a latitude-longitude pair (EPSG3857:WSG84).
    • Cartesian location. XY position, in meters, with respect to the cartesian origin of coordinates of the building (bottom-left corner of the floorplan).
  • 3D Orientation:
    • With respect to the device axis. 3D orientation of the device around its 3 axis:
      • Bearing. Measures the rotation of the device around its Z axis. It is provided as the orientation with respect to the Earth’s north, measured clockwise.
      • Pitch. Device’s inclination around its X axis. It measures of the difference in height between the device’s top and bottom (speaker and microphone). Starting with the device in a flat plane, with the screen looking upwards:
        • If the device is in a flat plane with the screen looking upwards, the pitch angle will be 0º.
        • If the device is in a flat plane with the screen looking downwards, the pitch angle will be 0º.
        • If the screen is vertical and the microphone is at the top, the angle will be 90º.
        • If the screen is vertical and the microphone at the bottom, the angle will be -90º.
      • Roll. Describes the device’s lateral inclination, around its Y axis. It is the angle of the screen from side to side. Note: If the pitch angle is 90º or -90º (the phone is vertical), the roll angle will be uncertain.
        • If the screen is flat looking upwards, the roll angle will be 0º.
        • If the screen is flat and looking down, the roll angle will be 180º or -180º.
        • If the screen is vertical and looking to the right, the angle will be 90º.
        • If the screen is vertical and looking to the left, the roll angle will be -90º.
    • Cartesian location. If the device is inside a building, Situm provided its position in cartesian coordinates (XY in meters) with respect to the bottomleft corner of the floorplan, plus the identifier of the building and floor where it is.

The following figure illustrates the concept of cartesian location & bearing:

The device in a flat plane with the screen looking upwards and downwards.

The screen in vertical and the microphone is at the top and at the bottom.

The screen is horizontal and looking to the left and to the right.

XY coordinates are measured in meters from the bottom-left corner of the floorplan. Orientation in counter-clockwise radians with respect to the X axis of the building.

Bearing #

The bearing describes the phone’s orientation with respect to the North, calculated clockwise. If the phone’s back is pointing North, or the Y-axis is aligned with the North, the bearing angle will be 360º.

  • 360º is North
  • 90º is East
  • 180º is South
  • 270º is West

Note: There is a known issue in the SDK where the angles between North and East go between 360º and 450º.

Indoor positioning modes #

Situm provides three methods (mutually exclusive) for computing Indoor geolocations within a building:

  1. Situm Indoor. Determines the user’s location in the calibrated areas based on the WiFi/BLE signals detected. 
  2. Calibrated Indoor GPS. Determines the user’s location by fusing together the WiFi/BLE and GPS signals of the device, but only in those areas which have been previously calibrated.  
  3. Uncalibrated Indoor GPS. Determines the user’s location both in calibrated and uncalibrated areas inside the building’s canvas based on the WiFi/BLE signals and the GPS position. Uncalibrated areas have to be delimited by special geofences.

All of these methods work both in Building or Global mode. In any of these methods, there may be times when Situm will not be able to provide a valid Indoor Location, usually because the signals do not match with what is expected in a given building. In this case, Situm will inform that the user is not in any known building.

Situm Indoor geolocation mode #

This method is the one recommended by default if the target environment has good WiFi/BLE coverage. It determines the user’s position in the calibrated areas of a building by matching WiFi/BLE signals received with the calibrations.

a) Calibrated area

b) Middle ground area

c) Out of building area

The previous figure will help to understand how this mode works: 

  • When the user is in the calibrated area, the WiFi/BLE signals will match perfectly with those of the calibrations, and therefore Situm will provide an accurate Indoor Location within that area. Note that the calibrated area may contain indoor & outdoor spaces (e.g. the parking lot). 
  • In the middle ground area, some WiFi / BLE signals from the calibrations will still be heard, therefore providing a match (incorrectly).  In this case, Situm will provide an imprecise and often erratic location in the calibrated area. This is common when the user is entering/exiting the building.
  • Finally, if the user gets farther away from the building, they will eventually be in the out of building area, where WiFi/BLE signals will not match with the calibrations. Here, Situm will not provide any valid location, just inform that the user is not in any known building after a period of time (see Next Table).
OSOnly BLEOnly WiFiWIFI & BLE
<Android 945 seconds45 seconds45 seconds
>=Android 945 seconds60 seconds60 seconds
iOS45 secondsDoes not applyDoes not apply

Calibrated Indoor GPS #

GPS does not work under the roof, but that does not mean that GPS cannot be used in some places within buildings to improve the positioning experience. That includes: OpenSky areas, floors with glass ceilings, outdoors parking lots within the building canvas, etc. 

If your building contains such areas, and especially if these areas have insufficient WiFi/BLE coverage, you may want to activate the Calibrated GPS Indoor Mode. This mode fuses GPS with WiFi/BLE signals, returning an Indoor Position both in indoor and outdoor calibrated areas of the building.  The GPS signal will be used as long as it falls within a 100 meters margin from the building’s canvas. 

The following image shows how this mode works: the GPS signal will be mixed with WiFi/BLE in the whole calibrated area (green area), although it will only be relevant in the outdoor space (e.g. parking lot, field), where there’s a good GPS signal. Like in the Situm Indoor Mode, Situm will only produce Indoor Locations within the calibrated area. Therefore, when the user is in the middle ground area,  Situm will provide an inaccurate location in the calibrated area. When the user is in the out of building area, Situm will inform that the user is not in any known building after a period of time (see table of Situm Indoor Mode).

a) Indoors calibrated area (WiFi/BLE used, GPS has low influence)

b) Middle ground area

c) Out of building area

d) Outdoors calibrated area (GPS + WiFi + BLE used)

The previous figure will help to understand how this mode works:

  • When the user is in the calibrated area, the GPS signal will be mixed with WiFi/BLE, although it will only be relevant in the outdoor space (e.g. parking lot, field), where there’s a good GPS signal. Like in the Situm Indoor Mode, Situm will only produce Indoor Locations within the calibrated area. 
  • The WiFi/BLE signals will match perfectly with those of the calibrations, and therefore Situm will provide an accurate Indoor Location within that area. Note that the calibrated area may contain indoor & outdoor spaces (e.g. the parking lot). 
  • In the middle ground area, some WiFi / BLE signals from the calibrations will still be heard, therefore providing a match (incorrectly).  Even if they don’t, the GPS position may fall within the building canvas. Under any of these events, Situm will provide an imprecise and often erratic location in the calibrated area. This is common when the user is entering/exiting the building.
  • Finally, if the user gets farther away from the building, they will eventually be in the out of building area. In this area, WiFi/BLE signals will not match with the calibrations, and the GPS signal will be out of the canvas boundaries. Here, Situm will not provide any valid location, just inform that the user is not in any known building after a period of time (see table in Situm Indoor Mode section).

Uncalibrated Indoor GPS #

In the previous mode, an user had to calibrate all the outdoor areas of the building where he wanted to use the GPS signal. The uncalibrated indoor mode saves much of this work, by being able to provide positioning both in calibrated and uncalibrated areas of a building, mixing GPS and WIFi/BLE signals in all of them. 

This method requires a simple preconfiguration: the building must contain geofences with a specific configuration in the outdoor areas where the GPS information will be used. This area is represented in blue in the following figure.  

a) Indoors calibrated area (WiFi/BLE used, GPS has low influence)

b) Middle ground area

c) Out of building area

d) Outdoors calibrated area (GPS + WiFi + BLE used)

e) Outdoors geofenced area (GPS + WiFi + BLE used)

This is how it works: 

  1. If GPS is not available, the behaviour is similar to the Indoor Mode.
  2. If GPS falls outside a geofence, the behaviour is similar to Calibrated Indoor GPS Mode.
  3. If GPS falls one of those geofences (e.g. blue area in the previous figure), the location will be calculated by mixing BLE and GPS (WiFi will be deactivated).

We recommend to use this method with the Building Selection Mode #4: Automatic Selection WiFi/BLE Signals + GPS in geofence.

Comparison: Pros & Cons of each mode #

ModeRecommended environmentsStrengthsWeaknesses
Situm IndoorIndoor environments with good WiFi/BLE coverage and where the GPS doesn’t work. Robust and accurate if there’s good WiFi/BLE coverage.It only provides geolocation within the calibrated space. Requires good WiFi/BLE coverage.Cannot take advantage of GPS in outdoor spaces. When the user is near a calibrated area, the WiFi/BLE signals detected will partially coincide, generating imprecise or erratic positions. 
Calibrated GPS IndoorMixed indoor/outdoor environments where there are areas with good GPS coverage.   Robust and accurate if there’s good WiFi/BLE coverage.Robust even without good WiFi/BLE coverage if there is GPS signal (e.g. outdoor spaces).   It only provides geolocation within the calibrated space. It requires calibrating all spaces (indoor & outdoor) even if no WiFi/BLE signal is available. Same as Situm Indoor, the generated position when the user is outside the calibrated area can be erratic. In this case, this behaviour might even worsen since the GPS will introduce bigger errors.

Uncalibrated GPS IndoorMixed indoor/outdoor environments where there are areas with good GPS coverage.   Robust and accurate if there’s good WiFi/BLE coverage.Robust even without good WiFi/BLE coverage if there is GPS signal (e.g. outdoor spaces).   It does not require the calibration of the areas in which we only wish to use the information provided by the GPS. Sometimes, the GPS might fall within a geofence (erroneously) and cause unexpected behaviours. Sometimes, when the user is inside a geofence, BLE signals might pull the position towards the calibrated areas.

Computing orientation #

Situm estimates the orientation of the smartphone by combining accelerometer, gyroscope and magnetometer information with the movement of the users and previous location estimates.  This sensor fusion is intelligent. For example, if a gyro is available, the usual magnetic interferences will not affect the estimation of the orientation and the orientation accuracy will be high. In devices that do not have a gyro, these interferences can cause momentary loss of orientation or incorrect turns, although these failures are usually temporary, quickly corrected by the system.

SensorHow is it used?ShortcomingsCorrections
AccelerometerProvides a common frame of reference (gravity) to estimate the 3D orientation of the smartphone.  Accelerometer information can be noisy if the user is moving.Situm stabilizes the information by means of intelligent fusion algorithms (with other sensor info, such as gyro and magnetometer).
GyroscopeMeasures the angular speed (rotation in 3 axis) of the smartphone, yielding accurate information of orientation changes. It does not provide an absolute with respect to the North.Even if the smartphone is still, the gyroscope may still measure a degree of rotation (bias).Situm corrects the bias by means of intelligent fusion of multiple sensors: accelerometer, magnetometer, etc.
MagnetometerProvides absolute orientation with respect to the North. Electromagnetic interferences (electrical installations, machinery, metallic structures, etc) may induce errors on the orientation estimate.

From time to time, the magnetometer may uncalibrate itself.


Situm is able to detect electromagnetic interferences, cancelling out their influence (small interferences) or directly deactivating the magnetometer (large interferences).

Situm detects that the magnetometer is uncalibrated and deactivates it. It also suggests the user to perform a magnetometer calibration.

Subscribe to our newsletter

BASIC INFORMATION ON DATA PROTECTION

Data controller: SITUM TECHNOLOGIES, S.L.
Contact: Data controller: situm@situm.es
Responsible for protection: dpo@situm.es
Purpose and legal basis: To manage the sending of SITUM newsletters only with consent.
Legitimation: Express consent of the interested party.
Recipients: The data will not be passed on to third parties with the exception of legal obligations.
Retention period: As long as the interested party remains subscribed to the newsletter (a link to unsubscribe will be available in each newsletter sent by Situm).
Rights: The interested party may at any time revoke their consent, as well as exercise their rights of opposition, access, conservation, rectification, limitation, deletion of data and not be subject to a decision based only on automated data processing, by writing to SITUM at the addresses indicated.
Additional Information: You can consult additional and detailed information on Data Protection in our privacy policy.

Please, download your copy here

Thank you for downloading our whitepaper. Please do not hesitate to contact us if you would like to know more about how our solutions can help your business. Download whitepaper


Close window