I want to create the web-page with Trade Calculator

Forum Archive - from http://theuniversal.net
User avatar
Max Brown
Posts: 88
Joined: Tue Nov 20, 2007 10:54 am
Location: Obninsk science-city (Russia, region 40)
Contact:

I want to create the web-page with Trade Calculator

Post by Max Brown »

Dear Stuff,
i asked in tread http://www.theuniversal.net/forum/viewtopic.php?t=7208 Yours permission to create an russian web-page of Yours game. I received no reply (maybe because this topic was placed into wrong sub-forum) and this time i have another question:
I developed and placed at my site the online "Trade Calculator" for TheUniversal. (Online - because i don't know any program languages except PHP).
My calc takes as input:
1. How many Gal.Credits have a user
2. What cargo capacity he(she) have
3. Does she(he) have an InfImp drive
4. What star systems to seek
Calc outputs a list of the morest profitable trade races in choosed star systems.

Q: May i place a hyperlink to this calculator page at Yours forum? (Back link to TheUniversal.net will be placed at the calculator's page)
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

That wouldnt be a problem.. in fact, if you check out: http://www.partialdifferential.com/hosted/tutrade/

theres a pretty handy one theseer created.. check out the readme. This page includes an item locator, a planet trade browser and trade route finder i believe... its player-input based.. the readme explains how to submit to the database... real useful if its used properly.
User avatar
Max Brown
Posts: 88
Joined: Tue Nov 20, 2007 10:54 am
Location: Obninsk science-city (Russia, region 40)
Contact:

Post by Max Brown »

morbydvisns wrote:That wouldnt be a problem..
Thanks you, but i must have a permission from TheUniversal team.
morbydvisns wrote: in fact, if you check out: http://www.partialdifferential.com/hosted/tutrade/
My calc will be more usefull for trade (more "intellectual") :-) and will have information update engine. And (no matter for you, but critically important for russian players) it have a bilingual (rus+eng) user interface.
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

well ok but im telling ya... it wont even be an issue. Anything providing game information to help players is appreciated, so long as it A: doesnt tell players how to use blatant game cheats and exploits, or B: doesnt disclose the locations of the galactic aliens.


but if youd rather wait for mit, or fooli, or magicfinger to personally tell ya thats fine..... theyve all been pretty busy recently so really now telling how long you may be waiting.
User avatar
zaroba
World Owner
World Owner
Posts: 7257
Joined: Fri Oct 10, 2003 11:06 pm
Location: Hereford, PA
Contact:

Post by zaroba »

wait time can be anywhere from 1 hour to 1 year :P
User avatar
Max Brown
Posts: 88
Joined: Tue Nov 20, 2007 10:54 am
Location: Obninsk science-city (Russia, region 40)
Contact:

Post by Max Brown »

zaroba wrote:wait time can be anywhere from 1 hour to 1 year :P
Ok, i'll think that "not prohibited is permissed" :-)
User avatar
Max Brown
Posts: 88
Joined: Tue Nov 20, 2007 10:54 am
Location: Obninsk science-city (Russia, region 40)
Contact:

Need volonteurs to measure star distances

Post by Max Brown »

BTW, for my Calc i need to re-build (i.e. fill into my database) galaxy map (i.e. map of stars). And i need a help from somebody, who have a long-range StarDrive (i.e., more than 40pc.
The map will be constructed as a table {StarName; X-coordinate; Y-coordinate}.
The zero point, i suppose, will be the star M-389 "Dude" {M-389; 0; 0} in the top left ("Nord-West") corner. I have allready reached this star.
The method of map construction is "triangulation". For more precision, volonteur must reach as souther star as this is possible at left side of the map, the star M-350 in the left bottom ("South-West") corner is preffered. This star will be a {M-350; 0; Y0} second point of measure and we draw the absciss-axe trought stars Dude and M-350. The value Y0 can be found as the distance between this star and Dude.
Then we must open (F6) galaxy map and measure distances from this star to all (except M-389 "Dude") stars in the galaxy.
In our coordinate system, The X- and Y- coordinates of each star we can calculate from two eguations:
Let L389 = distance between the Star and Dude.
Let L350 = distance between the Star and M-350.
Then,
L389*L389 = X*X + Y*Y;
L350*L350 = X*X+ (Y0-Y)*(Y0-Y).
solving this system of equations:
Y = ( L389*L389 + Y0*Y0 - L350*L350 ) / ( 2 * Y0)
X = sqrt ( L389*L389 - Y*Y )
User avatar
Max Brown
Posts: 88
Joined: Tue Nov 20, 2007 10:54 am
Location: Obninsk science-city (Russia, region 40)
Contact:

What i need this for?

Post by Max Brown »

What is a target of galaxy map database?
Having a X- and Y- coordinates of any star, we can calculate the distance between any 2 stars:
Let X1 and Y1 are coordinates of 1st star (where we buy a goods)
Let X2 and Y2 are coordinates of 2nd star (where we wish to sell this goods with a big profit)
The distance between this stars L=sqrt( (X1-X2)*(X1-X2) + (Y1-Y2)*(Y1-Y2) ).
And we can know, is the 2nd star reachable from 1st star with one StarDrive-jump (depending on range of Star Drive that player have).
User avatar
fhko
VIP
VIP
Posts: 930
Joined: Sun Mar 27, 2005 10:38 pm
Location: As I awake I find myself in a strange new place.

Post by fhko »

The conversion method I gave you via email can get you the position of the stars to within a relative error of about 2% (greater for shorter distances). I can try to get a closer approximation if it is really needed but I get the feeling only a rough distance estimate is needed.
User avatar
Max Brown
Posts: 88
Joined: Tue Nov 20, 2007 10:54 am
Location: Obninsk science-city (Russia, region 40)
Contact:

Post by Max Brown »

fhko wrote:The conversion method I gave you via email can get you the position of the stars to within a relative error of about 2% (greater for shorter distances). I can try to get a closer approximation if it is really needed but I get the feeling only a rough distance estimate is needed.
Thank you, but Your's map has not enought resolution (not enought precision) for
calc's purpose. I seen, sometimes some stars at the short map are near the circle that shows the StarDrive range. I think, the creators of the game have designed this map
especially so: to provide various accessible of stars depending on both
range of stardrive and type of ship. It means, sometimes even 2% will
be enought to have a mistake.
User avatar
Max Brown
Posts: 88
Joined: Tue Nov 20, 2007 10:54 am
Location: Obninsk science-city (Russia, region 40)
Contact:

Trade Route Calculator

Post by Max Brown »

I done.
I haven't reach stars in corners of the galaxy map, i too tired to write down the data about all stars, but for the left top corner of the galaxy all works! And (as i seen) my online best-trade-route calculator and the dynamic map generator both works corretly.
Fhko, Zaroba and Morbydvisns! I ask you, test please my calc before i'll promote it to novice players.
Hyperlink: http://obninsk.name/universal/calc.php; the Map Generator opens when you click any star in list.
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

glanced over it a min,... pretty smooth.
User avatar
lensman
Posts: 153
Joined: Sun Apr 30, 2006 7:13 am
Location: Land Down under ( I is a Sandgroper )

Re: Need volonteurs to measure star distances

Post by lensman »

To me this is a waist of time when the game all ready can tell you the distance from point A to point B.
I will give 2 ex-samples:
In game cal says the distance from sys 209 to sys 350 is 576.20 parsecs, as the crow flies or the X- and Y- coordinates . But the distance I fly is 738.22 parsecs, this is with a 50.5 parsecs stardrive jump.
In game cal says the distance from sys 209 to sys 495 is 716.35 parsecs, as the crow flies or the X- and Y- coordinates . But the distance I fly is 984.59 parsecs, this is with a 50.5 parsecs stardrive jump. ( Fuel tank holds 400 uridium )

But if you want to do a program for yourself go for it. Read below for some helpfull infor.
Max Brown wrote:BTW, for my Calc i need to re-build (i.e. fill into my database) galaxy map (i.e. map of stars). And i need a help from somebody, who have a long-range StarDrive (i.e., more than 40pc.
The map will be constructed as a table {StarName; X-coordinate; Y-coordinate}.
The zero point, i suppose, will be the star M-389 "Dude" {M-389; 0; 0} in the top left ("Nord-West") corner. I have allready reached this star.
The method of map construction is "triangulation". For more precision, volonteur must reach as souther star as this is possible at left side of the map, the star M-350 in the left bottom ("South-West") corner is preffered. This star will be a {M-350; 0; Y0} second point of measure and we draw the absciss-axe trought stars Dude and M-350. The value Y0 can be found as the distance between this star and Dude.
Then we must open (F6) galaxy map and measure distances from this star to all (except M-389 "Dude") stars in the galaxy.
In our coordinate system, The X- and Y- coordinates of each star we can calculate from two eguations:
Let L389 = distance between the Star and Dude.
Let L350 = distance between the Star and M-350.
Then,
L389*L389 = X*X + Y*Y;
L350*L350 = X*X+ (Y0-Y)*(Y0-Y).
solving this system of equations:
Y = ( L389*L389 + Y0*Y0 - L350*L350 ) / ( 2 * Y0)
X = sqrt ( L389*L389 - Y*Y )
For the above sys 389 will be no good as a point of measurement.
If you draw a line up from sys 350 to sys 68 and sys 352. Then draw a line acros from sys 397 and sys 275 to get a 90 dec angle for the top left corner.
For the other 2 90 dec angles.
Draw a line up from sys 60. Then draw a line acros from sys 397 and sys 275 to get a 90 dec angle for the top right corner.
Draw a line across from sys 350, sys 108 and sys 217. Then draw a line down from sys 60 to get a 90 dec angle for the bottom right corner.

As for precision distance from sys to sys that will take some time plus a .cvs trade report.
I am re-visiting all of the star sys to get a .cvs trade report for my self plus the distance from sys to sys. I can pass this infor on plus a map of the unv with or with out sys numbers. As I said this will take some time hope to be fin by Xmas at the latest.

I is a Sandgroper 8)
Lensman

[/code]
User avatar
Fooli
Staff
Staff
Posts: 1957
Joined: Sun Oct 05, 2003 2:38 pm
Location: Mars

Post by Fooli »

While we applaud the ingenuity of these efforts... we're not sure we approve...
f
User avatar
Max Brown
Posts: 88
Joined: Tue Nov 20, 2007 10:54 am
Location: Obninsk science-city (Russia, region 40)
Contact:

Post by Max Brown »

Fooli wrote:While we applaud the ingenuity of these efforts... we're not sure we approve...
Fooli, tell me please more clearly, what doesn't you approve?
For yours comfort, i prepared my questions binary-answerable:
1. May i create at my web-site an russian non-official page of TheUniversal game? (Hyperlinks to the official site will be placed at every page).
2. May i partially use design style of the site TheUniversal.net?
3. May i place at non-official page my Trade Route Calculator?
4. May i fill into my database the full galaxy map?
5. Maybe, a good idea is "to allow each user an access to calculations, based on his/her own TradeReport.csv data only"?
User avatar
morbydvisns
Posts: 1889
Joined: Sun Jan 30, 2005 12:51 am

Post by morbydvisns »

zaroba wrote:wait time can be anywhere from 1 hour to 1 year :P
PostPosted: Sun Dec 02, 2007 7:24 am Post subject:
While we applaud the ingenuity of these efforts... we're not sure we approve...
f

~1.5 weeks... zar was right dead on XD


my guess to 'non approval' is the availability for any newb to go and undermine the veteran traders hardwork in finding routes, and keeping a good route secret =)


while i would rather not have this happen, keeping a personal log and compiiling on a per user basis would be neat, i think.......


or just encrypt the tradereport.cvs =)
User avatar
Max Brown
Posts: 88
Joined: Tue Nov 20, 2007 10:54 am
Location: Obninsk science-city (Russia, region 40)
Contact:

