| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

iulixxi
EVE-RO
|
Posted - 2008.07.25 16:07:00 -
[1]
Edited by: iulixxi on 25/07/2008 16:10:19 Hello there, I am working on a tool for capital ships and I encounter a problem: The distance between 2 points in space is calculated by the formula
Distance = SQR((Xa-Xb)^2+(Ya-Yb)^2+(Za-Zb)^2)
The problem is I have a little deviation (about 0.03 LY comparing to ICSC Jumprange tool) if I use x, y, z values from mapSolarSystems. Any Ideea what I am doing whrong ? What is the purpose for xMin, xMax, yMin, yMax, zMin, zMax in the formula ?
Anyone ? :(
Thanks, Iulian
|

iulixxi
EVE-RO
|
Posted - 2008.07.25 20:53:00 -
[2]
For example:
System (x, y, z)
Remember theese are only the x, y, z values ignoring all the rest: xMin, xMax, yMin, yMax, zMin, zMax
A-5F4A (-3.39E+17, 1.04E+17, 2.46E+17) UVHO-F (-3.08E+17, 8.99E+16, 2.07E+17)
Distance is 346.104,786 AU = 5,47 LY BUT according to ICSC the distance between them is 5,44 LY
I am trying to figure out if the other values (xMin, xMax ....) are playing any role.
Also I've concidered: DistanceAU = Distance/149597870691 DistanceLY = DistanceAU/63239.6717
|

iulixxi
EVE-RO
|
Posted - 2008.07.25 22:05:00 -
[3]
Indeed I am using EA data dump. I will make a test with the old data dump (Trinity dump) and see if there is any difference. Indeed at first look there are a lot more digits after the dot. :D
Thanks a lot :P Iulian
|

iulixxi
EVE-RO
|
Posted - 2008.07.25 22:12:00 -
[4]
Distance = 344.251,096 AU = 5,44 LY Yep , that was it. 
Iulian
|

iulixxi
EVE-RO
|
Posted - 2008.07.25 22:56:00 -
[5]
yep, didn't noticed that either. I was just wondering ... why the heck a large chunk of data is repeated in more than 1 table ... wheird db arhitecture ...
|

iulixxi
EVE-RO
|
Posted - 2008.07.25 23:06:00 -
[6]
Edited by: iulixxi on 25/07/2008 23:13:41 Edited by: iulixxi on 25/07/2008 23:11:48 MDB  I am working with Classic ASP
EDIT: mapsolarsystems.security, mapsolarsystems.radius also seems cut off ...
|

iulixxi
EVE-RO
|
Posted - 2008.07.25 23:21:00 -
[7]
Nice , thanks a lot m8. I am kinda new to SQL - about 2 months (I am a designer not programmer) but I like it ! 
Iulian
|

iulixxi
EVE-RO
|
Posted - 2008.07.26 07:43:00 -
[8]
Yay ! Nice work, thanks.
Also colums security and radius on mapSolarSystems are rounded but are not so important as coordonates.
Thanks again Iulian
|

iulixxi
EVE-RO
|
Posted - 2008.07.28 13:56:00 -
[9]
Edited by: iulixxi on 28/07/2008 13:56:32 Yep,
SELECT (SQR((a.X-b.X)^2+(a.Y-b.Y)^2+(a.Z-b.Z)^2)/149597870691)/63239.6717 AS Distance FROM db_mapsystems a, db_mapsystems b WHERE a.solarSystemName='A-5F4A' AND b.solarSystemName='UVHO-F';
For VB6 - ASP :P
(I modify a little the table names :D)
|
| |
|