GPS component issues

A forums to allow bugs and problems with Flowcode v6 to be reported and resolved.

Moderator: Benj

Post Reply
kersing
Valued Contributor
Valued Contributor
Posts: 2045
Joined: Wed Aug 27, 2008 10:31 pm
Location: Netherlands
Has thanked: 553 times
Been thanked: 1081 times
Contact:

GPS component issues

Post 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)
“Integrity is doing the right thing, even when no one is watching.”

― C.S. Lewis

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: GPS component issues

Post 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 371 times

CeesD
Posts: 24
Joined: Tue Feb 24, 2015 12:42 am
Been thanked: 2 times
Contact:

Re: GPS component issues - accuracy issue

Post 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?

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: GPS component issues

Post 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?

Post Reply