SparkFun Forums 

Where electronics enthusiasts find answers.

Tips and questions relating to the GPS modules from SFE
By TheStarfox
#156971
I'm new to working with electronics, and programming. I'm getting stuck, as I cant get the default settings changed over the uart.

I have the Sparkfun Venus GPS with SMA Connector GPS-11058, connected to an IOIO micro-controller board through the UART interface. The Antenna GPS Embedded SMA GPS-00177 from Sparkfun is hooked up. I have the code working to successfully get the NEMA messages, and parse them out to the screen. How ever Id like to change some of the default settings on the GPS. Ill show the relevant portions of code below:
Code: Select all
// GPS UART COMMUNICATION

private Uart uart;
private InputStream gps_in;
private OutputStream gps_out;
// Set Normal Power Mode
byte[] gps_setup1 = new byte[] {(byte) 0xA0, (byte) 0xA1, 0x00, 0x03, 0x0C, 0x00, 0x01, 0x0D, 0x0D, 0x0A};
// Change Rate to 8Hz
byte[] gps_setup2 = new byte[] {(byte) 0xA0, (byte) 0xA1, 0x00, 0x03, 0x0E, 0x08, 0x01, 0x07, 0x0D, 0x0A};
// Enable WAAS
byte[] gps_setup3 = new byte[] {(byte) 0xA0, (byte) 0xA1, 0x00, 0x03, 0x37, 0x01, 0x01, 0x37, 0x0D, 0x0A};
// Set 38400 Baud Rate
byte[] gps_setup4 = new byte[] {(byte) 0xA0, (byte) 0xA1, 0x00, 0x04, 0x05, 0x00, 0x03, 0x01, 0x07, 0x0D, 0x0A};

// ESTABLISH UART CONNECTION called in IOIO Setup
		uart = ioio_.openUart(GPS_UART_IN, GPS_UART_OUT, 9600, Uart.Parity.NONE, Uart.StopBits.ONE);
		gps_in = uart.getInputStream();
		gps_out = uart.getOutputStream();

// Method called in IOIO setup
gps_out.write(gps_setup1, 0, 10);			
gps_out.write(gps_setup3, 0, 10);			
gps_out.write(gps_setup2, 0, 10);			
gps_out.write(gps_setup4, 0, 11);

My motivation for changing the default settings is that The GPS doesnt seem to be working very well. It took 10 min in open sky to get a location that was 100mi off :( 20 min later and it didnt get any better. I was thinking that making these changes could improve this poor performance. What else can I do to get to the 2.5 meter accuracy it says it can manage?