Results 1 to 10 of 10

Thread: Unable to log GPS data

  1. #1
    Newbie
    Join Date
    Feb 2010
    Posts
    26

    Unable to log GPS data

    Hi,

    Short version:
    I'm having problems logging gps data using obdgpslogger. The obd table in the database is being populated but the gps table isn't.

    Long version:
    some specs:
    OS: Gentoo x86
    gpsd: 2.32
    gps device: BU 353
    obdgpslogger: svn rev. 381
    obd device: scantool obdlink

    I tried
    Code:
    obdgpslogger -s /dev/obd -b 38400 -a 10
    . It prints out that obd is working and so is gpsd.

    I ran
    Code:
    gpsd /dev/gps
    and it ran properly, trying
    Code:
    gpspipe -w
    gives me my coordinates and a few other info. I didn't really check what it was giving out, I just saw what looked like my coordinates. Xgps also indicated that gpsd is working properly.

    The obd portion is completely fine, everything is being logged and inserted into the database without problems. I'm able to sqlite3 into the db and check the contents of the obd table, theres quite a number of rows in there, but in the gps table, not a single row has been inserted.

    I tried gpsd 2.90 but this gives me several other problems, one of which is not finding libgps.so.15 and another is something about gps_query(). I'll have to try these things out again if you want to see the actual errors thrown.

  2. #2
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    929
    Could you look at the output of cgps and see what it claims the fix is? OBDGPSLogger doesn't log GPS until it has at least a 2D fix; just seeing some satellites in XGPS doesn't necessarily mean that it actually has a fix.

    Could you paste the actual output of obdgpslogger? obdgpslogger relies on gpsd, so you need to be sure that gpsd is up and running [with a gps receiver attached] *before* obdgpslogger starts, for it to work.

    Could you also post a short logfile showing the problem? The logfile is actually a sqlite database, so I'd be opening it to see if there are at least rows in the gps table; how are you looking to see if the gps is being created? It's concievable that there's a bug that causes obd2kml or obd2csv to not show gps co-ordinates, even though they're in the log

    Thanks,
    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  3. #3
    Newbie
    Join Date
    Feb 2010
    Posts
    26
    I haven't had time yet to get back into the car to test this out, but I remember having a 3d gps fix on it when I checked out xgps.

    gpsd was running and obdgpslogger detected it and indicated it will also log the gps data.

    I checked the db by running select * from gps; and that returned 0 rows.

    then tried .schema gps and got this

    CREATE TABLE gps (lat REAL, lon REAL, alt REAL, time REAL, trip INTEGER);
    CREATE INDEX IDX_GPSTIME ON gps (time);

    I'll try to get back in the car to get the actual output of all involved programs by today or tomorrow.

    ps. attached the log

    Thanks!
    Attached Files Attached Files

  4. #4
    Newbie
    Join Date
    Feb 2010
    Posts
    26
    Ok I just got to get another run, here's what I got


    ~/obd/02122010 $ obdgpslogger -b 38400 -s /dev/obd -a 10
    Opening serial port /dev/obd, this can take a while
    Successfully connected to serial port. Will log obd data
    Successfully connected to gpsd. Will log gps data
    Creating a new trip


    It is a new directory and is completely empty before I ran the command.
    I also ran cgps in another window before running obdgpslogger, it indicated a 3d fix. I then closed cgps, ran obdgpslogger and drove for around 30 secs to 1 minute then stopped. I once again started cpgs to make sure the fix is still active, while keeping obdgpslogger running.

    When I checked the tables afterwards, same thing: a populated obd table and completely empty gps table.

    Is there any checking on the gps data to filter out probable garbage data?
    Attached Files Attached Files

  5. #5
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    929
    OBDGPSLogger usually announces the first time it sees a 3d fix:
    Code:
    if(0 == have_gps_lock) {
      fprintf(stderr,"GPS acquisition complete\n");
      have_gps_lock = 1;
    }
    That it's not seeing that means there's some kind of disconnect - perhaps there's a problem with versions of libraries, where obdgpslogger is linked against one library, but you're using a different version of gpsd? You said you're using gentoo and have built it multiple times - can you verify which libgps it's linked against? [use ldd]

    What's the version of gpsd in your path? Just run gpsd --version and see what it says, and compare that to the libgps that obdgpslogger is linked against?

    I need to build gpsd2.90 myself, I haven't actually tried my code yet; I just followed the documentation on the transition to the new API. It's possible there's an artifact in there somewhere.

    Thanks,
    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  6. #6
    Newbie
    Join Date
    Feb 2010
    Posts
    26
    Code:
    # gpsd -V
    gpsd 2.32
    Code:
    ldd obdgpslogger 
    	linux-gate.so.1 =>  (0xb80b9000)
    	libpthread.so.0 => /lib/libpthread.so.0 (0xb8078000)
    	libdl.so.2 => /lib/libdl.so.2 (0xb8074000)
    	libgps.so.15 => /usr/lib/libgps.so.15 (0xb8055000)
    	libdbus-1.so.3 => /usr/lib/libdbus-1.so.3 (0xb801d000)
    	libc.so.6 => /lib/libc.so.6 (0xb7ed5000)
    	/lib/ld-linux.so.2 (0xb80ba000)
    	libnsl.so.1 => /lib/libnsl.so.1 (0xb7ebe000)
    	libstdc++.so.6 => /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libstdc++.so.6 (0xb7dd1000)
    	libm.so.6 => /lib/libm.so.6 (0xb7dab000)
    	libgcc_s.so.1 => /usr/lib/gcc/i686-pc-linux-gnu/4.3.4/libgcc_s.so.1 (0xb7d9d000)
    I never got around to learning how the numbers for the libraries are for, but when I built gpsd 2.90, there was no libgps.so.15, there was only libgps.so.19 . I'll try removing gpsd and reinstalling later, then recompile obdgpslogger.

    I think I missed something you're asking for.. is there anything else?

  7. #7
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    929
    No, that's good, but it did occur to me; could you please run ldd against xgps and/or cgps and see what that responds?

    Thanks,
    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

  8. #8
    Newbie
    Join Date
    Feb 2010
    Posts
    26
    Code:
    ldd cgps | grep gps
    	libgps.so.15 => /usr/lib/libgps.so.15 (0xb7e07000)
    Code:
    ldd xgps | grep gps
    	libgps.so.15 => /usr/lib/libgps.so.15 (0xb79cf000)
    I'll try to get more debug info on this during the weekend, as well as check out the code for obdgpslogger. What version of gpsd are you using, how about OS?

    Thanks

  9. #9
    Newbie
    Join Date
    Feb 2010
    Posts
    26
    FIXED

    I unmerged(uninstalled) gpsd completely then emerged it again. I guess there were some garbage files left when I last tried that.

    Running gpsd 2.32 now and obdgpslogger revision 386.

  10. #10
    SuperMod - OBDII GPS Logger forum
    Auto Apps:loading...

    Join Date
    Mar 2009
    Location
    Los Angeles
    Posts
    929
    Yay! Glad to know it's working!

    Gary (-;
    OBDGPSLogger, for logging OBDII and/or GPS data
    OBDSim, an OBDII/ELM327 software simulator
    mp3car forums: obdgpslogger, obdsim

Similar Threads

  1. Replies: 65
    Last Post: 10-13-2009, 06:51 PM
  2. Centrafuse, TPMS 2.1.0.9 and Vista
    By WuNgUn in forum TPMS Technical Support
    Replies: 14
    Last Post: 08-26-2009, 02:57 PM
  3. Onstar GPS data
    By slipstream in forum GPS
    Replies: 1
    Last Post: 03-06-2009, 04:35 AM
  4. Can you guys please help me??? OBD Renault Clio help needed!
    By madtoonbull in forum Engine Management, OBD-II, Engine Diagnostics, etc.
    Replies: 7
    Last Post: 02-19-2009, 10:36 AM
  5. Replies: 15
    Last Post: 10-21-2002, 03:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •