# GPS-independent navigation using smartphone sensors

- 185 Downloads

**Part of the following topical collections:**

## Abstract

This study defines a novel method for navigating moving objects without using the GPS. Sensors of a smartphone measured desired values and a developed Android application recorded this data. A developed MATLAB code analyzed these values for a road trip by a car using several coordinate transformations. This code corrected the measured acceleration for removing the effects of the earth gravity and also removed the effects of the existed noises in the measured values by the sensors of this smartphone. The results show that, the calibrated data of the smartphone accelerometer can be used for obtaining a place, with an acceptable error. Nevertheless, obtaining acceleration using the GPS data is not correct.

## Keywords

Smartphone GPS-independent navigation Sensor## List of symbols

- \(\mathop {a_{n} }\limits^{ \to }\)
Acceleration vector in the vehicle-carried NED coordinate system

*a*_{nx}x-component components of the acceleration vector in the vehicle-carried NED coordinate system (m/s

^{2})- \(a_{nx}^{cor}\)
x-component components of the corrected acceleration vector in the vehicle-carried NED coordinate system (m/s

^{2})*a*_{ny}y-component components of the acceleration vector in the vehicle-carried NED coordinate system (m/s

^{2})- \(a_{ny}^{cor}\)
y-component components of the corrected acceleration vector in the vehicle-carried NED coordinate system (m/s

^{2})*a*_{nz}z-component components of the acceleration vector in the vehicle-carried NED coordinate system (m/s

^{2})- \(a_{nz}^{cor}\)
z-component components of the corrected acceleration vector in the vehicle-carried NED coordinate system (m/s

^{2})- \(\mathop {a_{s}^{cor} }\limits^{ \to }\)
Corrected acceleration vector in the smartphone coordinate system

*a*_{sx}x-component components of the acceleration vector in the smartphone coordinate system (m/s

^{2})- \(a_{sx}^{cor}\)
x-component components of the corrected acceleration vector in the smartphone coordinate system (m/s

^{2})*a*_{sy}y-component components of the acceleration vector in the smartphone coordinate system (m/s

^{2})- \(a_{sy}^{cor}\)
y-component components of the corrected acceleration vector in the smartphone coordinate system (m/s

^{2})*a*_{sz}z-component components of the acceleration vector in the smartphone coordinate system (m/s

^{2})- \(a_{sz}^{cor}\)
z-component components of the corrected acceleration vector in the smartphone coordinate system (m/s

^{2})*d*Distance between two points as the bird flies (m)

*d*_{t}Distance along the road as driven by the automobile between two points (m)

*e*A correction factor in the ECEF coordinate system

*g*The local earth gravitational acceleration (m/s

^{2})*g*^{ref}The earth gravitational acceleration at the start point (m/s

^{2})*h*Altitude (m)

*h*^{ref}Altitude of the start point (m)

*N*_{e}A correction factor in the ECEF coordinate system

- \(\mathop {P_{e} }\limits^{ \to }\)
The position vector in the ECEF coordinate system

- \(\mathop {P_{g} }\limits^{ \to }\)
The position vector in the geographic coordinate system

- \(\mathop {Pn}\limits^{ \to }\)
The position vector in the vehicle-carried NED coordinate system

*r*_{e}The mean radius of the earth (m)

*t*Time (s)

- \(\mathop {Vn}\limits^{ \to }\)
Velocity vector in the vehicle-carried NED coordinate system

*V*_{nx}x-component of the velocity vector in the vehicle-carried NED coordinate system (m/s)

*V*_{ny}y-component of the velocity vector in the vehicle-carried NED coordinate system (m/s)

*V*_{nz}z-component of the velocity vector in the vehicle-carried NED coordinate system (m/s)

- \(\mathop {Vs}\limits^{ \to }\)
Velocity vector in the smartphone coordinate system

*V*_{sx}x-component of the velocity vector in the smartphone coordinate system (m/s)

*V*_{sy}y-component of the velocity vector in the smartphone coordinate system (m/s)

*V*_{sz}z- component of the velocity vector in the smartphone coordinate system (m/s)

*x*_{e}x-component of the position vector in the vehicle-carried NED coordinate system (m)

- \(x_{e}^{ref}\)
x-component of the position of the start point in the ECEF coordinate system (m)

*x*_{n}x-component of the position vector in the ECEF coordinate system (m)

