These forums have been archived and are now read-only.

The new forums are live and can be found at https://forums.eveonline.com/

EVE Technology Lab

 
  • Topic is locked indefinitely.
 

CitadelDB App

First post
Author
baldurk
Brutor Tribe
Minmatar Republic
#1 - 2016-07-20 21:05:42 UTC
I've been working on an app to keep a database of the citadels ingame. It's not quite perfect or has everything complete that I want but I believe it's ready to share: CitadelDB

This app records citadels through killmails (thanks zkillboard!!). That is to say if the Citadel has killed something or has been destroyed itself, it will be in the database. I currently do not have a way to record citadels that are not part of a killmail. Additionally I do not have a way to distinguish two of the same citadel type anchored in the same system by the same corporation. With at least one entry we can be sure that there is at least one present.

The site is pretty basic right now, I do intend to add more styling and features to quickly get more overall information on citadels (total built/destroyed, how many per region, etc) but in the meantime it should serve as a decent list of citadels.
I'd appreciate any feedback you may have for the app or the projects as web app development is something new for me. Are there features you'd like? Is this a helpful resource for you?

Github links:
frontend
backend
CCP Tellus
C C P
C C P Alliance
#2 - 2016-07-20 21:26:19 UTC
baldurk wrote:
Additionally I do not have a way to distinguish two of the same citadel type anchored in the same system by the same corporation.

Killmails have X, Y, and Z coordinates. Kills done by a particular Citadel should be in the general vicinity of each other.
Salgare
Center for Advanced Studies
Gallente Federation
#3 - 2016-07-20 21:30:23 UTC
cool beans!
baldurk
Brutor Tribe
Minmatar Republic
#4 - 2016-07-20 21:32:48 UTC
That was my thought originally but then realized that those are the co-ordinates of the ship that was destroyed, so they would all be different. I did not think of checking them by general vicinity though, I'll look into that. thanks!
Salgare
Center for Advanced Studies
Gallente Federation
#5 - 2016-07-20 21:49:13 UTC  |  Edited by: Salgare
CCP Tellus wrote:
baldurk wrote:
Additionally I do not have a way to distinguish two of the same citadel type anchored in the same system by the same corporation.

Killmails have X, Y, and Z coordinates. Kills done by a particular Citadel should be in the general vicinity of each other.


It sure would be sweet to be able to get/set xyz bookmark information!

A call for the end of those nasty toilets in Pos'es! (toilets and BM's as in Bowel Movements)
CCP Tellus
C C P
C C P Alliance
#6 - 2016-07-20 21:59:09 UTC
Salgare wrote:
It sure would be sweet to be able to get/set xyz bookmark information!

The bookmarks endpoint in the XML API gives you the X, Y, and Z coordinates of all your bookmarks.
Salgare
Center for Advanced Studies
Gallente Federation
#7 - 2016-07-20 22:03:44 UTC
CCP Tellus wrote:
Salgare wrote:
It sure would be sweet to be able to get/set xyz bookmark information!

The bookmarks endpoint in the XML API gives you the X, Y, and Z coordinates of all your bookmarks.


need a setter, corp level would be sweet
Zifrian
The Frog Pond
Ribbit.
#8 - 2016-07-20 22:10:42 UTC
Commendable effort but why can't we get this part of an API or CREST? For industry, I really have no option to get data.

Maximze your Industry Potential! - Download EVE Isk per Hour!

Import CCP's SDE - EVE SDE Database Builder

Squizz Caphinator
The Wormhole Police
#9 - 2016-07-21 16:03:40 UTC
Nice use of zkillboard, great thinking!

FYI, killmails have coordinates on them, so you can use that to determine if there is more than 1 citadel per corp in a system if the killmails are say, more than 1000km apart or something like that.

Again, nice work

Various projects I enjoy putting my free time into:

https://zkillboard.com | https://evewho.com

baldurk
Brutor Tribe
Minmatar Republic
#10 - 2016-07-21 17:04:54 UTC
Squizz Caphinator wrote:
Nice use of zkillboard, great thinking!

FYI, killmails have coordinates on them, so you can use that to determine if there is more than 1 citadel per corp in a system if the killmails are say, more than 1000km apart or something like that.

Again, nice work


Thanks. Yeah I'm looking into using the coordinates now. Is there more data on using them? Say, how could I tell if something is 1000km away through the x,y, and z? are those numbers directly reflective of km?
Salgare
Center for Advanced Studies
Gallente Federation
#11 - 2016-07-21 17:31:10 UTC  |  Edited by: Salgare
baldurk wrote:
Squizz Caphinator wrote:
Nice use of zkillboard, great thinking!

FYI, killmails have coordinates on them, so you can use that to determine if there is more than 1 citadel per corp in a system if the killmails are say, more than 1000km apart or something like that.

Again, nice work


Thanks. Yeah I'm looking into using the coordinates now. Is there more data on using them? Say, how could I tell if something is 1000km away through the x,y, and z? are those numbers directly reflective of km?


matrix coordinate math .. ouch

I'd check out some 3-d graphics helper/utilities libraries
CCP Tellus
C C P
C C P Alliance
#12 - 2016-07-21 17:43:24 UTC
Salgare wrote:
matrix coordinate math .. ouch

You can compute the Euclidean distance:

import math

def distance((x1, y1, z1), (x2, y2, z2)):
     return math.sqrt((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2)

This function will give you the distance between two coordinates.
Salgare
Center for Advanced Studies
Gallente Federation
#13 - 2016-07-21 18:10:21 UTC
CCP Tellus wrote:

import math

def distance((x1, y1, z1), (x2, y2, z2)):
     return math.sqrt((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2)

This function will give you the distance between two coordinates.


Capturing that, thank you!
baldurk
Brutor Tribe
Minmatar Republic
#14 - 2016-07-21 22:31:56 UTC
very cool! thank you. Is there a minimum distance you can place citadels in relation to other citadels?
WhoBeI
Duty.
Brave Collective
#15 - 2016-07-22 10:37:31 UTC
CCP Tellus wrote:
Salgare wrote:
matrix coordinate math .. ouch

You can compute the Euclidean distance:

import math

def distance((x1, y1, z1), (x2, y2, z2)):
     return math.sqrt((x1-x2)**2 + (y1-y2)**2 + (z1-z2)**2)

This function will give you the distance between two coordinates.


Isn't it funny how many people forget about Pythagoras when they finish school Big smile

If you are recording all the killmails in a table you can do the check using sql instead and maybe gain some performance. Using something like the pseudo code below. (xo,yo,zo) would be the citadel coordinates, (xp,yp,zp) the kills and r the range (r=1000).


// Give me all kills within :r range of the point (:xo,:yo,:zo)
select ... from ... where pow( :xo - xp, 2 ) + pow( :yo - yp, 2 ) + pow( :zo - zp, 2 ) < pow( :r, 2 )


Same thing works to do a 'all beer joints within 5km' in G maps provided you express radius, or range, in a lat/lng way. It's not perfect since, well, the earth ain't flat but works fine for small ranges. Nobody wants to go far for a beer anyways Big smile.

Squizz Caphinator
The Wormhole Police
#16 - 2016-07-22 11:55:14 UTC
WhoBeI wrote:
Nobody wants to go far for a beer anyways


I haven't even had my first coffee yet and I'm already affected by wise words of the day

Various projects I enjoy putting my free time into:

https://zkillboard.com | https://evewho.com