| Pages: [1] :: one page |
| 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
|

Vessper
Indicium Technologies
|
Posted - 2008.07.25 19:30:00 -
[2]
Your formula looks correct. Care to state what systems you're looking at, giving your figures, ICSC figures and I'll happily take a look at what numbers I get.
- - -
EveHQ Character App | Item Database |

iulixxi
EVE-RO
|
Posted - 2008.07.25 20:53:00 -
[3]
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
|

AcriQuo
Minmatar Tribal Retribution
|
Posted - 2008.07.25 21:50:00 -
[4]
I think the problem lies in the rounding of the numbers in the Empyrean Age data dump that Vessper made. The original data had a lot more digits after the dot. ---- Out of game EveMap - Forum thread for feedback |

iulixxi
EVE-RO
|
Posted - 2008.07.25 22:05:00 -
[5]
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 -
[6]
Distance = 344.251,096 AU = 5,44 LY Yep , that was it. 
Iulian
|

AcriQuo
Minmatar Tribal Retribution
|
Posted - 2008.07.25 22:15:00 -
[7]
Yay  ---- Out of game EveMap - Forum thread for feedback |

Vessper
Indicium Technologies
|
Posted - 2008.07.25 22:27:00 -
[8]
Oops 
Apologies, but for some reason the co-ords in the solar system table are rounded, yet in the mapDenormalize table, they are normal. You could try using the co-ords extracted from that table by searching for typeID=5. - - -
EveHQ Character App | Item Database |

iulixxi
EVE-RO
|
Posted - 2008.07.25 22:56:00 -
[9]
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 ...
|

Vessper
Indicium Technologies
|
Posted - 2008.07.25 23:03:00 -
[10]
I guess that's why they call it mapDenormalize 
Anyhoo, I've sorted what was wrong in the table - it was the CSV file cutting decimal places down to 2. I can get a revised export out if that's any use so you can test it?
PS Which version you using? MySQL?
- - -
EveHQ Character App | Item Database |

iulixxi
EVE-RO
|
Posted - 2008.07.25 23:06:00 -
[11]
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 ...
|

Vessper
Indicium Technologies
|
Posted - 2008.07.25 23:17:00 -
[12]
No probs, gimme a few mins to convert and upload the files and I'll post here and back in my original EA export thread
- - -
EveHQ Character App | Item Database |

iulixxi
EVE-RO
|
Posted - 2008.07.25 23:21:00 -
[13]
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
|

Vessper
Indicium Technologies
|
Posted - 2008.07.26 06:08:00 -
[14]
Took a bit longer than expected but I've updated all the files now!
- - -
EveHQ Character App | Item Database |

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

Gilgamoth
Eldritch Storm The Matari Consortium
|
Posted - 2008.07.28 08:41:00 -
[16]
If you want to be really geeky (and I am) then you can do it straight from a MySQL Query
Quote: SELECT ((SQRT(((a.X-b.X)*(a.X-b.X))+((a.Y-b.Y)*(a.Y-b.Y))+((a.Z-b.Z)*(a.Z-b.Z))))/149597870691)/63239.6717 Distance FROM `mapsolarsystems` a, `mapsolarsystems` b WHERE a.solarSystemName='A-5F4A' AND b.solarSystemName='UVHO-F';
which returns a value of 5.4435939716756. This is using the Trinity 1.1 data dump though.
Regards,
Gil
Live on Eden Underground Radio every Wednesday 19:00 - 21:00 GMT. |

iulixxi
EVE-RO
|
Posted - 2008.07.28 13:56:00 -
[17]
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)
|

Tkar vonBiggendorf
Gallente Snake Eyes Inc Friend or Enemy
|
Posted - 2008.07.28 21:33:00 -
[18]
Originally by: iulixxi
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 ...
Not that weird. It's a space v. speed trade off. If you need to access a particular set of information repeatedly, having a single indexed table returning one row with what you need instead of having to join several tables is much faster for read access, but you consume more disk space and updates to the data could be slower. For EVE, this information only gets updated during patches, so it works well in this context.
I promise nothingÖ. --CCP Prism X |
| |
|
| Pages: [1] :: one page |
| First page | Previous page | Next page | Last page |