GPS Almanac / Ephemeris Update


Last Updated:

  1. spyke555

    spyke555 Active Member This Topic's Starter

    Joined:
    Dec 22, 2009
    Messages:
    33
    Likes Received:
    2
    Guys,

    I'm using a HTC Magic on Rogers current ROM (Android 1.5) and get frequent GPS lock-ups. Looks like the GPS glitches, thinks it's in the atlantic and never comes back to a working state. I've tried turning the unit off, pulling the battery and the problem persists.

    The only way I've found to restore GPS operation is to factory reset the phone which is a little drastic since all that's needed is a GPS reset.

    So right now I'm thinking some means to at least wipe the Almanac and Ephemeric data out of the GPS chip should force the chip to start fresh. That would defenitely be a great start. Some means of pre-loading this data from USB or something similar would be even cooler, but that's purely optional for me...

    Looking at the high level Android API's there's nothing there either that covers this (you'd think a GPS Reset command would be a useful thing...) so looks like we'd need to go under the hood...

    So we may need to talk direct to the GPS chip, and in my case this is a Qualcomm 7200A with a GPSone module. You'd think Qualcomm would be forthcoming with the programming info for this device but I've been looking for it all AM with no success.

    There may be something in the GPS driver also but not sure if that open or closed source.

    So defenitely not for the faint of heart, but if someone out there's got the knowledge I'd be much appreciated. Such an app may in fact alreadt exist, so open to any suggestions here...
     

    Advertisement
  2. spyke555

    spyke555 Active Member This Topic's Starter

    Joined:
    Dec 22, 2009
    Messages:
    33
    Likes Received:
    2
    Well looked into the android source and found the following:

    platform/hardware/qcom/gps/loc_api/libloc_api/loc_eng.cpp

    Contains the following functions which are of interest:

    Code (Text):
    1.  
    2. static int  loc_eng_inject_time(GpsUtcTime time, int64_t timeReference, int uncertainty);
    3.  
    4. static int  loc_eng_inject_location(double latitude, double longitude, float accuracy);
    5.  
    6. static void loc_eng_delete_aiding_data (GpsAidingData f);
    7.  
    8.  
    By reading the source sounds like I'd need to turn off the GPS, call loc_eng_delete_aiding_data and then resart the GPS.

    The loc_eng_inject_* functions might also be interesting from a perspective of forcing the gps engine to start with the network derrived location and time rather than starting from scratch.

    So does anyone have any insight on how to call these functions from an application? Anyone interested in giving this a go?
     
  3. spyke555

    spyke555 Active Member This Topic's Starter

    Joined:
    Dec 22, 2009
    Messages:
    33
    Likes Received:
    2
    Okay,

    So the loc_eng_inject_location is just a stub in the qualcomm driver, so there's no need to look into that quite yet. So just deleting the aiding data would be as close to a reset as we can likely get...
     
  4. spyke555

    spyke555 Active Member This Topic's Starter

    Joined:
    Dec 22, 2009
    Messages:
    33
    Likes Received:
    2
    Well looks like I got my phone working again...

    Charged it up, left it outside to freeze for about 30 minutes and it was okay again. So not too much priority on this but would still be great to be able to pre-load this data manually vs having to wait for 30 minutes for GPS to start! ;-)

    That said I'm still a little perplexed as to why a factory reset returns operation immediately. If someone can create a quick app to wipe the aiding data as mentionned above it would defenitely be useful...
     
  5. erixfan

    erixfan New Member

    Joined:
    Jun 29, 2010
    Messages:
    1
    Likes Received:
    0
    I just found an app in the market - GPSTest (by Mike Lockwood). It can clear aiding data and inject time/xtra-data - press menu button after you launch the app and you will see them. I'm testing these features and hope it help you.

     

Share This Page

Loading...