Accelerometer (773979)

Hello to everyone I have modelled my entire room in 3D and I want to map it on my real room.
So I have a working gyroscope script and I want to be able to move around using the data of the accelerometer.
I have in mind to use the phone as a VR headset I know we can accurately measure the distance with accelerometer mems but how we can achieve that with Unity?

Without any other data accelerometer data is drifting to much to be useful as distance measure data source.
If you are into measure your room you can take a look at arfoundation if your phone does support arkit or arcore.

I have the iPhone XR and SonyXperia both of them are capable and supported by the sdks the thing is that I want to be able to take the distance of my movements and pass them inside Unity like a VR but with the ability to move around.