Page 1 of 1
No heading information in GPS Component
Posted: Thu Jul 26, 2012 9:37 am
by Odox00
Hi
I'm using the GPS component in a project and I use the Longitude and Latitude data but I also need the heading data.
In the Properties of the component I can select those data.
Is_Data_Valid
Read_Longitude
Read_Latitude
Read_Altitude
Read_GroundSpeed
Read_NumberOfSatellites
Read_UTC_Time
Read_UTC_Date
In the raw NMEA data coming from the GPS
(ex. $GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A) there is the "084.4" witch is the "Track angle in degrees True" or "Heading" data I would like to have as "Read_HeadingTrue".
Is it possible to modify the ARM_GPS.c to include this?
Unfortunately I am not good enough to do it myself if it is possible.
Jeppe
Re: No heading information in GPS Component
Posted: Thu Jul 26, 2012 11:47 am
by Odox00
Need to add that I use FL for ARM v4.3.
I saw in the free version of ARM v5 that a "Course Over Ground" has been added.
(My boss don't allow me to buy v5

)
Jeppe
Re: No heading information in GPS Component
Posted: Thu Jul 26, 2012 1:40 pm
by dazz
Hi
I've been looking online for conversions to bearings degs, theres a lot of stuff out there but maths isnt my strong point, as a work around i would write a macro that converts the latitude and longditude, to degrees and then print that to lcd, not as simple as the v5 macro, but an alternative, and if its a work project you could make a case with your boss that the hours you spend researching, writing and testing it ,will cost your company more than the cost of the upgrade

. worth a try
I'm very busy just now servicing my aquariums, but will have another look later this evening and see if i can work out a macro(if you cant work it out)
Regards
Dazz
Re: No heading information in GPS Component
Posted: Thu Jul 26, 2012 2:37 pm
by kersing
Odox00 wrote:
In the raw NMEA data coming from the GPS
(ex. $GPRMC,123519,A,4807.038,N,01131.000,E,022.4,084.4,230394,003.1,W*6A) there is the "084.4" witch is the "Track angle in degrees True" or "Heading" data I would like to have as "Read_HeadingTrue".
Is it possible to modify the ARM_GPS.c to include this?
Both FC version 4.x for PIC and dsPIC make that value available with the Read_Course_Over_Ground macro. If it is not present in the ARM version of the component that is probably an oversight. Adding it should not be hard starting with the ARM version of the component (which I don't have)
Regards,
Jac
Re: No heading information in GPS Component
Posted: Thu Jul 26, 2012 6:07 pm
by Odox00
Thanks for your support.
I will have a look at the file in FL for dsPIC to see if I can modify it for ARM.
I know there is a workaround to calculate the CourceOverGround by using last and previous location data in a trigonometry function. But since the GPS data already has this iformation it would be convenient to use that.
This is a private project but my company owns the software. So I need find a work project to upgrade to v5...
Jeppe
Re: No heading information in GPS Component
Posted: Thu Jul 26, 2012 8:20 pm
by Spanish_dude
Hi,
Take a look a this article I made a while back (v3) :
http://www.matrixmultimedia.com/mmforum ... =26&t=7879
GPS_ReturnData function should be able to retrieve that track angle.
Cheers,
Nicolas
Re: No heading information in GPS Component
Posted: Sun Jul 29, 2012 9:56 pm
by Odox00
Think I solved it. I made some changes in the component file ARM_GPS.c. I more or less copied the lines for reading "GroundSpeed" and changed some values.

Need to test it more.
Jeppe