Sign up Calendar Latest Topics
 
 
 


Reply
  Author   Comment  
DizzyKungFu

Registered:
Posts: 94
Reply with quote  #1 
After experimenting with the vesseldata.XML file, I timed various turning ratings with a stopwatch, and I noticed that the turnrate variable in the <performance> tag does not work as I expected.  For example:

turnrate="0.001" = 1.44 degrees per second
turnrate="0.002" = 4.29 degrees per second
turnrate="0.003" = 7.20 degrees per second
turnrate="0.004" = 10.06 degrees per second

So if this were a linear equation, 0.004 would be four times faster than 0.001. But instead, it is almost seven times! Can someone better at math than I am explain how this works?
NoseyNick

Avatar / Picture

Registered:
Posts: 65
Reply with quote  #2 
Looks pretty linear to me, but just doesn't cross zero. Maybe something like...
degrees per second ≈ turnrate * 2883 - 1.47 ?
NoseyNick

Avatar / Picture

Registered:
Posts: 65
Reply with quote  #3 
https://artemis-nerds.github.io/protocol-docs/#vessel-data-performance says:
turnrate (float, 0-n): How fast the ship turns. This number is in degrees per second divided by 2500.
If that's NOT correct (looks a bit off if your stopwatch measurements are accurate), let us know and we'll fix it   [smile]
DizzyKungFu

Registered:
Posts: 94
Reply with quote  #4 
Quote:
Originally Posted by NoseyNick
https://artemis-nerds.github.io/protocol-docs/#vessel-data-performancesays:
turnrate (float, 0-n): How fast the ship turns. This number is in degrees per second divided by 2500.
If that's NOT correct (looks a bit off if your stopwatch measurements are accurate), let us know and we'll fix it   [smile]


I'll fiddle with it, thanks! I've never seen this resource before! Great documentation! What version is this for tho?
NoseyNick

Avatar / Picture

Registered:
Posts: 65
Reply with quote  #5 
It tries to cover "all versions", realistically it's good from about v2.0 onwards. Some parts of the doc explain differences between different versions, EG Console Type <v2.1,  >=v2.1 <v2.3, or >=v2.3
v2.7.2 beta doesn't appear to have made any protocol differences notable enough to worry about, so the doc is still current.
Dave Thaler

Registered:
Posts: 452
Reply with quote  #6 
Quote:
Originally Posted by NoseyNick
https://artemis-nerds.github.io/protocol-docs/#vessel-data-performancesays:
turnrate (float, 0-n): How fast the ship turns. This number is in degrees per second divided by 2500.
If that's NOT correct (looks a bit off if your stopwatch measurements are accurate), let us know and we'll fix it   [smile]


http://artemiswiki.pbworks.com/w/page/117991854/Object%20Properties says
"The maximum turn rate, in radians per cycle. (~1/50 second)"
NoseyNick

Avatar / Picture

Registered:
Posts: 65
Reply with quote  #7 
1 radian per 50th-of-a-second would be about 2865 degrees/second, which is closer to "degrees per second ≈ turnrate * 2883 - 1.47" than "degrees per second divided by 2500" but doesn't really explain the "- 1.47" bit in @DizzyKungFu's stopwatch measurements. HMMMM, curiousser and curiousser!

Wouldn't they also depend on things like Engineering settings, BTW? Or are these enemies only?
NoseyNick

Avatar / Picture

Registered:
Posts: 65
Reply with quote  #8 
Created https://github.com/artemis-nerds/protocol-docs/issues/180 to track, research, confirm/deny, fix the artemis-nerds/protocol-docs.
ryleyra

Registered:
Posts: 2,917
Reply with quote  #9 
I did a lot of testing back in the day, but never bothered with testing turn rate in any detail because it is so hard to get accurate measurements. I don't know what DizzyKungFu's testing method was, but I would recommend recording a large number of revolutions so inconsistencies in starting/stopping the stopwatch, determining the exact angle of the ship, and other such variables can be reduced to a minimum.

My gut says the wiki is correct. I'm fairly sure that internally to the game code, angles are measured in radians. Commands that take angles in degrees are probably converted to radians before processing.

I'll add that cycles are not exactly consistent either.

DizzyKungFu

Registered:
Posts: 94
Reply with quote  #10 
My testing method was simple:  Put rudder max to right. Press start on stopwatch when heading is 0. Stop stopwatch once heading gets to back to 0. 360 divided by # of seconds to get degrees per second. This was done in the same ship, just changing the value of turnrate in vesseldata.XML and all engineering settings at 100.

I did each turn separately 2-3 times for verification and there wasn't much variation... maybe a second at most (when in doubt, I took the median result), *BUT* I agree with ryleyra that multiple rotations would probably have been more accurate. So there might be some fudge to my numbers, but I'm pretty sure they are in the ballpark. For example, if I was off by one second in either direction on turnrate=0.004 then it would be in the range of 9.79-10.35 degrees per second.

Turnrate=0.004 is very common in the vesseldata.XML file (and the first entry!). And the 2500 formula is almost exactly the 0.004 result that I got. So I wonder if someone just did the math on that one and just didn't look any further.
Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Easily create a Forum Website with Website Toolbox.