Page 1 of 1

GPS component issues

Posted: Sun Dec 13, 2015 12:21 am
by kersing
The GPS component seems to have two issues in simulation:
1) When setting a simulation COM port the value in sub component COMPort1 is not set correctly (same seems to apply to Baud). Only after exposing full tree and setting it in the subcomponent simulation shows data in UART console.
2) DATARECEIVED is set in the interrupt code on a device, in simulation it is never set (while Lat/Long have valid data), resulting in IsDataValid always returning 255 (No GPS daa received)

Re: GPS component issues

Posted: Mon Dec 14, 2015 12:20 pm
by Benj
Hi Jac,

Right I have had a good go through the GPS component now. I have fixed the COM port and baud selection so they are correctly passed through to the COMport component now.

The data validity flag is populated the same way the the Lat/Long variables are populated so this should be working. There is a timer running to drive the simulation so we are not relying on the UART receive interrupt. I've fixed it so it at least is no longer returning 255 if data is received and hopefully this should allow the valid flag to work correctly based on the data.
GPS.fcpx
(161.1 KiB) Downloaded 377 times

Re: GPS component issues - accuracy issue

Posted: Thu Sep 29, 2016 5:00 pm
by CeesD
i use the GPS component in Flowcode 6, in a PIC18F14K50. Works fine, but I notice that the Longitude has much lesser accuracy compared to the Latitude. How come.
The NMEA record is:
$GPGGA,152903.935,5241.5168,N,00449.4017,E,1,04,5.1,-8.0,M,46.9,M,,0000*72

So for Google Maps this is equivalent to:
Latitude = 52.69194666666667
Longitude = 4.823361666666667

But from the GPS component I get using my program lines below:
Latitude: 52.6919
Longitude: 4.823361

The only four digits after the dot for the latitude makes the position very coarse, compared to the longitude. We just seem to mis an extra digit !!!

My code is:
Lon = GPS::ReadLongitude()
Lat = GPS::ReadLatitude()
PrintVala = FloatToString$(Lon) %Printvala is defined as a string of 10 characters.
PrintValb = FloatToString$(Lat)

What should I modify to get a finer resolution for the Latitude?

Re: GPS component issues

Posted: Mon Oct 03, 2016 5:40 pm
by Benj
Hello,

We currently read the longitude and latitude from the $GPRMC NMEA record. Can you check this and see if this also has the same precision.

Both calculations should be auto ranging based on the numbers coming in. Maybe the GPRMC message has a lower precision version of Latitude?