*y*_{e}y-component of the position vector in the ECEF coordinate system (m)

- \(y_{e}^{ref}\)
y-component of the position of the start point in the ECEF coordinate system (m)

*y*_{n}y-component of the position vector in the vehicle-carried NED coordinate system (m)

*z*_{e}z-component of the position vector in the ECEF coordinate system (m)

- \(z_{e}^{ref}\)
z-component of the position of the start point in the ECEF coordinate system (m)

*z*_{n}z-component of the position vector in the vehicle-carried NED coordinate system (m)

*θ*Pitch angle (°)

*λ*Longitude (°)

- \(\lambda^{ref}\)
Longitude of the start point (°)

*φ*Latitude (°)

*ϕ*Role angle (°)

- \(\varphi^{ref}\)
Latitude of the start point (°)

*ψ*Yaw angle (°)

## 1 Introduction

Controlling smart cars

Designing autopilot systems for aircrafts or unmanned aerial vehicles

Examining the performance of moving vehicles

Controlling multirotors

Designing self-balancing systems for bicycles or motorcycles

Medicine analyzing using the person’s gait

GPS-independent navigation.

Controlling these smart objects needs accurate information about the location of the object and also its performance during a certain motion. Motion analysis helps us to estimate the location of a motive object at each step of its motion and also the motion performance of this object during this motion. GPS-independent navigation lets to smart control some objects that have no access to the GPS data, such as submarines. A combination of various sensors can measure valuable data for this purpose. However, the smartphone is an accessible and cheap device for this aim. Therefore, examining its abilities for data recording, motion analyzing and GPS-independent navigation is necessary. This study defines a novel method for motion analyzing and GPS-independent navigation of moving objects, such as car, bus, bicycle, motorbike, helicopter, ship, boat, multirotor or aircraft. An Android application was installed on a smartphone to record measured values by its sensors. A homemade program code in JavaScript developed this application. Then, a developed MATLAB code analyzed the road trip of the car using the recorded data and calibrated the measured values by these sensors for GPS-independent navigation.

## 2 Methodology

### 2.1 Experiment

Some features of used smartphone

Processor | Samsung-Exynos 4412 (4 cores–1.4 GHz) |

Operating system | Android 4.0.4 |

Memory card type | MicroSD (4 GB) |

RAM | 1 GB |

Battery type | Li-Ion (2100 mAh) |

Motion sensor | LSM330DLC 3-axis accelerometer AK8975C 3-axis magnetic field sensor LSM330DLC gyroscope sensor Uncalibrated gyroscope sensor Corrected gyroscope sensor |

Sensor fusion | iNemoEngine orientation sensor Orientation sensor iNemoEngine gravity sensor Gravity sensor iNemoEngine linear acceleration sensor Linear acceleration sensor iNemoEngine rotation vector sensor Rotation vector sensor |

Miscellaneous sensor | CM36651 light sensor LPS331AP pressure sensor CM36651 proximity sensor |

Navigational system | GPS A-GPS GLONASS |

Time (in milliseconds since the UNIX epoch: January 1, 1970 00:00:00 UTC)

Rate of data recording (number of recorded data in each second)

Latitude (using the GPS, in degrees, which ranges from 0° at the Equator to 90° at the North or South pole)

Longitude (using the GPS, in degrees, which is defined as an angle pointing west or east from the Greenwich Meridian)

Altitude (using the GPS, in meters, above the WGS 84 reference ellipsoid)

Acceleration in the

*x*_{s}direction (using the gravity sensor, in meter per square second)Acceleration in the

*y*_{s}direction (using the gravity sensor, in meter per square second)Acceleration in the

*z*_{s}direction (using the gravity sensor, in meter per square second)Roll (using the orientation sensor, in degree)

Pitch (using the orientation sensor, in degree)

Yaw (using the orientation sensor, in degree).

*x*

_{s},

*y*

_{s}and

*z*

_{s}directions (smartphone coordinate system) and roll, pitch and yaw orientations.

### 2.2 Coordinate transformation

*φ*is the angular distance of a point from the Equator, and

*h*is the vertical distance of a point from the geoid. The earth centered-earth fixed (ECEF) coordinate system represents this point as below [15]:

*x*

_{e},

*y*

_{e}and

*z*

_{e}. Its origin is located at the earth’s center of mass. The

*x*

