Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / GPS Calculations in 3D Env.

Author
Message
tmd13
14
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 13th Nov 2009 01:46
How can I do the same calculation that a GPS does in real world for a simulated world where the "gps" will tell the vehicle what path should it take to reach its final destination.

Can somebody know how to do it??


Thanks in advance for the help
Neuro Fuzzy
16
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 13th Nov 2009 06:53
A GPS gives you the position, now how to get there. Try looking up stuff about pathfinding routines on the forums.

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 13th Nov 2009 13:21
from what I remember from a program on discovery the sats are at a set distance apart form each other, so it just a matter of using old school stuff to do with acb of a triangle but the one for 3d position which i think DBPro as built into it(vectors I think).

sat a------------sat b ------- sat c --------- sat d



moving object x

Dark Physics makes any hot drink go cold.
tmd13
14
Years of Service
User Offline
Joined: 16th Sep 2009
Location:
Posted: 13th Nov 2009 20:48
What is
sat a------------sat b ------- sat c --------- sat d
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 13th Nov 2009 21:00 Edited at: 13th Nov 2009 21:04
my bad spelling of satellite, our globe is covered by 12 satellites of which a GPS system tries to find three or more to work out where you are.

so if you had a triangle of them like so in the sky

a
|>c
b

and you are x on the ground then you work out

abx
bcx
acx
and because abc are the same distance apart to you work out the angle and distance. (how I can't remember.)

hopefully someone else will jump in and give some code or more info on what I mean.

or you can read this which tells all but might not help.

http://en.wikipedia.org/wiki/Global_Positioning_System

Dark Physics makes any hot drink go cold.
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 14th Nov 2009 14:59
HowDo....I think it is more the pathfinding that tmd13 was meaning. Try searching the forums for A* pathfinding

"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library

First you Dream, then you ... - Neil Gaiman, 2001
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th Nov 2009 05:53
A GPS unit will grab the position of each of 3 satellites in orbit around the Earth. Using the locations of those 3 satellites it can triangulate a position on Earth, the current location of the GPS unit.

Figuring out how to get from point A to point B requires a form of pathfinding. IanM has written a very good A* library in DB already, search the forum for it.


> SELECT * FROM users WHERE clue > 0
> 0 rows returned

Login to post a reply

Server time is: 2024-04-19 10:32:29
Your offset time is: 2024-04-19 10:32:29