Shop OBEX P1 Docs P2 Docs Learn Events
Help using my gps with javelin — Parallax Forums

Help using my gps with javelin

claym53claym53 Posts: 36
edited 2006-12-14 18:14 in General Discussion
I bought a javelin chip (http://www.parallax.com/detail.asp?product_id=JS1-IC), a mini-ABB board to put it on (http://www.lynxmotion.com/Category.aspx?CategoryID=66) and a gps module from parallax (http://www.parallax.com/detail.asp?product_id=28146).

I'm trying to read in the gps coordinates so I can work with them in my java program. From what I've read of the gps documentation and the javelin manual, I think I need to use the Uart VP to send the·hex codes to the gps module and then recieve what·comes back.

So if someone could get me started with some·code, I would be very gratefull.

Please help A.S.A.P!

Comments

  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-12-08 08:50
    This should give you a start.

    regards peter

    Post Edited (Peter Verkaik) : 12/8/2006 9:16:41 AM GMT
  • claym53claym53 Posts: 36
    edited 2006-12-08 17:57
    I dont have the GPS package (package stamp.peripheral.gps) to run it and I don't know where to get it... I even looked in the yahoo groups. So if someone could post it for me, that would be great [noparse]:)[/noparse]
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-12-08 18:49
    Just create a folder ...../lib/stamp/peripheral/gps/
    and put the attachement from above post in it.

    In your application prgram put

    import stamp.peripheral.gps.*;
    import stamp.core.*;

    static Uart sio = new Uart(Uart.dirReceive,CPU.pin0,Uart.dontInvert,Uart.speed4800,Uart.stop1);
    static GPS_Parallax mygps = new GPS_Parallax(sio,0);

    then you can use mygps.getValid() and other public methods from class GPS_Parallax.

    regards peter
  • claym53claym53 Posts: 36
    edited 2006-12-08 19:21
    I'm getting this error: No match was found for constructor "GPS_Parallax(stamp.core.Uart,int)"
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-12-08 19:39
    The attachement is an example application
    that compiles ok.
    Put it in the projects folder.

    regards peter
  • claym53claym53 Posts: 36
    edited 2006-12-11 16:08
    I seem to be getting the same error: No match was found for constructor "GPS_Parallax(stamp.core.Uart,int)"...

    any ideas?
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-12-11 16:19
    If you installed the Javelin IDE into its default folder,
    then you must have a folder
    c:\Program Files\Parallax Inc\Javelin Stamp IDE\lib\stamp\peripheral\gps\
    in which you place GPS_Parallax.java
    and a folder
    c:\Program Files\Parallax Inc\Javelin Stamp IDE\Projects\
    in which you place gps_test.java

    Use capital and small print letters EXACTLY as above.

    The error you get suggests there is no Uart.java class
    in folder ...\lib\stamp\core\
    If it is not there, I suggest you reinstall the Javelin IDE program.

    regards peter
  • claym53claym53 Posts: 36
    edited 2006-12-14 17:55
    ok, it seems that the mygps.getValid works, but I can use getLat or getLong because they are void and don't return anything.... So how do I get the lat and long?
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2006-12-14 18:14
    In the GPS_Parallax class I have defined

    · //public results for fast access (read only)
    · public int hours,minutes,seconds;
    · public int day,month,year;
    · public int latDegrees,latMinutes,latFracmin,latDirection;
    · public int lngDegrees,lngMinutes,lngFracmin,lngDirection;

    You can access these values using mygps.hours etc.
    I could have defined methods that return those values
    but that would only take additional·codespace.
    Just don't assign values·to these variables.

    regards peter
Sign In or Register to comment.