_{e}, y

_{e}, and z

_{e}axes extend through the intersection of the Prime Meridian and the Equator, through the intersection of the Equator and 90° longitude, and through the true north pole, respectively (see Fig. 1). Since, the earth is not a sphere and has a biaxial ellipsoid shape,

*N*

_{e}and

*e*were presented for correction. Where \(N_{e} = {{r_{e} } \mathord{\left/ {\vphantom {{r_{e} } {\sqrt {(1 - e^{2} )\text{Sin}^{2} \phi } }}} \right. \kern-0pt} {\sqrt {(1 - e^{2} )\text{Sin}^{2} \varphi } }}\),

*e*= 0.081819190842622 and

*r*

_{e}is the mean radius of the earth, which is equal to 6,378,137 m. The north east down (NED) coordinate system represents this point as below [15]:

*x*

_{n},

*y*

_{n}and

*z*

_{n}represent the position along the geodetic north, east and normal axes, respectively (see Fig. 1). Reference position (\(x_{e}^{ref}\), \(y_{e}^{ref}\), \(z_{e}^{ref}\), \(\varphi^{ref}\) and \(\lambda^{ref}\)) is the position of origin of the local NED frame (i.e., the start point of the car in the road trip).

*V*

_{n}). Until this section, all steps of coordinate transformation only used the GPS data.

*V*

_{n}is in the NED coordinate system. It can be transformed to the smart phone coordinate system (

*V*

_{s}) using the measured values of orientations. The following equation defines this transformation [16]:

*ϕ*,

*θ*and

*ψ*are roll, pitch and yaw angles and

*V*

_{sx},

*V*

_{sy}and

*V*

_{sz}are components of the car velocity (speed) vector in the

*x*

_{s},

*y*

_{s}and

*z*

_{s}directions, respectively (see Fig. 1). The gradient of the

*V*

_{s}–

*t*graph is the car acceleration (

*a*

_{GPS}) in the smart phone coordinate system.

*a*

_{GPS}and

*a*

_{accelerometer}(the measured acceleration using the accelerometer sensor) are in a same coordinate system. Therefore, these values are comparable.

There are two ways for measuring the acceleration of a moving object using a smart phone, the GPS and accelerometer sensor. Calculating the acceleration using the GPS data needs a double differentiation (the slope of the displacement–time graph gives the speed, and the slope of the speed-time graph gives the acceleration). On the other hand, the accelerometer sensor measures this parameter directly. It can validate the calculated acceleration using the GPS data and clears its instantaneous errors.

*a*

_{sx},

*a*

_{sy}and

*a*

_{sz}) in the smart phone coordinate system (see Fig. 1). The local earth gravitational acceleration (

*g*) affects these values. The following equation calculates

*g*at different altitudes [17]:

*g*on

*a*

_{sx},

*a*

_{sy}and

*a*

_{sz}, these values have been transformed from the smart phone coordinate system to the NED coordinate system (see Fig. 1). The values of role (

*ϕ*), pitch (

*θ*) and yaw (

*ψ*) angles are necessary for this purpose. The orientation sensor of the smart phone measured these values. The following equation calculates the instantaneous acceleration of the car in the NED coordinate system [18]:

*a*

_{nz}and

*g*vectors are parallel at each point, removing the effects of

*g*from

*a*

_{nz}\(\left( {a_{nz}^{cor} = a_{zn} - g} \right)\) is possible. The following equation transfers the corrected acceleration from the NED coordinate system to the smart phone coordinate system (see Fig. 1):

*a*

_{nx}and

*a*

_{ny}are perpendicular to the

*g*direction, these parameters are free from the

*g*effects.

### 2.3 Navigation using the smartphone sensors

*g*effects. For this purpose, a set of polynomial equations were defined, as below, for removing the effects of sensors noises. These noises can have huge effects, as integral effects, on the calculated values for the velocity and location using the measured acceleration by the smartphone sensors.

*c*

_{1}to

*c*

_{30}) were obtained by fitting the calculated location using these modified accelerations and orientations with the obtained location using the GPS. An optimization algorithm (i.e.

*fminsearch*) was used for minimizing the existed difference between these locations. Table 2 presents the obtained values for these constants.

The obtained values of *c*_{1} to *c*_{29}

Constant | Value |
---|---|

c | − 0.0298335679817724 |

c | − 0.123462459228374 |

