Actual Distance from a Celstial (EVE Math)

So, when we get a Killmail from API, we get the position in XYZ of where it happened. This is wonderful, and it lets us find the nearest celestial and even the distance from it.

However, The points of the celestials (let’s use a stargate for example) are for its center. So if the calculated distance is 400000m (400km) this is not what the actual distance from the stargate is but from the stargate’s center.

So, my question is: how do I find the radius of the stargate/station/etc to subtract this when calculating distance? With certain celestials, we can use mapCelestialStatistics, but in the case of things like gates/stations, I can not seem to find this information in the SDE. If this information cannot be obtained, any way to get a “best estimate”?

Thanks in advance to anyone that may have an idea as to how to handle this.
o7

For stargates you can get this data from ESI.

For example:
https://esi.evetech.net/latest/universe/types/29624/

I do not know which are which/actually used but the list is here:

16 Stargate (Caldari System)
17 Stargate (Amarr Constellation)
3873 Stargate (Caldari Border)
3874 Stargate (Gallente Constellation)
3875 Stargate (Gallente System)
3876 Stargate (Gallente Border)
3877 Stargate (Minmatar Constellation)
17135 Stargate under construction and repair
23963 Stargate Gallente 1
24565 Stargate - Caldari 1
24566 Stargate - Caldari
24685 Stargate Minmatar 1
25231 Stargate - Minmatar
25232 Stargate - Gallente
29624 Stargate (Amarr System)
29625 Stargate (Amarr Border)
29626 Stargate (Amarr Region)
29627 Stargate (Caldari Constellation)
29628 Stargate (Caldari Unused)
29629 Stargate (Caldari Region)
29630 Stargate (Gallente Unused 2)
29631 Stargate (Gallente Unused 1)
29632 Stargate (Gallente Region)
29633 Stargate (Minmatar System)
29634 Stargate (Minmatar Border)
29635 Stargate (Minmatar Region)

Can also do a similar thing for stations, for example for jita https://esi.evetech.net/latest/universe/stations/60000463/ the type_id of the station is https://esi.evetech.net/latest/universe/types/4024/

54 Caldari Logistics Station
56 Gallente Military Station
57 Gallente Station Hub
58 C-O-1
59 C-O-2
1529 Caldari Administrative Station
1530 Caldari Research Station
1531 Caldari Trading Station
1926 Amarr Station Hub
1927 Amarr Station Military
1928 Amarr Industrial Station
1929 Amarr Standard Station
1930 Amarr Mining Station
1931 Amarr Research Station
1932 Amarr Trade Post
2071 Station (InterBus)
2496 Minmatar Hub
2497 Minmatar Industrial Station
2498 Minmatar Military Station
2499 Minmatar Mining Station
2500 Minmatar Research Station
2501 Minmatar Station
2502 Minmatar Trade Post
3864 Amarr Citadel
3865 Gallente Research Station
3866 Gallente Trading Hub
3867 Gallente Industrial Station
3868 Gallente Administrative Station
3869 Gallente Logistics Station
3870 Gallente Mining Station
3871 Caldari Station Hub
3872 Caldari Military Station
4023 Caldari Mining Station
4024 Caldari Food Processing Plant Station
9856 Amarr Class A Starport
9857 Amarr Class B Starport
9867 Heaven
9868 Concord Starbase
9873 Dark Amarr Station O
10795 Jovian Construct
12242 Station (Conquerable 1)
12294 Station (Conquerable 2)
12295 Station (Conquerable 3)
19757 Research Outpost
21642 Caldari Research Outpost
21644 Amarr Factory Outpost
21645 Gallente Administrative Outpost
21646 Minmatar Service Outpost
22296 Blood Raider Logistics Outpost
22297 Blood Raider Military Outpost
22298 Blood Raider Trading Outpost
29323 Ishukone Corporation Headquarters
29387 Repaired Amarr Station Hub
29388 Repaired Amarr Military Station
29389 Repaired Amarr Trading Post
29390 Damaged CONCORD Station
34325 Sisters of EVE Logistics Station
34326 Sisters of EVE Industrial Station

This data is prob in the sde somewhere tho…

1 Like

