SmartPDR(Smartphone-Based Pedestrian Dead Reckoning for Indoor Localization) for React Native.
SmartPDR for React Native is a React-based pedestrian dead reckoning library aiming at applying cross platform. It provides device inclination angle calculation Hooks based on the Euler angles introduced by Leonhard Euler as well as practical indoor movement tracking Hooks to estimate user location.
$ git clone https://github.com/Firecommit/react-native-smartpdr.git
$ cd react-native-smartpdr
$ npm install
Run the example app with Expo to see in action.
$ npm start
The source code for the examples are under the /src
directory.
import {
useAttitude,
useAccStep,
useHeading,
useStepLength,
} from 'src/utils/customHooks';
const { pitch, roll, yaw } = useAttitude(
accelerometerData,
magnetometerData,
gyroscopeData
);
const [accStep, accEvent] = useAccStep(
accelerometerData,
magnetometerData,
gyroscopeData
);
const heading = useHeading(accelerometerData, magnetometerData, gyroscopeData);
const [stepLength, headingStep] = useStepLength(
accelerometerData,
magnetometerData,
gyroscopeData
);
MIT License (see LICENSE
file).
The MIT License (MIT)
Copyright (c) 2021 Firecommit
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Kang, Wonho, and Youngnam Han. "SmartPDR: Smartphone-based pedestrian dead reckoning for indoor localization." IEEE Sensors journal 15.5 (2014): 2906-2916. URL, BibTex
Nelson, Robert C. Flight stability and automatic control. Vol. 2. New York: WCB/McGraw Hill, 1998. URL, BibTeX
Ladetto, Quentin, and Bertrand Merminod. "An alternative approach to vision techniques-pedestrian navigation system based on digital magnetic compass and gyroscope integration." 6th World Multiconference on Systemics, Cybernetics and Information, Orlando, USA. No. CONF. 2002. URL, BibTeX
Measuring Motion | Masterclass, In this Masterclass, we introduce a number of sensors commonly used in robotics to measure motion: accelerometers, magnetometers and gyroscopes. URL