set waypoints(Lat-Lon)using Gps and Serial

wm.chatman

Well-Known Member
Hi forum,

Working with Lat and Lon, I have been trying to set Waypoints. Seems like nothing wants to work correct.
Can somebody :sign0085: me with this?
I would like to set waypoints(lat-Lon)using Gps and Serial. Then have the Compass Arrow show the way back to the waypoint I select. If at all possible please with Example Code.If anyone can help me here, I'd be very very thankful.
I sincerely appreciate the time and effort of everyone who responded to my question.

best Regards to all,
WmC

PC: Laptop CoreDUo, Windows XP SP2 E
PPC: MDA Pro/WM5
OS: 5.1.195
Prozessor: PXA-520 Mhz
Display: 480x640 TFT
Bayern/Germany

wm.chatman

Well-Known Member
Hi folks,
Still working with Lat and Lon and waypoints using Compass for Direction to Waypoint but i need assistance on this!

I'd be very thankful if somebody could :sign0085:me.

best Regards,
WmC

derez

Expert
the accurate way of calculating the bearing and distance between two points (your location and the waypoint) is this (found here http://www.ac6v.com/greatcircle.htm):

From the 1982 ARRL antenna book.

1. cos(D) = (sin(A) * sin(B)) + (cos(A) * cos(B) * cos(L))

2. cos(C) = (sin(B) - (sin(A) * cos(D))) / (cos(A) * sin(D))

WHERE:

A = YOUR latitude in degrees.
B = latitude of the other location in degrees.
L = YOUR longitude minus that of the other location. (Algebraic difference.)
D = Distance along path in degrees of arc.
C = True bearing from north if the value for sin(L) is positive. If
sin(L) is negative, true bearing is 360 - C.

To convert degrees of arc to statute miles, multiply by 69.041.
To convert degrees of arc to kilometers, multiply by 111.111.

If you want simpler calculation, use arctan for the bearing and pythagoras for the distance.

don't forget to change degrees to radians for b4ppc trig operations.

wm.chatman

Well-Known Member
Hi Mr.Derez

This is a hardcore situation. I am working on that. Upuntil now nothing but bad Luck. The Link does not seem to work for me, but we have a few sites that I am checking on this matter.

take care and best regards,
William

derez

Expert
I put the algorithm above in code

Attachments

• 2.2 KB Views: 70

wm.chatman

Well-Known Member
Hi Mr. Derez and Klaus

:sign0085:How do I integrate AZ and Distance to use with the Compass bmp enclosed, so it will show me the way back to the waypoint that is selected? GPS.dll and Serial.dll are on board. It is extremely hard for me, to code this. A save waypoint and also goto waypoint is needed, this much I know.
I added Sub Rotate(course), seems a helpless mess.
O.K. maybe someone could help me and or help with the further coding of this.
Na ja, vielleicht kann mir doch noch jemand weiter helfen oder mit entwickeln.
If anyone can help me here, I'd be very very thankful. I sincerely appreciate the time and effort of everyone who responded to my question.

P.S. I been working on a database App for close to 15 yrs. now using Visual basic 5.0/6.0. Its looking and working great. But working with the GPS algorithm, I must admit, that this is not simple!:BangHead:

best Regards to all,
WmC

PC: Laptop CoreDUo, Windows XP SP2 E
PPC: MDA Pro/WM5
OS: 5.1.195
Prozessor: PXA-520 Mhz
Display: 480x640 TFT
Bayern/Germany

Last edited:

klaus

Expert
Hello William,

Here you have an example of a rotating needle, rotating bitmap using the ImageLibEx.

Best regards.

wm.chatman

Well-Known Member
Lieber Klaus und Derez

Sometimes I feel like hiding under a Rock.:sign0148:

>Ich Danke Sehr<

P.S. Mein Gedanke fuer eine Waypoint App I will UPLOAD Tommorow.
My thoughts for a waypoint App I will UPLOAD Tommorow.
Maybe we can make this to a Forum Projekt, if that is O.K. with Mr. Erel.

mit freundliche Gruesse an alle,:sign0089:

William

wm.chatman

Well-Known Member
frage bitte Klaus?
wie setze ich nun diese sache mit dem GPS in verbindung?

kanst du mir dass doch maletwas naeher erklaeren?

wm.chatman

Well-Known Member
Hi all,

this is what the App needs to do.
Screen shows all the available waypoints that have been saved with az_dist_demo_Update.
Select one waypoint and use the Waypoint menu to:
• Add a new waypoint, either manually, or from the current GPS position.
• Go to that waypoint, entering track back function, let the Compass function take you to selected waypoint.
• Import
o All waypoints from KML, or other format. If these files contain more than 1 waypoint, GPS asks you to import a specific waypoint.
• Export
o All waypoints to KML, or other format.
• A sound (A Warning half Hour before Sunset. This is Important)
• Delete selected, to delete the selected waypoints.
• Save the selected waypoints.

P.S. I am working on this. Well I am giving it my best.:sign0137:

best regards,
William

Last edited:

wm.chatman

Well-Known Member
[ The App does not use Google Earth or KML Generator ]
Hi all,

this is what the App needs to do.
Screen shows all the available waypoints that have been saved with az_dist_demo_Update.
Select one waypoint and use the Waypoint menu to:
• Add a new waypoint, either manually, or from the current GPS position.
• Go to that waypoint, entering track back function, let the Compass function take you to selected waypoint.
• Import
o All waypoints from a given format. If these files contain more than 1 waypoint, GPS asks you to import a specific waypoint.
• Export
o All waypoints to KML, or other format. Question: Is KML not used for the Internet?
• A sound (A Warning half Hour before Sunset. This is Important)
• Delete selected, to delete the selected waypoints.
• Save the selected waypoints.

Edit: It does not use Google Earth or KML Generator

P.S. I am working on this. Well I am giving it my best.:sign0137:

best regards,
William

Last edited: