Results 1 to 9 of 9

Thread: D3 SDK GPS buffer how to use ?

  1. #1
    FreeDrive Creator CdRsKuLL's Avatar
    Join Date
    Feb 2004
    Location
    Manchester
    Posts
    3,509

    D3 SDK GPS buffer how to use ?

    Lo peeps, been playing on and off for a week or so on trying to get this buffer to work. It doesnt help when I dont have a gps unit attached to my main PC, so I keep having to nip out and try it.

    ok.. after doing reading, it seems I need to do the following..

    'Create a Variable
    Dim dbuffer As DrumBuffer

    now, when the app opens I have would of thought I need to tell D3 to allocate a targetgps source using g_Dest.SetGPSPortTarget.. this is where i'm falling over, tried different syntax but nothing seems to work.

    I presume once I have told D3 to use this buffer, then I can use the event 'ON_GETTINGDATAFROMCOMPORT' to call a sub with the details in below

    Dim res As Long
    Dim ret As String
    Dim gps() As String
    res = dbuffer.GetSize
    ret = String(res, 0)
    lReturn = dbuffer.ReadData(ret)
    lbldate.Caption = Left$(ret, lReturn)
    gps() = Split(ret, ",")
    If gps(0) = "$GPVTG" Then
    lblspeed.Caption = gps(7)
    End If

    But it doesnt seem to call the event.

    Any help please :-)

    cheers

    CdR

  2. #2
    Variable Bitrate
    Join Date
    Jan 2005
    Location
    UK
    Posts
    265
    I found that when using the drumbuffer object, it always starts with a size of zero. You have to call setsize and give it some value large enough (no. of bytes) to hold the information you're expecting it to receive.

    Then call the function to set the gps port target.

    I have a suspicion that you'll only receive callbacks if there is enough room in the drumbuffer to hold any data. Being zero size at creation means you never get called back.

    As I remember it you'll receive a stream of data, whereby the data isn't going to be nicely split into lines for you. You'll have to do that yourself by picking up the CR/LF pairs in the data or looking for $ as the start of line.

    I've got some Delphi code that does this, but no VB code I'm afraid.

    Ric.

  3. #3
    Raw Wave Laidback's Avatar
    Join Date
    Oct 2003
    Location
    Madrid
    Posts
    1,984
    Did you look in the example that came with the SDK?

  4. #4
    FreeDrive Creator CdRsKuLL's Avatar
    Join Date
    Feb 2004
    Location
    Manchester
    Posts
    3,509
    didnt know there was an example.. is the example in vb or c++ ?

    Steve

  5. #5
    cheap custom title JC-S60's Avatar
    Join Date
    Mar 2004
    Location
    Ghent - Belgium
    Posts
    1,863
    Does this make it possible to implement dead-reackoning gps without all the com-port trickery???

  6. #6
    Map Monkey Creator Ninja Monkey's Avatar
    Join Date
    Aug 2003
    Location
    Warrington, UK
    Posts
    1,012
    Unless it's been updated in the newest DLL, that buffer is a peice of ****. It seems to work fine in the IDE but as soon as you run a compiled version it crashes.

    Even the VB example once compiled will crash!

    It really is the worst SDK ever, you'd think they would have fixed the problem when opening more than one copy aswell, that was there in Destinator 2!
    Destinator 3 For PC! - http://www.map-monkey.co.uk/

  7. #7
    FreeDrive Creator CdRsKuLL's Avatar
    Join Date
    Feb 2004
    Location
    Manchester
    Posts
    3,509
    yeah, I got it working from what I thought, compiled it and it crashed on start up. I'm going to have a look in to it abit more.. I agree CRAP.. lol

    CdR

  8. #8
    FreeDrive Creator CdRsKuLL's Avatar
    Join Date
    Feb 2004
    Location
    Manchester
    Posts
    3,509
    well its got me stumped.. thought I had it all working, compiled it.. then error. getting proper @@~@@~ with it at the mo

  9. #9
    Variable Bitrate 12Vsystems's Avatar
    Join Date
    Mar 2005
    Location
    Orange County, CA
    Posts
    338
    I am running into exactly the same problem at the moment. Did you ever able to resolve it.

    I've been pulling my hair out, the example .exe in the SDK works and when I compile the code in VB no matter what Service pack it crashes with errors.

    I found nothing on the web and just found this post, I thought I was the only one having this problem.

Similar Threads

  1. Getting Started with GPS
    By grepzen in forum The FAQ Emporium
    Replies: 12
    Last Post: 09-26-2006, 05:54 AM
  2. GPS Emulation to test D3 embedded
    By UHF in forum Map Monkey
    Replies: 1
    Last Post: 01-16-2005, 12:16 PM
  3. com problem for gps in D3
    By FireDJ in forum GPS
    Replies: 5
    Last Post: 12-27-2004, 02:49 PM
  4. D3 with USB GPS after HIBERNATION
    By BOND007BE in forum Map Monkey
    Replies: 7
    Last Post: 11-26-2004, 01:54 PM
  5. Destinator SDK + Destinator GPS Module
    By miguelito in forum GPS
    Replies: 3
    Last Post: 07-21-2004, 01:48 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
  •