This data is in the typeIDs.yml SDE file. Looks like @Steve_Ronuken missed it in his yamlloader :0. But it is on the type_id. So you would have to figure out the type_id the startgate/station then go from there.

29624:
    graphicID: 3458
    groupID: 10
    mass: 100000000000.0
    name:
        de: Stargate (Amarr System)
        en: Stargate (Amarr System)
        fr: Portail stellaire (système amarr)
        ja: スターゲート(アマーシステム)
        ru: Stargate (Amarr System)
        zh: 星门(艾玛星系)
    portionSize: 1
    published: false
    raceID: 4
    radius: 2473.0
    sofFactionName: amarrbase
    soundID: 32
    volume: 10000000.0
1 Like

Thank you both very much, this definitely will get me on the right track to getting the ACTUAL distance/closest distance etc.

The stations look like they will be easy, as getting the type is pretty simple. With the Stargates, its also just as simple as - https://esi.evetech.net/latest/universe/stargates/{StationID}/

So nice and easy!

Thanks so much again,

Wolf

Np, really just need to iterate on the list i gave and store the radius as they are static values.

1 Like

My thoughts exactly!
I was just about to start making a table to store it and a script to get it =P

1 Like

It was definitely easy to get all of the stations,
The stargates, sadly, do not have their typeID anywhere that I have found yet, so that will take a bit more time.

Here is a list of all the stations though, if anyone is interested:

stationTypeID:54 - Radius: 15351
stationTypeID:56 - Radius: 23836
stationTypeID:57 - Radius: 27072
stationTypeID:1529 - Radius: 45734
stationTypeID:1530 - Radius: 26782
stationTypeID:1531 - Radius: 33413
stationTypeID:1926 - Radius: 42489
stationTypeID:1927 - Radius: 48492
stationTypeID:1928 - Radius: 24276
stationTypeID:1929 - Radius: 20081
stationTypeID:1930 - Radius: 22283
stationTypeID:1931 - Radius: 29162
stationTypeID:1932 - Radius: 13887
stationTypeID:2496 - Radius: 33811
stationTypeID:2497 - Radius: 27681
stationTypeID:2498 - Radius: 36902
stationTypeID:2499 - Radius: 30592
stationTypeID:2500 - Radius: 33481
stationTypeID:2501 - Radius: 19714
stationTypeID:2502 - Radius: 15733
stationTypeID:3865 - Radius: 45151
stationTypeID:3866 - Radius: 24871
stationTypeID:3867 - Radius: 29746
stationTypeID:3868 - Radius: 17876
stationTypeID:3869 - Radius: 37560
stationTypeID:3870 - Radius: 28083
stationTypeID:3871 - Radius: 24657
stationTypeID:3872 - Radius: 47854
stationTypeID:4023 - Radius: 47854
stationTypeID:4024 - Radius: 55741
stationTypeID:9868 - Radius: 60432
stationTypeID:10795 - Radius: 47270
stationTypeID:29323 - Radius: 52868
stationTypeID:29387 - Radius: 42489
stationTypeID:29388 - Radius: 48532
stationTypeID:29389 - Radius: 13887
stationTypeID:34325 - Radius: 37560
stationTypeID:34326 - Radius: 29746

I gave you the list of startgate type_ids already :stuck_out_tongue: Check my first post.

Or if you looking off the SDE, its where group_id = 10

That part I did see,
I meant finding out which type each individual stargate is.

Oh like in a system.

To do that you would have to lookup the system using the systems endpoint. Like:

https://esi.evetech.net/v4/universe/systems/30000142/ then look at the stargates array to get stargate IDs,

https://esi.evetech.net/v1/universe/stargates/50001248/ then would be the type_id property

EDIT: Or also maybe try mapDenormalized, and filter down to only type_ids in the lis above.

Thats what was thinking, looking them up in mapDenormalize, then looking up the gate by itemID, sadly the typeID in the table is not the typeID I would use for that API call.

Okay, I see what the problem was… I am assuming that either the dump I got, or the import was wrong… It was listing all the typeID in mapDenormalize as 127, I just downloaded an export of just that table, and it was all the correct ID’s — no wonder I was having such a hard time with all of this.

Again, thank you, I probably would not have been able to to get this far without you.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.