Situm is able to provide the location and orientation of the user with a certain degree of accuracy.
Location and 2D orientation (bearing) #
Situm is mostly used to fuel tracking & wayfinding apps. These apps need to know the location of the device in the world, and its orientation or bearing with respect to the North. Situm provides:
- Location:
- Global. 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).
- Bearing:
- Global. Measures the rotation of the device around its Z axis. It is provided as the rotation with respect to the Earth’s North, measured clockwise.
- Cartesian bearing. Measures the rotation of the device around its Z axis. Provided as the rotation with respect to the cartesian X axis of the building, measured clockwise.
The following figure illustrates how Situm computes the Cartesian location and the Global & Cartesian Orientation.
- First, the Cartesian Location is computed with respect to the XY axis: in this case (x=100m, y=45m). Note that the (0,0) corresponds to the Bottom-Left corner of the image, annotated with a “4” in Situm Dashboard.
- Then, this Cartesian Location is translated by Situm SDK into a Global Location (lat-long). The building center (lat=43.35224135793309, lng=-8.425012511304711 in this case), its width (204.3m) and length (136.4m) is used to convert from XY to lat-long coordinates.
- Then, the Cartesian Bearing is computed as the counter-clockwise rotation with respect to the X axis (+45 degrees in this case).
- Finally, the Cartesian Bearing is converted to the Global Orientation (+60 degrees in this case, measured as the clockwise rotation with respect to the North). Note that the building rotation is around +15 degrees in this case.
3D Orientation #
Augmented Reality applications need to know not only the regular bearing of the phone, but the orientation of the phone around its 3 axis (bearing, pitch, roll). Situm provides:
- Bearing. Measures the rotation of the device around its Z axis. As explained in the previous Section, it is provided as the orientation with respect to the Earth’s North, measured clockwise. If the phone’s back is pointing North, or the Y-axis is aligned with the North, the bearing angle will be 360º.
- 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º.
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.
Indoor positioning modes #
Situm provides three methods (mutually exclusive) for computing Indoor geolocations within a building:
- Situm Indoor. Determines the user’s location in the calibrated areas based on the WiFi/BLE signals detected.
- 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.
- 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).
OS | Only BLE | Only WiFi | WIFI & BLE |
---|---|---|---|
<Android 9 | 45 seconds | 45 seconds | 45 seconds |
>=Android 9 | 45 seconds | 60 seconds | 60 seconds |
iOS | 45 seconds | Does not apply | Does 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:
- If GPS is not available, the behaviour is similar to the Indoor Mode.
- If GPS falls outside a geofence, the behaviour is similar to Calibrated Indoor GPS Mode.
- 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 #
Mode | Recommended environments | Strengths | Weaknesses |
---|---|---|---|
Situm Indoor | Indoor 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 Indoor | Mixed 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 Indoor | Mixed 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.
Sensor | How is it used? | Shortcomings | Corrections |
---|---|---|---|
Accelerometer | Provides 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). |
Gyroscope | Measures 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. |
Magnetometer | Provides 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. |