navigator.geolocation.watchPosition((pos)=>{position=pos;},(error)=>handleError(`Error while setting GPS`,error),{timeout:1000,enableHighAccuracy:true});
//start watching acceleration
navigator.accelerometer.watchAcceleration((acc)=>{acceleration=acc;},(error)=>handleError(`Error while setting accelerometer`,error),{frequency:100});
//start watching gyroscope
navigator.gyroscope.watch((gyro)=>{gyroscope=gyro;},(error)=>handleError(`Error while setting gyroscope`,error),{frequency:100});
//start watching magneto
cordova.plugins.magnetometer.watchReadings((magn)=>{magnetometer=magn;},(error)=>handleError(`Error while setting magnetometer`,error),{frequency:100});