# Absolute vs. relative accuracy

*“You did tests outside, and they seem to be very precise.*

*But how do you know that locations from beacons are exact (+- 2cm)?*

*I mean, what reference coordinate did you use to compare?”*

The questions touch on several critically important aspects of any positioning system and even more of those for indoor positioning systems:

- What coordinate system is used?
- How do you define “the ground truth”?
- How do you define accuracy at all?
- How do you measure it?
- What is the difference between absolute and relative accuracy?

There are many questions like this. They are related to each other, and it is vital to understand in detail how positioning systems work and how to assess them. Let’s discuss the points one by one.

## What coordinate system is used

Greenwich meridian or GPS/GLONASS coordinates are irrelevant when discussing indoor positioning systems (IPS) because your premises are indoors. The premises or the IPS can be anywhere – in Nairobi, underground in Canada, or on Mars – and if the IPS doesn’t have a link to an external coordinate system (a sort of geo-referencing), the system cannot calculate which part of the world it is even in theory. It can be anywhere.

Imagine you are in a closed room without windows. Your robot is precisely driving indoors using, for example, Marvelmind Indoor Positioning System. But you cannot measure which part of Earth you and your robot are in – the windows are closed. While you were driving inside, the aliens stole you from the Earth and transferred you to Alpha Centaurus. If you haven’t experienced acceleration, you can’t say whether you stayed or moved or are being moved at that moment and with what speed.

Something similar is already happening to us in real life – not in a hypothetical case with aliens – but in real life and every second. We believe we measure our very accurate coordinates against the Earth. At the same time, the Earth is flying several km/s in space against the Sun, and our solar system is flying with several tens of km/s against the center of the galaxy, etc. What are my coordinates? Against what?

Thus, we establish that **coordinates are always relative**.

What does the Marvelmind indoor positioning system use as a relative point?

- When you build the Marvelmind indoor positioning system, one of the stationary beacons is chosen by the system to have (0,0,0) coordinates
- You can assign any beacon to have a (0,0,0) coordinate. Even more, you can set any point on the map to be (0,0,0)

- Since, in some cases, the indoor system is linked with the outdoor, it is pretty easy to make geo-referencing: you link the IPS’ (0,0,0) point with external coordinates, for example, GPS coordinates, and turn the map so that it would match the angular direction between the two coordinate systems as well. Effectively, you align and lock not one but two points on the indoor map and two points on the external map. See more about geo-referencing in the Operating Manual

**Marvelmind Indoor Positioning system uses an internal (0,0,0) point as a reference**and builds a coordinate system against this point.

## Driving from point A to point B

Our system is designed, first of all, to guide an autonomous **robot from point A to point B**. Of course, the same applies to autonomous drones, forklifts, or even people tracking. All these cases are the same for this discussion. But for the sake of simplicity, let’s discuss autonomous robots.

With this approach in mind (driving from point A to point B), it does not matter what the absolute distance between point A and point B measured in meters is. Even when we say “*absolute distance*,” – it is not absolute. It is a distance related to some arbitrarily chosen distance unit – a meter. It could be in meters; it could be the lengths of the robot; it could be in some units of our indoor positioning system.

For precise autonomous drive or precise indoor positioning, it is crucial that the system can very precisely and very accurately measure the coordinates of mobile beacons. Coordinates in the coordinate system of stationary beacons. Not in meters. Not in some GPS coordinates but in the internal coordinate system of the stationary beacons. Because we know the coordinate of point A in internal coordinates, the coordinates of point B in internal coordinates, and the robot’s current location in internal coordinates. So, **internal distances, coordinates, and dimensions matter – not some “external meters” or external coordinates**.

Here is how it works in practice on an example of a mobile robot:

- You drive or push your robot to point A and record/set/assign a point on the map of stationary beacons (IPS map/RTLS map) corresponding to the point in the real space
- Then you drive/push your robot to a point B in the area and assign a point B on the map of stationary beacons
- You repeat the same for whatever number of points you wish, for example, to all topics in between points A and B, if the robot turns along the way and has to drive on a complex curve
- Robot’s controller measures the difference between the robot’s current location – in internal coordinates of the indoor positioning system – and adjusts driving (change power on the motors, turns, if needed, etc.). Then, it repeats the same with some logic until the coordinates are close enough to make sure where are on the right path or reaching the right point. All this is done, measured in internal coordinates of the indoor positioning system

## Absolute distance

When you already have an indoor positioning system up and running, your robot is ready to drive because the robot has coordinates of point A, point B, and its current coordinates. The robot’s autopilot will compare the expected location (the next desired waypoint) with the robot’s current location and drive the robot accordingly.