c | 0.0636579518219812 |

c | − 0.00610671531284501 |

c | 0.0288888313911145 |

c | 0.00290251156387767 |

c | − 0.0536079145304248 |

c | 0.402905037305803 |

c | − 0.395826868844328 |

c | − 0.202374976645805 |

c | 0.239933995301236 |

c | 0.0764952741297610 |

c | − 0.00310780825157127 |

c | − 0.000167399216266299 |

c | − 0.0000205258944419954 |

c | − 2.14038544212840 |

c | − 1.57996314611318 |

c | 0.307006777364772 |

c | 0.0238094868409231 |

c | − 0.00134516632279696 |

c | 5.07528525130319 |

c | − 2.92993110192188 |

c | − 0.273316240766119 |

c | 0.0139555005050072 |

c | 0.00122524566498862 |

c | − 48.1658350217407 |

c | 2.57103521964248 |

c | − 0.00231254607934835 |

c | − 0.0000366660191176299 |

C | 0.000000185068970058501 |

## 3 Results and discussion

*a*

_{sx}and

*a*

_{sy}depend on the values of pitch and roll, respectively. Because, the gravitational acceleration affects these values. Figure 3 shows the obtained

*x*–

*y*plot, using the recorded GPS data, for this trip on a satellite image. The obtained

*x*–

*y*plot in the NED coordinate system has a perfect accordance with the road in the map. It approves the accuracy of this method. This method is different from the other navigate applications. Other applications display your trip on a map using a comparison between the GPS data of your locations and prerecorded values for each point of its map. The distance between two points (i.e., origin and destination) in geodetic measurements has two different definitions:

The length of a straight line that connects these two points \(\left( {d = \sqrt {x_{n}^{2} + y_{n}^{2} + z_{n}^{2} } } \right)\), which indicates the linear distance between these points

The length of the existed road between these two cities \(\left( {d_{t} = \sum d } \right)\), which indicates the path length between these points

*d*

_{t}with

*d*). The slopes of these curves show the mean speed of the car in each section of the trip. This value was about 90 km/h throughout the trip. Figure 5 shows the instantaneous values of the car speed vector and its triple components in the smartphone coordinate system. These values have been calculated using the GPS data. Considering forward motion of the car (except in some conditions such as climbing or turning around), matching of

*V*

_{sy}and

*V*

_{s}was expected.

*g*should be removed from the sensed acceleration for a suitable GPS-independent navigation using the measured values by the smartphone sensors. Figure 6 compares the measured and corrected values of acceleration. The corrected

*a*

_{sz}is smaller than the corrected values of

*a*

_{sx}and

*a*

