AGPS file update

11.1Functional Overview

AGPS is the Assisted Global Positioning System, which refers to the operation mode of GPS. It can use the information of the mobile phone base station and cooperate with the traditional GPS satellite to make the positioning speed faster. It should be noted that the AGPS file is updated: 15 seconds after the bracelet is connected to the App, the query of the GPS status does not run to update the AGPS file, otherwise the update will fail.

11.2 Corresponding function table

//gps
funcTable19Model.gps

11.3 Get GPS status

=>Get GPS status

11.4 AGPS update method

Objc:

initTransferManager().transferType = IDO_DATA_FILE_TRAN_AGPS_TYPE;
initTransferManager().compressionType = IDO_DATA_TRAN_COMPRESSION_NO_USE_TYPE;
initTransferManager().isSetConnectParam = YES;
//online fileName: online.ubx
//offline fileName: agps.ubx
initTransferManager().fileName = fileName;
initTransferManager().filePath = filePath;
initTransferManager().addDetection(^(int errorCode) {
    if(errorCode == 0) {
      //Detection succeeded before update
    }else {
      //Detect errors before updating 
    }
}).addProgress(^(int progress) {
    //Update file progress(0-100)
}).addTransfer(^(int errorCode) {
    if(errorCode == 0) {
      //File transfer succeeded
    }else {
      //file transfer failed
    }
}).addWrite(^(int errorCode) {
    if(errorCode == 0) {
      //File written successfully
    }else {
      //file write failed
    }
});
[IDOTransferFileManager startTransfer];

Swift:

initTransferManager().transferType = IDO_DATA_FILE_TRAN_TYPE.AGPS_TYPE;
initTransferManager().compressionType = IDO_DATA_TRAN_COMPRESSION_TYPE.NO_USE_TYPE;
initTransferManager().isSetConnectParam = true;
//online fileName: online.ubx
//offline fileName: agps.ubx
initTransferManager().fileName = fileName;
initTransferManager().filePath = filePath;
initTransferManager().addDetection!{(errorCode)in
    if errorCode == 0{
      //Detection succeeded before update
    }else {
      //Detect errors before updating 
    }
}.addProgress!{(progress)in
    //Update file progress(0-100)
}.addTransfer!{(errorCode)in
    if errorCode == 0 {
      //File transfer succeeded
    }else {
      //file transfer failed
    }
}.addWrite!{(errorCode)in
    if errorCode == 0 {
      //File written successfully
    }else {
      //file write failed
    }
};
IDOTransferFileManager.startTransfer();

11.5 DemoAGPS Update function entry

Copyright © 2015-2020 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2023-12-18 10:04:13

results matching ""

    No results matching ""