What is essential, the **robot doesn’t need to know the distance in meters**. Everything is measured in some internal units – inside the coordinate system inside the indoor positioning system. Not in meters.

Why do we focus on this so much? Why do we stress that the absolute distances do not really matter and even harm sometimes when mixed with internal measurement units/distances:

- Our system uses using time of flight of ultrasound. This is why Marvelmind IPS is so precise. But this is why it is important to remember that the speed of sound in the air is not an absolute constant. It depends on many parameters and, first of all, the air temperature. Likely, the air temperature indoors is typically stable. However, even that is not always the case. Besides, the temperature can be stable, but the absolute air temperature may differ drastically – from -40 to +60C, for example. And the speed of sound in the air would be notably different in those conditions. Thus, the temperature must be taken into account. Yes, and now.
- Imagine an air balloon. If you have more pressure inside, the balloon is slightly bigger; if you have lower pressure inside – slightly smaller. Draw a triangle on the surface of the balloon. It will have three pivoting points – your driving waypoints. They are relative coordinates inside the coordinate system of the balloon. The relative coordinates of the waypoints wouldn’t change whether you have a slightly larger or slightly smaller balloon. The relative coordinates remain the same. The ratio of distances remains the same.
- You can always precisely drive from one point to another. But if you start measuring the sizes of each line in “external meters,” you will quickly find that the distances are different (obviously, because the diameter of the balloon changed). And suppose you measured the coordinates of those points in “ground truth,” for example, against something external and using, for example, a laser distance meter. In that case, one may conclude that the “absolute” coordinates are measured incorrectly. But the conclusion is incorrect because: a) there are no “absolute” coordinates, b) there is confusion between the indoor positioning system and some external positioning systems. The robot driving on the surface wouldn’t notice any problem with the dimensions. Maybe, only indirectly, like: increased energy consumption, because the size of the balloon increased in terms of the size of the wheels of the robot, and the robot must make more revolutions to cover the same distance

Therefore, it is important to distinguish between relative and absolute distance clearly. It is essential to understand that “absolute” space is not absolute either – it is the relative distance measured in something else – platinum meters, the revolution of the wheels, etc.

**Summary and key points**:

- Marvelmind indoor positioning system is designed to drive from point A to point B. It is not “a laser distance meter,” at least without a calibration
- We define accuracy against the points on the map of stationary beacons. It is relative accuracy. And this accuracy is typically better than ±2cm

## Relative accuracy vs. absolute accuracy

Remember, the Marvelmind Indoor Positioning System is, first of all, designed to drive a robot from point A to point B. To be very accurate in doing that, we need to have as little dispersion of the measurements of the location of point A, point B, and the robot’s current location as possible.Option 1 has higher distribution but a lower average shift against (0,0) coordinates. Whereas, Option 2 is relatively more accurate but has a bigger absolute change against the (0,0) point.

Once again, an absolute shift from an expected point measured in meters or some other measurement units outside of our coordinate system doesn’t matter. We must make exact measurements inside the system: for point A, point B, and the robot’s current location. Then, we will be able to drive from point A to B very accurately and return very accurately, and it doesn’t matter whether it takes us 10.000m or 10.200m to go from A to B. Therefore, when we drive, we bring the robot to point A and measure its position very accurately. Then, we move the robot to point B. It can be shifted against some external coordinate system, against an external grid – it doesn’t matter. After we moved the robot, we again recorded the measured location of point B in our indoor positioning system. And now, we want to drive back to the original point A as precisely as possible. The correct choice would be Option 2 because it is relatively more accurate, and it doesn’t matter that it is shifted in the external coordinate system.

**Summary**:

- Which option is better: Option 1 or Option 2? – It depends on the needs of the indoor positioning system.
**Marvelmind IPS focuses on Option 2**. When we refer to**±2cm accuracy**, we refer to Option 2. And Option 2 is much better for real-life applications when you need to drive from point A to point B precisely - What is the absolute accuracy for Marvelmind IPS? – a shift from an externally defined (0,0) coordinate – Without a calibration, typically –
**1-2%**. Not**±2cm**, but**1-2%**, because the measured distance depends on the speed of sound in the air, and the speed of sound depends on temperature. Notice that**1-2%**is significantly more than**±2cm**on typical sizes for our system. For example, for a 10m size, it is a 10-20cm absolute error. Thus, the measured result using Marvelmind Indoor GPS will have a very low dispersion – typical sigma of**±2cm**– but it can easily be shifted by**1-2%**, i.e., perhaps 10-20 times more than the diameter of the measurement spot

Therefore, we are perfect if you want to use Marvelmind RTLS for autonomous driving or flying. If you’re going to use us as an alternative to a laser distance meter – only with calibration and a clear understanding of the limitations (air temperature, first of all).