| Pages: [1] :: one page |
| Author |
Thread Statistics | Show CCP posts - 0 post(s) |

Ach'tarus
|
Posted - 2007.09.27 14:07:00 -
[1]
Hello, i've 2 question, i try to calculate the distance between 2 system, using this :
Originally by: SQL
select (sqrt((a.x-b.x)^2+(a.y-b.y)^2+(a.z-b.z)^2)),a.solarsystemname,b.solarsystemname from mapsolarsystems as a,mapsolarsystems as b where a.solarsystemname like 'FAT%' and b.solarsystemname like '25%'
i don't find the same result as the jump planner, so i suppose i'm wrong (result are in km, so divide it by 150 000 000 to have in light year.
-----------
i'm searhcing in the ccp data export how to find variation of item, and meta level, could you help me ?
|

Tonto Auri
|
Posted - 2007.09.27 14:09:00 -
[2]
Your main mistake is "Like" operator I think. Do selection by system ID. -- Thanks CCP for cu<end of sig> |

Ach'tarus
|
Posted - 2007.09.27 14:12:00 -
[3]
it selection the good system (FAT-6P & 25S-6P) cause we have only 1 possible in each case
|

Vessper
The Graduates Brutally Clever Empire
|
Posted - 2007.09.27 15:06:00 -
[4]
Edited by: Vessper on 27/09/2007 15:06:32 Try this:
select (sqrt(pow(a.x-b.x,2)+pow(a.y-b.y,2)+pow(a.z-b.z,2))), a.solarsystemname, b.solarsystemname from mapsolarsystems as a,mapsolarsystems as b where a.solarsystemname like 'FAT%' and b.solarsystemname like '25%'
And actually, the result will be in metres (not km) so just divide by 9.46E+16 to get the distance in light years (I think you're confusing "light year" with "speed of light" for that 150,000,000 you mentioned?)
--------------------
EveHQ Character App | Item Database |

Ach'tarus
|
Posted - 2007.09.28 08:08:00 -
[5]
"Total travel distance: 2.58ly. "
i can't find this number back
|

Vessper
The Graduates Brutally Clever Empire
|
Posted - 2007.09.28 09:59:00 -
[6]
Sorry, I put the wrong power of 10 down on the light year figure 
Try this SQL statement, it has the LY calculation built in:
select (sqrt(pow(a.x-b.x,2)+pow(a.y-b.y,2)+pow(a.z-b.z,2)))/9.46e+15 as Distance, a.solarsystemname, b.solarsystemname from mapsolarsystems as a,mapsolarsystems as b where a.solarsystemname like 'FAT%' and b.solarsystemname like '25%'
I run that and I get 2.57898 which when rounded matches your initial figure of 2.58. --------------------
EveHQ Character App | Item Database |

solbright altalt
State War Academy
|
Posted - 2007.09.28 23:33:00 -
[7]
To clarify the light-year constant, the speed-of-light is usually listed over one second but we are wanting that same speed over one year instead:
Google says one year = 365.242199 days or 31 556 926 seconds and the speed of light = 299 792 458 m / s
so, 299792458 * 31556926 = 9.4605284e+15 metres / year
|
| |
|
| Pages: [1] :: one page |
| First page | Previous page | Next page | Last page |