I really need the exact formula for what I want to do...
Using the NavComp and a hipothetical travel from 0,0 to 500,0 I came out with the following formula:
T = 2 * (L - (25 * S)) / H
T is the time in hours
L is the lenght of the trip (500 in this case)
S is the skill level in piloting
H is the hyperspeed of the ship
It worked more or less accurately: In most cases the result was perfect, but in some others, the formula offered a result up to 2,5 hours shorter than the navigation computer. I assumed that this may be due to rounding of partial results.
However, when I tried with a different path (diagonal) I used Pythagoras to calculate the lenght of the trip. The result was disastrous: The formula's result was much, much higher than the actual result given by the nav comp.
So I really need to know the exact formula for this to work...
The thing with diagonal travel is that it take the same time to move one grid diagonally as it does on a straight line. So going from 500,500 to -500,-500 takes amount of time as it takes to go from -500,0 to 500,0. So the most you can travel is 1,000 grids in one trip.
EDIT: This little quirk works with all types of travel too. It's not just limited to sublight.
The amount of time it takes to move one "square" with the skill in piloting at 0 and at hyperspeed 1 is 7200 seconds.
This number decreases according to a certain formula as you increase the skill or the speed. I was able to come up with an estimate of this formula. Which result must always be a multiple of 18 seconds.
However, it seems to ramdomly round up or down. This is what I'm trying to figure out now...
Once you have the amount of seconds it takes for you to move 1 square, you just multiply by the total length of your trip.
Umm, is it even possible to discern a 18 second time difference, when the time is calculated every 3 minutes or so? In which case, it would seem that that equation would be fine, even for those values.
again, the piloting skills gives you a -5% reduction in your travel time for each level of piloting you have. So a skill of 3 will shorten your trip by 15% of the base travel time to that destination. Now I don't have the formula that is used to get hyperspace travel times down, but I do know that each time you double the hyperspeed it cuts the time down by half.
But through playing around with the Nav Comp it tells you what those base times are for yourself, so you can try to work out that formula yourself.
Remember that you have to multiply by the lenght of your trip. As Ralic stated, the longest possible trip is 1000 squares, so you would have a difference of 5 hours.
In a trip that lasts several days, this error is relatively low, but it interferes with some of the features that I would like to add to the program I want to create.
I haven't noticed that the fastests ships have a speed of 8... lol
Your times are true for a 1 square travel, but in long travels, the multiplication by the total number of squares would make it inaccurate. The correct times would be:
HS1 = 120
HS2 = 60
HS3 = 40,2
HS4 = 30
HS5 = 24
HS6 = 20,1
HS7 = 17,4
HS8 = 15
About the piloting skill, the 5% is more or less accurate. As the actual formula does some misterious rounding, this won't allways work.
The nav comp actually is not completely accurate to begin with. I recall seeing one ETA when using the navcomp, and having a completely different, albeit lower, ETA when I actually conducted the hyperjump. Differences varied from minutes to nearly half a day, depending on location (yes, all updated coordinates and skill considered).