_{sy}. Figure 7 compares the obtained acceleration using the GPS (\(\left( {a_{GPS} = \tfrac{{d^{2} (d_{t} )}}{{dt^{2} }}} \right)\) and accelerometer sensor \(\left( {a_{Accelerometer} = \sqrt {a_{sx}^{{cor^{2} }} + a_{sy}^{{cor^{2} }} + a_{sz}^{{cor^{2} }} } } \right)\). These values are near together, occasionally. However, the noisy GPS data have low accuracy for calculating the acceleration. As a result, it is more accurate to obtain the location and acceleration using the GPS and accelerometer sensor, respectively. Nevertheless, calibrating the measured noisy values by the smartphone sensors can improves the accuracy of the estimated location without the GPS data. Figure 8 compares the estimations of

*x*,

*y*and

*z*using the calibrated values of the sensed accelerations and orientations with the obtained location by the GPS data in this road trip. It is observed that these calibrated values have acceptable estimations.

## 4 Conclusion

This study defined a novel method for motion analyzing of moving objects and GPS-independent navigation. A developed Android application was installed on a smartphone for recording measured values by its sensors. A developed MATLAB code analyzed a road trip of a car using these data and calibrated the measured data by the acceleration and orientation sensors. Several coordinate transformations were used to give valuable information from these recorded data. The measured acceleration was corrected for removing the effects of earth gravitational acceleration and also the existed noises in their measurements. The obtained x–y plot in the NED coordinate system had a perfect accordance with the road. The obtained instantaneous and mean speeds of the car presented acceptable and sensible information about this road trip. Integration or differentiation improves the noises of the accelerometer sensor and GPS unit of the smartphones. It is more accurate to obtain the location and acceleration using the GPS and accelerometer sensor, respectively. However, the presented calibration method in this study can improves the navigation accuracy of this smartphone without using the GPS data.

## Notes

### Compliance with ethical standards

### Conflict of interest

There is no conflict of interest.

## References

- 1.Broyles D, Kauffman K, Raquet J, Smagowski P (2018) Non-GNSS smartphone pedestrian navigation using barometric elevation and digital map-matching. Sensors 18(7):2232CrossRefGoogle Scholar
- 2.Merry K, Bettinger P (2019) Smartphone GPS accuracy study in an urban environment. PLoS ONE 14(7):e0219890CrossRefGoogle Scholar
- 3.Guzman-Acevedo GM, Vazquez-Becerra GE, Millan-Almaraz JR, Rodriguez-Lozoya HE, Reyes-Salazar A, Gaxiola-Camacho JR, Martinez-Felix CA (2019) GPS, accelerometer, and smartphone fused smart sensor for SHM on real-scale bridges. Adv Civ Eng. https://doi.org/10.1155/2019/6429430 CrossRefGoogle Scholar
- 4.Kosse NM, Caljouw S, Vervoort D, Vuillerme N, Lamoth CJ (2014) Validity and reliability of gait and postural control analysis using the tri-axial accelerometer of the iPod touch. Ann Biomed Eng 43:1–12Google Scholar
- 5.Muro-de-la-Herran A, Garcia-Zapirain B, Mendez-Zorrilla A (2014) Gait analysis methods: an overview of wearable and non-wearable systems, highlighting clinical applications. Sensors 14:3362–3394CrossRefGoogle Scholar
- 6.Milani P, Coccetta CA, Rabini A, Sciarra T, Massazza G, Ferriero G (2014) Mobile smartphone applications for body position measurement in rehabilitation: a focus on goniometric tools. PM&R 6:1038–1043CrossRefGoogle Scholar
- 7.Mourcou Q, Fleury A, Franco C, Klopcic F, Vuillerme N (2015) Performance evaluation of smartphone inertial sensors measurement for range of motion. Sensors 15:23168–23187CrossRefGoogle Scholar
- 8.Verghese J, Holtzer R, Lipton RB, Wang C (2009) Quantitative gait markers and incident fall risk in older adults. Bio Sci Med Sci 64(8):896–901Google Scholar
- 9.Zhao Y (2000) Mobile phone location determination and its impact on intelligent transportation systems. IEEE Trans Intell Transp Syst 1(1):55–64MathSciNetCrossRefGoogle Scholar
- 10.Weiland R, Purser L (2009) Intelligent transportation systems. Transp Res 1:40–53Google Scholar
- 11.Xia H, Qiao Y, Jian J, Chang Y (2014) Using smart phone sensors to detect transportation modes. Sensors 14:20843–20865CrossRefGoogle Scholar
- 12.Kalra N, Bansal D (2014) Analyzing driver behavior using smartphone sensors: a survey. Int J Electron Electr Eng 7(7):697–702Google Scholar
- 13.Thompson C, White J, Dougherty B, Albright A, Schmidt DC (2010) Using smartphones to detect car accidents and provide situational awareness to emergency responders. Mobile Wirel Middlew Oper Syst Appl 48:29–42Google Scholar
- 14.El-Rabbany A (2002) Datums, coordinate systems, and map projections. In: Introduction to GPS: the global positioning system, 1st edn. Artech House Publishers, London, pp 47–68Google Scholar
- 15.Cai G, Chen BM, Lee TH (2011) Coordinate systems and transformations. In: Unmanned rotorcraft systems, 1st edn. Springer, London, pp 23–34Google Scholar
- 16.Cook MV (2013) Systems of axes and notation. In: Flight dynamics principles: a linear systems approach to aircraft stability and control, 3rd edn. Elsevier, Oxford, pp 13–32CrossRefGoogle Scholar
- 17.Serway RA, Jewett JW (1999) Universal gravitation. In: Physics for scientists and engineers with modern physics, 9th edn. Brooks Cole, Boston, pp 388–416Google Scholar
- 18.Champion KSW, Cole AE, Kantor AJ (1985) Standard and reference atmospheres. In: Jursa AS (ed) Handbook of geophysics and the space environment. Air Force Geophysics Laboratory, Bedford, pp 14(1)–14(43)Google Scholar