Post by Max Brown »

morbydvisns wrote:my guess to 'non approval' is the availability for any newb to go and undermine the veteran traders hardwork in finding routes, and keeping a good route secret =)
5. Maybe, a good idea is "to allow each user an access to calculations, based on his/her own TradeReport.csv data only"?
This means: if user have uploaded a .scv file, script will calculate using this .csv file; if haven't uploaded - user will see, for example, trade routes in Cirrus Minor system only.
I think, manual calculations of trade routes in more than 100 star systems is not a job for human. This is a job for computers.
If a player uses, for example, M$ Excel(MD) and VB-script to process his TradeReport.csv file - who may disallow this? Nobody!
But i don't know VB enought to write my calc in VB. I know PHP only.

BTW i am ready to open my script's source code - if this isn't "non approval" too.
User avatar
Max Brown
Posts: 88
Joined: Tue Nov 20, 2007 10:54 am
Location: Obninsk science-city (Russia, region 40)
Contact:

Re: Need volonteurs to measure star distances

Post by Max Brown »

lensman wrote:For the above sys 389 will be no good as a point of measurement.
If you draw a line up from sys 350 to sys 68 and sys 352. Then draw a line acros from sys 397 and sys 275 to get a 90 dec angle for the top left corner.
No matter, what 2 of 512 points will be the coordinate base at the flat. I.e., no matter for the distance calculations for 1 (once more: ONE) jump. But important is the distance between this 2 points; And (to simplify computing) is good if all other stars are in the same half-flat relatively a line between this 2 points.
About "distance measured and distance that you need to go": distances are calculated only as a direct lines, not polygons.
If you want to calculate more then 1 jump, this is possible too: you just need calculate each jump length and then sum this lengths. But this isn't implemented in current version of my calc because recursive calculations with the morest quantity of jumps can over-use server processor time units.
Now calculating for "let me try 2-3 jumps" is not exact.
theseer
VIP
VIP
Posts: 782
Joined: Sat Dec 04, 2004 9:50 am

Post by theseer »

How did you get the approximate-coordinates of the stars and planets? (I could get some info with trig but with my knowledge it wasn't quite enough). That was the main problem for me attempting a similar system, although I don't need them any more because your calculator is fantabulistic, I'm curious.
User avatar
Max Brown
Posts: 88
Joined: Tue Nov 20, 2007 10:54 am
Location: Obninsk science-city (Russia, region 40)
Contact:

Post by Max Brown »

theseer wrote:How did you get the approximate-coordinates of the stars and planets?
I have get "nearly exact", not "approximate" coordinates. Re-read this topic, i have described my method. And i doesn't know english enought to describe it more understandable.
Locked