react-native-griswold
v0.0.50
Published
Telematics research for recognising bad driving behaviours
Downloads
16
Readme
React Native Griswold
What is this?
react-native-griswold is specifically for the measurment of driving behaviours.
We do this by reading the device sensors (e.g. accelerometer values), and determine if a notable event has occured. If so, we send the event type, and values over the bridge to JS.
Installation
Run yarn add react-native-griswold
in your project folder.
Usage
import {griswold} from 'react-native-griswold';
// setup listener within your component
useEffect(() => {
const subscription = griswold.subscribe(event => {
// Use values
console.log('>>>>event: ', event);
});
return () => {
subscription.unsubscribe();
};
}, []);
Event Types
- HARD_BRAKE
- SHARP_LEFT
- SHARP_RIGHT
(to be continued...)
How are events determined?
The events are sent based on x,y,z values read from the accelerometer. The specific values are based on the thersholds measured and identified in the book "Beyond the Internet of Things".
Recognizing Driving Behaviour Using Smartphones Prokopis Vavouranakis, Spyros Panagiotakis, George Mastorakis, Constandinos X. Mavromoustakis and Jordi Mongay Batalla
Instructions for use in car
The phone must be placed flat, with the screen facing up. The device must be orientated in the same direction of the vehicle, i.e. the phone camera closer to the windscreen.
- This limitation is temporary until we account for the device orientation in our calibration step and apply it to our accelerometer values.