Coordinate references for the indoor / outdoor seamless positioning

Indoor positioning technologies are being developed rapidly, and seamless positioning which connected indoor and outdoor space is a new trend. The indoor and outdoor positioning are not applying the same coordinate system and different indoor positioning scenes uses different indoor local coordinate reference systems. A specific and unified coordinate reference frame is needed as the space basis and premise in seamless positioning application. Trajectory analysis of indoor and outdoor integration also requires a uniform coordinate reference. However, the coordinate reference frame in seamless positioning which can applied to various complex scenarios is lacking of research for a long time. In this paper, we proposed a universal coordinate reference frame in indoor/outdoor seamless positioning. The research focus on analysis and classify the indoor positioning scenes and put forward the coordinate reference system establishment and coordinate transformation methods in each scene. And, through some experiments, the calibration method feasibility was verified.


Introduction
A variety of indoor positioning technologies are being developed rapidly in nowadays, such as Wi-Fi, Bluetooth, and UWB, which are used in hospitals, shopping malls, warehouses, underground car parks and other places (Song et al, 2011).The integrated positioning and navigation system of indoor/outdoor, called seamless positioning (Lau, 2005), is gradually applied in the real life.In general, the indoor positioning uses indoor local Cartesian coordinate systems, while outdoor positioning from GPS uses geocentric coordinate systems or Earthcentered-earth-fixed (ECEF) coordinate systems, such as WGS-84.The indoor and outdoor positioning are not applying the same coordinate system.The connection of indoor and outdoor spaces is an important requirement for seamless positioning, and it needs to unify the coordinate reference system for both indoor and outdoor spaces.Besides, analyzing indoor positioning data in different spaces also needs a unified spatial scale and coordinate reference.The traditional coordinate system is difficult to fulfil the wide range of application requirements of the current seamless location based service (Liu et al., 2012).However, a specific and practical coordinate reference frame in seamless positioning is lacking of research for a long time.New positioning technologies have been widely proposed in recent years.Pei (2009) presented three optional indoor/outdoor locating solutions based on multi-sensors, satellite and terrestrial mobile communication network.GNSS and Terrestrial (Sottile et al., 2011) are the most mature and popular technologies for the outdoor positioning.The indoor positioning research has become a hot topic already, and many methods and technologies by sensors were put forward to obtain an accurate indoor location in many research projects.The spatial reference datum is the foundation of the indoor navigation and positioning.As the indoor space area is regional, the indoor local Cartesian coordinate system has been adopted in most scenes to calculate and represent an indoor position location (Juang et al, 2015).Usually, a suitable location such as a corner of a building can be selected as the origin point (O) for an indoor local coordinate reference system.Then the vertical direction and radial direction of the origin point are defined as Zaxis and X-axis.The examples can be shown in Fig. 1.In fact, the indoor local coordinate reference system is a kind of vertical topocentric coordinate systems.The origin point coordinates and the azimuths of three axes can be measured by the RTK (Real-time kinematic) equipment and Gyro Total Station in outdoor coordinate reference system.Then, the associated relationship between the indoor and outdoor coordinates can be established.The conversion method of Bursa-Wolf model and 3D, 7-parameter datum transformation can be applied (Závoti et al., 2016).The transformation equation is as follows.

� 𝑋𝑋
where [  ,   ,   ]  is the target coordinates, [∆, ∆, ∆]  is the unknown shift, K is the unknown scale-factor, R () is the rotation matrix of three axis, and [  ,   ,   ]  is the coordinates of the object point.Especially, the OGC standard IndoorGML (2014) provides a concept to connect indoor and outdoor spaces by defining additional topology elements between indoor and outdoor spaces.Every indoor space contains at least one entrance, called anchor node, and it can be used to connect indoor and outdoor spaces.The anchor node element contains attributes about external reference and conversion parameters (rotation origin point, rotation angles, rescaling factors and translation vector) to support the seamless conversion between indoor and outdoor spaces.However, the complexity of an indoor environment has not been considered in the above methods.In many cases, the coordinate reference system is not built for the whole building, and it may be just a small area in an irregular building.In this situation, and the origin point may not be located in a corner of the building.So, the connection between a indoor local Cartesian coordinate system and a geocentric coordinate system is difficult to establish.The existing research have not proposed a universal coordinate system frame for both indoor and outdoor spaces, as it would ignore some specific details in different indoor spaces.After analyzing and classifying different indoor space, this paper proposes a method to establish the indoor positioning coordinate reference system, and the indoor and outdoor coordinates conversion method is also provided.Some specific buildings are selected to test and verify the the proposed method.

