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.
123Next page
 

Request for API system - POS Locations

First post First post
Author
Xander Hunt
#1 - 2011-12-22 17:22:52 UTC  |  Edited by: Xander Hunt
When querying your corps Asset list, it would be nice when the API returns the location of the POS, it returns what real location the towers and its structures sits at, instead of what system the POS is located at.

When writing an asset tracker, I just had a thought about what happens if a corp happens to have more than one POS in the system? All labs, towers, and everything else ends up showing on the asset list as in the system, which makes it more difficult to ascertain what belongs to what. :(

One could reference /corp/StarBaseList.xml.aspx to get the location of the tower, but this won't help with what is at the POS, such as structures or containers hanging around.


Forget about that.... What if you were to give us the XYZ coordinates of any item in space, leave the locationID as is pointing to the solar system, then leave it on the code monkeys to do the math on our end to figure out where the closest item in space is against mapDenormalize.

This should be really easy since
A> You're already accessing the list of items owned
B> Some sort of database already knows the XYZ coordinates of any player owned object in space since we can query for their existence AND objects always appear in the exact same spot when we warp away and warp back to location
C> It shouldn't break anyone elses code since you're just adding to the API row.
C.1> If you fear that it will, adding an additional parameter to the URL would allow for XYZ to be added. Something like checking for &XYZ in the URL would add the fields as needed for items located in space.

The XYZ coordinate could be added to each row in the format of XYZ="1.34,3.56,4.71" or whatever.
Two step
Aperture Harmonics
#2 - 2011-12-22 18:19:59 UTC
What I do for AHARM's tracker is have people put a special amount of a single item into each hangar (I use trit, and the amount is planet * 100 + moon, so P4m16 would be 416 trit). This works pretty well for us.

CSM 7 Secretary CSM 6 Alternate Delegate @two_step_eve on Twitter My Blog

TorTorden
Tors shibari party
#3 - 2011-12-22 18:25:59 UTC  |  Edited by: TorTorden
As you know, the starbase list has moonid for each tower, after that you are on your own.

There isn't realy a simply solution to it, and you would have to make your own data tables to make sense of it, where you have to map each pos-mod to a tower manually (yes it sucks)
The best way I have found doing this is finding the itemid for an item in a given hangar and use that to then retrieve an arrays itemid. And map that in its own table with type of hangar (lab,component factory etc etc) to which pos it's anchored at.

The least annoying way I have come up with is using the show info link URL you get from dragging an item into an in game chat channel hit enter, then copy paste the sent link into a normal text field (notepad,html form etc etc) this will give you a string like

Quote:
( {= less than, =} greater than God I hate this forum)

“ SomeDude =} {=url=showinfo:yy//xxxxxxxx=}Enriched Uranium{=/url=} ”

The anatomy of this is quite simply “ {=URL=showinfo:TypeID//ItemID=}Item Name{=/url=}

(please oh please CCP do not change how this works)



To make more practical use of this I have a small web form where I select tower,type the name of the array and copy paste an url like above (linked from the hangar itself)

If the itemid is in the database asset table then I use it to find witch containing itemid it is (the array itself) and store that in a table mapping it to it's tower.

I have so far used this mainly to map our long term fuel storage and with the right sql I use this mapping method to calculate not only how long the towers themselves are running but also how long we can keep them running from storage.
(all API updated and calculated on a web-page)

Now I dont see a magic tool to do this, this should probably be something a corp\alliance should figure out on their own. (yes, once you get large enough you need your own corporate tools dev...)



Addendum: I can actualy use this show info 'trick' to view items in a container from corp hangar, or what fittings a ship in an SMA has on it (including cargo)
Xander Hunt
#4 - 2011-12-22 18:29:31 UTC
Interesting method, but kind of an annoying workaround for what I would figure would be part of the original source.

The next thing I wonder is since I have a GSC sitting at the POS whether or not the API will give its SYSTEM location or if it will give its MOON location.....
TorTorden
Tors shibari party
#5 - 2011-12-22 18:30:51 UTC  |  Edited by: TorTorden
System location.
Clarifcation:
Since the assets api list only returns location ID, not the X,Y,Z coordinates.

The locationID is either systemID, or a stationID if memory serves.

Second addendum:
I would love a third starbase API where we could actualy get a list of the mods anchored near a given tower with the x,y,z coordinates.
I think that would work a lot better than having x.y,z in the assets list since this would only be applicable to stuff anchored out in space.

Granted we got a lot of stuff in space, but we have far more inside the stuff we have in space :P
Xander Hunt
#6 - 2011-12-22 18:41:56 UTC
TorTorden wrote:

(please oh please CCP do not change how this works)


I couldn't help but laugh at that. If I do manage to convince CCP on this change, don't dec me. ;)

The bonus my tool is going to have is that each item that is part of a groupID is going to be able to be renamed. So I won't see a list of all the Hurricanes I have, but the actual ships name. This will also come in handy when trying to figure out what station container is holding what item without having to be in EVE and clicking on each. Initially I WILL have to go through the process, but, it'd be a one time chore.

I also am not sure if containers, or even items in general, get a new ID if moved from one location to another. I'm also not sure if two new itemIDs are made if a stack is split, or, if one itemID remains and a new one is created.

Since each itemID in the API represents a unique item in the EVE universe what I can do is setup a new table that would indicate what itemID belongs to what location and just override what the locationID that is returned. Of course, limited to particular groupIDs. It'd be the same work load above by having to go through the list of items that are marked in the solar system instead of just at a moon.
TorTorden
Tors shibari party
#7 - 2011-12-22 18:42:52 UTC  |  Edited by: TorTorden
I was only refering to that the show info URL method is the only way outside of api that I know of you can retrieve ItemId's.


This should be one of the bonuses of the 64bit item id's, they are no longer being reused, they might get destroyed, but they should be unique as long as the item remains unstack able.
Xander Hunt
#8 - 2011-12-22 18:45:55 UTC
TorTorden wrote:
System location.
Clarifcation:
Since the assets api list only returns location ID, not the X,Y,Z coordinates.

The locationID is either systemID, or a stationID if memory serves.

Second addendum:
I would love a third starbase API where we could actualy get a list of the mods anchored near a given tower with the x,y,z coordinates.
I think that would work a lot better than having x.y,z in the assets list since this would only be applicable to stuff anchored out in space.

Granted we got a lot of stuff in space, but we have far more inside the stuff we have in space :P


That would be the root of my problem for the structures at the POS, or for that matter, anything left in space. What is returned by locationID in the API is the solarSystemID. mapDenormalize contains ALL locations in space (moons, belts, suns, etc) so I can't see why the link can't be made there.
TorTorden
Tors shibari party
#9 - 2011-12-22 18:51:09 UTC  |  Edited by: TorTorden
In my guess it's simply a problem with ccp not giving us the x,y,z coordinates so we are forced to make do with what we can..

At first I tried something similar as Two-Step's method only I made the mistake of using strippers and my members couldnt stop messing with them...
Xander Hunt
#10 - 2011-12-22 19:30:19 UTC
TorTorden wrote:
In my guess it's simply a problem with ccp not giving us the x,y,z coordinates so we are forced to make do with what we can..

At first I tried something similar as Two-Step's method only I made the mistake of using strippers and my members couldnt stop messing with them...


Technically you get the XYZ from the location of the moon in mapDenormalize. The issue is that structures/stuff in space are associated to the solar system when you call the Assets API.

If an item is sitting no where near a location within the mapDenormalize, I could understand that it'd get associated to the solarSystemID. But in order to build the POS, you have to be at the moon (Which is given with another API call) but anything (Structures and stuff) within say 250km of that tower SHOULD get the same locationID, not the solarSystemID. Their internal database would have to hold the exact XYZ coordinates of any object in space. Calculating a distance from the POS XYZ location to where the structure is, is a nobrainer considering that we're told distances in the client in our overview.

Xander Hunt
#11 - 2011-12-22 20:07:25 UTC
TorTorden wrote:
In my guess it's simply a problem with ccp not giving us the x,y,z coordinates so we are forced to make do with what we can..

At first I tried something similar as Two-Step's method only I made the mistake of using strippers and my members couldnt stop messing with them...


I was just thinking.... If CCP were to NOT change the locationID given in the API, but instead ADD to the particular row the XYZ coordinate, WE can do the figuring on where the position of each item in space is on our own. All CCP has to do is give us the numbers. No additional calculating API side, just querying an extra single or three fields.

*goes and changes his OP*
Two step
Aperture Harmonics
#12 - 2011-12-22 20:27:02 UTC
TorTorden wrote:
In my guess it's simply a problem with ccp not giving us the x,y,z coordinates so we are forced to make do with what we can..

At first I tried something similar as Two-Step's method only I made the mistake of using strippers and my members couldnt stop messing with them...


Hah. I also put the trit in a tab that most members can't access, so they don't usually mess things up...

CSM 7 Secretary CSM 6 Alternate Delegate @two_step_eve on Twitter My Blog

TorTorden
Tors shibari party
#13 - 2011-12-22 20:48:16 UTC  |  Edited by: TorTorden
I would love having x y z coordinates, although I dont want to see them in the assets api, since almost 90% of the items in it doesn't need them.

What I would love (as I mentioned) is a brand new api call which only lists the items we anchor in space something like ItemId,Custom_name,x,y,z (I dont need typeid, we have that in the assets dump, but It probably couldnt hurt), The custom name field might also be a pipe dream but it would realy help us out, althoug if you grid map your pos you should be able to pin-point by the x y z alone.

We can then use that data alone to map out our towers modules etc without having to fill alot of fluff into the assets api call wich already gets quite large enough as it is, and we dont realy want x y z fields for all the items in the hangars\arrays (especially since we cant restack on pos's (I mean repackage)) as it is we just want to know where the hangar\factory is.
Xander Hunt
#14 - 2011-12-27 11:58:10 UTC
TorTorden wrote:
I would love having x y z coordinates, although I dont want to see them in the assets api, since almost 90% of the items in it doesn't need them.

What I would love (as I mentioned) is a brand new api call which only lists the items we anchor in space something like ItemId,Custom_name,x,y,z (I dont need typeid, we have that in the assets dump, but It probably couldnt hurt), The custom name field might also be a pipe dream but it would realy help us out, althoug if you grid map your pos you should be able to pin-point by the x y z alone.

We can then use that data alone to map out our towers modules etc without having to fill alot of fluff into the assets api call wich already gets quite large enough as it is, and we dont realy want x y z fields for all the items in the hangars\arrays (especially since we cant restack on pos's (I mean repackage)) as it is we just want to know where the hangar\factory is.


Why make a new API if it is possible to have a toggle to whether or not the API displays the data or not? I know how large the API data could potentially get, but that doesn't mean a ~20 extra bytes of data per row that only includes data if the object is in space can't be there. It'd be one less call to the API servers.

The custom names, yes, I think it is a pipe dream. I recall once upon a time in the old forums how it was discussed and a dev said that they just couldn't figure out how to pull that information. Can't remember the exact details.
Dragonaire
Here there be Dragons
#15 - 2011-12-27 15:53:10 UTC
Just for a little history on this I thought I'd point out the Q&A part of the API over on Eve-id since no one else had.

http://wiki.eve-id.net/APIv2_Corp_StarbaseDetail_XML

As far as I know they haven't changed the server structure in a way that would change the original reason why it couldn't be done. Those of you looking to get XYZ of stuff I think are truly out of luck but it would be nice if they could at least give us the moonID instead of the solarsystemID and IMHO could lead to less work for them at startup and when doing some of the backend processing of a POS but they may see it differently.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

TorTorden
Tors shibari party
#16 - 2011-12-28 15:28:55 UTC  |  Edited by: TorTorden
Quote:
So CCP doesn't save a moonID for starbase assets then? Surely there must be a way? Keep in mind im only asking for a moonID (wich is pretty static), no state or anything like that.
Quote:
I am quite sure they save anchored structures with x/y/z coordinates, and then build the POSes from towers and their nearby modules. And there will be a number of reasons why they probably do not want to export the x/y/z coordinates for the structures... for example you could then locate containers anchored at random 14au+ savespots, which right now you have no way to do ingame, and the API really should not expose anything that is not available ingame. Just a guess of cause :) --Ana


The way I read this it's the other way around, anchored items are stored with x y z coordinates in the DB and the tower tree that calculates what moon-pos power\cpu consumption etc is done with DOGMA, naturally DOGMA is the great big curtain we players shouldn’t peek through and I agree with that.

If memory serves (although I wasn't entirely sober at the time so I'm not betting a steak dinner on it) The entire X Y Z hoopla got started with prismX (a dev at the least) suggesting sending those with an API call at last years wh roundtable or one of the third-party dev tables.

If that was to be the case I'm just saying I dont want to have the xyz columns with my regular assets



  1. I get a 50-60 000 item stacks in my assets dump, of which barely 800 are anchored in space items,

  2. This data wouldn't change all that often for me so why put the extra load on the assets call ?

  3. And I'm lazy, it's easier for me to write a quick script for a new api call and dump into a new table(since I want them separated anyways), than it is to go back into my assets script and fix that..


As for moonid, yea I can see that being enough for almost all corps but for us wh dwellers it's still not enough since we have up to half a dozen hangars and the same for sma',s per pos, sure it would help identify the pos just not the array itself.
And with the new online timers that's probably just going to grow.
Dragonaire
Here there be Dragons
#17 - 2011-12-28 16:11:07 UTC
I understand WHs add another complexity to working with POSes. Correct me if I'm wrong since I haven't done anything with WHs but my understand is there is only one per system at a time. If that's true if all of the other POSes in a system used moonID then the only POS stuff that would be left with solarsystemID would be the ones in the WH right? so it might still solve the problem just having the moonID on the ones where it's known. Just a thought anyway if my understanding is correct.

Finds camping stations from the inside much easier. Designer of Yapeal for the Eve API. Check out the Yapeal PHP API Library thread.

Messoroz
AQUILA INC
#18 - 2011-12-28 17:13:44 UTC
Dragonaire wrote:
I understand WHs add another complexity to working with POSes. Correct me if I'm wrong since I haven't done anything with WHs but my understand is there is only one per system at a time. If that's true if all of the other POSes in a system used moonID then the only POS stuff that would be left with solarsystemID would be the ones in the WH right? so it might still solve the problem just having the moonID on the ones where it's known. Just a thought anyway if my understanding is correct.


You can have as many POSes as there are moons, you can only anchor one POS per day however(because CCP is somehow unable to remove the old sov code for this).
Tarunik Raqalth'Qui
Native Freshfood
Minmatar Republic
#19 - 2011-12-28 17:39:17 UTC
Dragonaire wrote:
I understand WHs add another complexity to working with POSes. Correct me if I'm wrong since I haven't done anything with WHs but my understand is there is only one per system at a time. If that's true if all of the other POSes in a system used moonID then the only POS stuff that would be left with solarsystemID would be the ones in the WH right? so it might still solve the problem just having the moonID on the ones where it's known. Just a thought anyway if my understanding is correct.

One per moon, actually. (I know my home system has quite a few towers.)
Xander Hunt
#20 - 2011-12-30 22:13:57 UTC
Quote:

* So CCP doesn't save a moonID for starbase assets then? Surely there must be a way? Keep in mind im only asking for a moonID (wich is pretty static), no state or anything like that.

-- I am quite sure they save anchored structures with x/y/z coordinates, and then build the POSes from towers and their nearby modules. And there will be a number of reasons why they probably do not want to export the x/y/z coordinates for the structures... for example you could then locate containers anchored at random 14au+ savespots, which right now you have no way to do ingame, and the API really should not expose anything that is not available ingame. Just a guess of cause :)


I don't buy this explanation, honestly. Who's "Random save spots"? The corps "random save spots", and only assuming a container of some sort happens to be there. Even then, exposing that information isn't going to make a lick of difference because we can't have our ships warp to an XYZ location in game. Not to mention, its THE CORPS RANDOM SAVE SPOTS. I can understand perhaps back in the day with just the limited and full API keys, but we've got a hell of a lot more flexibility with the new API system in which a key can be made, or, a toggle for whether or not the information is present or not.

The DOGMA stuff and what we, the end users, aren't supposed to see I can somewhat understand. Real world corporate secrets, yadda yadda. The client gets the XYZ locations of the objects in space pretty close to instantly on warp in from the server (Its in no way cached client side - Think of when you first approach a POS for the very first time), I just don't understand why a similar call can't be built to request that detail and throw it into the API (Existing or new).
123Next page