Calibrate gps before location request

Hello everyone! that’s my question, how can i calibrate the device gps before location request?
I’m imagining something like on components.ts force a request at the beginning :thinking:
someone tryed before?
the plugin that im using is this cordova-plugin-gpslocation

any help very apreciated, greetings

global packages:

@ionic/cli-utils : 1.5.0
Cordova CLI      : 8.1.2 (cordova-lib@8.1.1)
Ionic CLI        : 3.5.0

local packages:

@ionic/app-scripts : 1.3.12
Cordova Platforms  : android 7.1.4
Ionic Framework    : ionic-angular 3.5.0


Node       : v6.9.0
OS         : Windows 10
Xcode      : not installed
ios-deploy : not installed
ios-sim    : not installed
npm        : 3.10.8

calibrate gps? Please apoligsie my question. Ca you explain what this is?

Best regards, anna-liebt

1 Like

when I retrieve the location on the first try no location data is retrieved, on a second try even. But after that “warm” the data is retrieved and more or less accurate, I dont know why…

At the begining the problem with no data was the android permissions (problem solved) but now i dont know whats happening


maybe a timming problem in your code. Please show related code.

Best regards, anna-liebt

    let loader = this.loading.create({
      content: 'Cargando...',
      duration: 10000

    loader.present().then(() => {
      this.service.obtenerLocacion().then( obtenido => {
          let lat = obtenido['coords']['latitude'];
          let lng = obtenido['coords']['longitude'];
          let tiempo_gps = obtenido['timestamp'];

          let mimodal = this.modalCtrl.create( 'ModalPage', {lat: lat, lng: lng, bot_id:bot_id, tiempo: tiempo_gps} );
      ).catch((err) => {

    return new Promise(
      function (resolve, reject) {
        GPSLocation.getCurrentPosition(function (data) {

        function (error) {
          alert(JSON.stringify(error)); //HERE! the message error throwed at first try
          enableHighAccuracy: true,
          timeout: 10000,
          maximumAge: 3000

PD: the error message is throwed before the 10 seconds loader ends, so I think that the loader is not the problem, right?