Scene classification and CRS establishment
Until now, the indoor positioning technologies are mainly used in large shopping malls, exhibition halls, underground car parks and so on, which can provide location information actively or passively.The location information can be used for indoor location based services (Werner, 2014).However, due to different indoor spaces, it needs different local coordinate reference systems to satisfy various indoor positioning applications.
From the spatial structure aspect, six application scenes could be classified after summarizing the characters of indoor spaces in the practical usage of indoor positioning.An application scene contains the elements of buildings, ground, and floor.These scenes are multiple buildings, a building without underground, a building with underground, a underground building, a building with floors and a partial space inside a building.They are illustrated in Fig. 2. In addition, the shape of building can be both regular or irregular.Although this paper mostly describe the method in a regular building as the example, the method also can be used in the irregular situation.Their detail descriptions and the coordinate reference system establishment methods are provided as follows.
• Multiple buildings: It is the scene of the indoor positioning in multiple buildings, such as a playground and tourist attractions.It contains dense and complex indoor space.For all buildings, a boundary rectangle can be established.Usually, any vertex of the boundary rectangle can be chosen as the origin point of the indoor coordinate reference system.The two edges connected to the chosen vertex are selected as the coordinate X and Y axis, and the Z axis is vertical to the surface.Fig. 3 shows an example of this scene.
Fig. 3. indoor local coordinate reference system for multiple buildings area Fig. 4. indoor local coordinate reference system in a underground building • A building without underground: It is the scene of the indoor positioning in a building without underground, such as a shopping mall, a large factory and campus.In order to establish the indoor coordinate reference system, the building can be abstracted as a cuboid.Any vertex of the surface, which is on the ground, can be selected as the original point.The edges connected to the selected vertex are the three axis, where the Zaxis is vertical to the ground.For an irregular building, an external cuboid should be generated first.Then, it can be treated as a regular one.• A building with underground: It is the scene that a building contains ground and underground two parts, such as a shopping mall with an underground car park or a railway station.The coordinate reference system is similar to the building without underground, but the coordinate in the underground is a negative value in Z-axis.• A underground building: It is the scene of indoor positioning in a underground building or space, such as an underground mine and a single underground car park.The spatial structure of a mine is more complex.The point which is vertical corresponding to the mine entrance was chosen as the origin point of the indoor coordinate reference system.It can be illustrated in Fig. 4. The directions of the X and Y axis are determined by the spatial structure and azimuth measurement of the mine.The underground car park is usually a regular indoor space which selects a corner in boundary to be the origin point.• A building with floors: Some shopping malls only select a floor in a building to set up indoor positioning environment.The square corner point of the floor boundary can be selected as the origin point of the indoor coordinate reference system.The edges connected to the selected point are the coordinate X and Y axis, and Z axis is vertical to the floor surface.• A partial space inside a building: It is a regular or irregular space inside a building.The coordinate system is similar to the first scene.In summary, six indoor positioning scenes mainly distinguish in the spatial structure.But, the methods to build the coordinate reference system have some similarity to some extent.For the special and complex indoor space, there are other methods to construct the coordinate system.

Coordinate transform method
The key issue to achieve indoor/outdoor seamless positioning and continuous location based services is the ability to transform indoor coordinate to outdoor coordinate accurately and quickly.In theory, a known origin point coordinates and the angle of axes could be used to convert the coordinate in different coordinate reference systems.But some origin points in indoor space cannot get precise geodetic coordinates directly by the GPS, so it needs additional methods to implement the coordinates transformation.Based on the existing coordinate transform algorithms, this paper provides two methods: the direct transformation method and the indirect transformation method.

Direct transformation method
The direct transformation method is based on the precise geodetic coordinates of the origin point and the angle between true north and X-axis in the indoor local coordinate reference system.So, the transformation relationship between the indoor and outdoor coordinates can be established.In this paper, the geocentric coordinate system WGS-84 is selected as the outdoor coordinate reference system.The geocentric geodetic coordinate of the origin point O in indoor local coordinate reference system is known as (, , ), and the angle between true north and X axis is known as φ, the plane XOY is parallel to the tangent of point O (Fig. 5).Supposing the indoor coordinate of a point P in indoor local coordinate reference system is known as �  ,   ,   �, the geocentric Cartesian coordinate of point O (  ,   ,   )could be calculated below: = ( + ) * cos  cos    = ( + ) * cos  sin    = ( * (1 −  2 ) + ) * sin  Fig. 5.The direct transformation method to connect indoor and outdoor space According to the coordinate transformation model, the indoor local coordinate reference system must rotation angle φ in X axis at first, then convert to geodetic coordinate reference system in 7-parameter datum transformation.So geocentric Cartesian coordinate of point P in outdoor coordinate reference system [  ,   ,   ]  is:

