Jump to content
ThomasScherrer

GPS cordinates wizz ?

Recommended Posts

hello, I am looking for a GPS cordinate wizzard :-)

The task is explained quite simple:

Find distance and angle to a given WGS84 location.

it must work all over the globe.

I am not looking for super hi resolution in the angle,

since I only have 8 or 16 arrows to show the "goto" direction.

the distance a 10m resolution is fine.

Share this post


Link to post
Share on other sites

yes thanks,

I was looking for something much more simple,

since I dont need nice nice resolution,

a simply 2D vector to angle is all I need, I guess.

Share this post


Link to post
Share on other sites

If you just need a direction, you can build a look up table.

If you are planning to use the device at about the same latitude you can simply compare (delta latitude) and (delta longitude) * (cosine factor).

Share this post


Link to post
Share on other sites

well it would be nice if it could be world wide first time :-)

i was also thinking about calculating the deltas, if increasing if go away,

if decreasing I go home.

Share this post


Link to post
Share on other sites

Then the exact formula is:

(course over ground (from GPS)) - arctan((delta longitude) * cos(latitude)/(delta latitude) )

both arctan and cos can be approximated with lookup tables to a desired precision.

Share this post


Link to post
Share on other sites

the math problem has been fixed by a really cool programmer :)

http://www.webx.dk/rc/video-wireless/homeagain.wmv

now our OSD board can display distance to home,

and direction to home, this is the very first screenshoot you will get !

first we test if the little arrow on top is enough,

or the much higher resolution gfx slider pin at the bottom is fine or need to be bigger.

Home is defined as the first good stable position at each powerup.

Share this post


Link to post
Share on other sites

Looks good. The little arrow is good, don't want to clog up the screen for no reason.

Terry

Share this post


Link to post
Share on other sites

you are right, 1 of 8 arrows are fine resolution to get home I think.

I drove to work with it installed in my car hehe

I was eger to look at the screen while driving, kinda cool.

there is a big difference from drivning to flying a little model plane.

so the hi-res angle thing must go when flying, no real use I say.

I can even input waypoints to my work or a friend or whatever,

and then find my way :-) Really cool.

Share this post


Link to post
Share on other sites

I think just the arrow but not for screen clog. the little line scrolling around for me is going to make me crash because its distracting! haha.

Share this post


Link to post
Share on other sites

Any new developments on your project? Did I miss a new thread?

Thanks,

-dave

Share this post


Link to post
Share on other sites
the math problem has been fixed by a really cool programmer :)

I've been just trying to work out a solution for the same problem (codable with fixed precision maths in Atmega)

Could you provide a glimpse on how to do it (don't need a worldwide solution)?

Share this post


Link to post
Share on other sites
I've been just trying to work out a solution for the same problem (codable with fixed precision maths in Atmega)

Could you provide a glimpse on how to do it (don't need a worldwide solution)?

In the beginning of this year I also developed code to calculate distance and direction with just 32 an 16 bit integer maths. http://www.rcgroups.com/forums/showthread.php?t=629356

From time to time I get requests for the code. I was planning to make small document that explains it.

Frederic

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×