Real time location update in ionic with firebase?

I want to build a bus tracking app using ionic 3. Iam stuck at getting the realtime location of the bus and updating it in the firebase database.

Could anyone please help me out with it?

Did you use these commands
$ ionic cordova plugin add cordova-plugin-geolocation --variable GEOLOCATION_USAGE_DESCRIPTION=“To locate you”
$ npm install --save @ionic-native/geolocation