Indirect transformation method
The indirect transformation method is applied in the situation that the accurate geodetic coordinates of origin point can not be obtained.In this paper, we put forward a method by setting up an anchor point in the indoor coordinate reference system.However, the geodetic coordinates of the anchor point can be gained by the traverse survey, and it is used to connect the indoor and outdoor spaces.
As shown in Fig. 6, the indoor space is inside the a building, and it cannot get GPS signal.By the traverse survey, the coordinates of point P in the indoor local coordinate reference system are �  ,   ,   �, and the geocentric Cartesian coordinates of point P in the outdoor coordinate reference system are known as �  ,   ,   �.
In addition, the angle between true north and X axis of the indoor local coordinate reference system is known as φ.Supposing the indoor coordinate of a point M is known as (  ,   ,   ), so the geocentric Cartesian coordinate of point M (  ,   ,   ) in outdoor coordinate reference system could be calculated as follows: Fig. 6.The indirect conversion method in indoor and outdoor space

Experiment and discussion
A teaching building in Nanjing Normal University of China has been selected as the experimental area.The building is a total of 6 floors, and each floor has about 5000 square meters area.In the experiment, the 2D and 3D maps of the building are created based on the construction design drawings.The data is shown in Fig. 7.A partial region in first floor and the fourth floor are chosen to build a Bluetooth indoor positioning environment.origin point O cannot be measured when the origin is in the air or inside of a building sometimes.So, an anchor point P is used to connect indoor and outdoor space.We can realize the result of the transformation error in Table 2, the coordinate errors in X and Y axes is a small value.The maximum difference value in X axis is 5.9 mm and the 6.8 mm in Y axis.The error in Z axis is larger relatively which reached 18.5 mm.The main reason is the inaccuracy of height measurement.In summary, the method about the indoor local coordinate reference system establishment and coordinates transformation from indoor to outdoor is practical and accurate.

Conclusion
A unified coordinate frame is the foundation in seamless positioning and has an important significant in indoor and outdoor trajectory analysis.In this paper, we proposed a universal coordinate reference frame in indoor/outdoor seamless positioning.The research focus on analysis and classify the indoor positioning scenes and put forward the coordinate reference system establishment and coordinate transformation methods in each scene.And, through some experiments, the calibration method feasibility was verified.We expect that the widespread applicability of the method in more complex scenes would be verified in more experiments in the future work.

Fig. 1 .
Fig. 1.The example of indoor local coordinate reference system for a building

Fig. 2 .
Fig. 2. The classification of the indoor positioning application scenesDifferent scenes have different application scenarios.Their detail descriptions and the coordinate reference system establishment methods are provided as follows.•Multiple buildings: It is the scene of the indoor positioning in multiple buildings, such as a playground and tourist attractions.It contains dense and complex indoor space.For all buildings, a boundary rectangle can be established.Usually, any vertex of the boundary rectangle can be chosen as the origin point of the indoor coordinate reference system.The two edges connected to the chosen vertex are selected as the coordinate X and Y axis, and the Z axis is vertical to the surface.Fig.3shows an example of this scene.

Fig. 7 .Fig. 8 .Fig. 9 .
Fig. 7. 3D map of the building was draw based on the construction design drawings.Different scenes to build the indoor local coordinate reference system have been mentioned in this experiment.In Fig.8, an indoor positioning environment is the first floor of the building.The right-bottom corner point of the external rectangle is selected as the origin point O, and the coordinate axes are established based on the edges of the external rectangle.In this case, the origin point O must be calculated and measured accurately.However, if the indoor positioning environment is a part of the first floor, the indoor local coordinate reference system is illustrated in Fig.9.The establishment of coordinate reference system are easy and convenient.The square wall corner point can be selected as the origin point O, and the azimuth of X-axis can be measured directly.
Fig. 10.The coordinate system in the fourth floorThe coordinate transformation experiment is implemented after the indoor local coordinate reference system establishment.The outdoor coordinate reference system is WGS-84 in the experiment.The detail parameters of indoor local coordinate reference system above are list in Table1.

Table 1 .
The detail parameters of indoor local coordinate reference system in this experiment.Latitude, longitude and altitude are the coordinates of an origin point or anchor point.Due to the influence of measurement error and conversion methods, the errors occur inevitably.The coordinate's transformation errors of all experimental points are show in Table2.The CRS refers to the order in Table1, and all coordinates contain three axes value.

Table 2 .
The Error comparison of coordinate transformation.