No heading information in GPS Component

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 4.
To post in this forum you must have a registered copy of Flowcode 4 or higher. To sign up for this forum topic please use the "Online Resources" link in the Flowcode Help Menu.

Moderator: Benj

Post Reply
Odox00
Flowcode v5 User
Posts: 24
Joined: Thu Aug 25, 2011 11:15 am
Contact:

No heading information in GPS Component

Post 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
Jeppe
Don't say oups!? Say Interesting!

Odox00
Flowcode v5 User
Posts: 24
Joined: Thu Aug 25, 2011 11:15 am
Contact:

Re: No heading information in GPS Component

Post 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
Jeppe
Don't say oups!? Say Interesting!

dazz
Posts: 1314
Joined: Sun Jan 15, 2012 3:15 pm
Has thanked: 474 times
Been thanked: 458 times
Contact:

Re: No heading information in GPS Component

Post 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 ;) :lol: . 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
To sign up to the V5 forum follow this link http://www.matrixmultimedia.com/forum_upgrades.php

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:

Re: No heading information in GPS Component

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

― C.S. Lewis

Odox00
Flowcode v5 User
Posts: 24
Joined: Thu Aug 25, 2011 11:15 am
Contact:

Re: No heading information in GPS Component

Post 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... :idea:

Jeppe
Jeppe
Don't say oups!? Say Interesting!

Spanish_dude
Posts: 594
Joined: Thu Sep 17, 2009 7:52 am
Location: Belgium
Has thanked: 63 times
Been thanked: 102 times
Contact:

Re: No heading information in GPS Component

Post 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

Odox00
Flowcode v5 User
Posts: 24
Joined: Thu Aug 25, 2011 11:15 am
Contact:

Re: No heading information in GPS Component

Post 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. :D Need to test it more.

Jeppe
Jeppe
Don't say oups!? Say Interesting!

Post Reply