Jump to content
Sign in to follow this  
Guest BratZ

Speedometer formula

Recommended Posts

Guest BratZ

Anyone have a formula for my speedometer?

6.jpg

Notice how its not equal all around?

Share this post


Link to post
Share on other sites
Guest BratZ

Nobody? If I ever figure it out,I will post the formula here

Share this post


Link to post
Share on other sites

I don't know anything about the config files or anything for the speedometers or anything...but if you can use a formula to make the pin rotate around I'm sure a formula could easily be made biggrin_o.gif

I'm guessing the speed is represented as

the resultant of the x and y velocities devided by 60 min?

Also if you can use formulas what would be the output?

degrees/radians of rotation?

If you can use formulas i could do some tests and fit a curve for ya...would only take a couple min. looks like it would be an exponential curve of some sort

Share this post


Link to post
Share on other sites

oops I'm crazy there is a command for getting the speed...

:::hits head:::: whew where is my thinker?

but yep if you can manipulate the rotation by feeding it degrees then i'll try and help ya out!

Share this post


Link to post
Share on other sites
Guest BratZ

Ya its some equation,I'm gonna be working on it.Its on my list of ToDo's.

Was hoping someone knew one off their head, rather than me getting braincramps trying to figure it out,lol

Thanx for trying

Share this post


Link to post
Share on other sites

lol...no problem... I'm just going to take the picture and figure out how many radians clockwise from zero to each number and then try fitting a log curve to it.... (radians vs. speed) might not be perfect crazy_o.gif

ill try!

Share this post


Link to post
Share on other sites
Guest BratZ

Hmm your right,I could script that and make it totally accurate.Speed vs. animationphase

But the formula for the oem speedometer would be in degrees and I'd rather try to figure that out

Heres one from Biscamel that converts to knots,I dunno if its accurate:

class IndicatorSpeed

{

selection="mph";

axis="osa_mph";

angle=-360;

min="50 / 2";

max="170 / 2";

};

But I notice that the BisCamel speedo also isnt symetrical

110 knots dead bottom,180 knots top

Again tho, whats saying that its tweaked to accuracy, I am probably being too fussy here, but its the only thing left and then I can eleiminate the onscreen graphic for it

Its a good finishing touch I think

Already have working gas gauge and even rolling wheels

This plane will be the kitty cat of ww2 fighters,lol

Share this post


Link to post
Share on other sites

haha...sounds pretty sweet

hmmm....can you call commands within a config...

like getting the speed?

hmmm.....ive been sitting here trying to make an equation ...it will fit part of it but then will be way off near the 600 speed

hmmm..i guess there is no way to do a script for it...

it would be really easy to do if you could break it down into 3 separate equations... but the way the configering won't allow it.

Share this post


Link to post
Share on other sites

The dial is probably marked up logarithmically, that way, at the faster speeds the needle moves less and less to indicate a greater increase in speed.

How the Game engine handles it tho, I do not know...

Share this post


Link to post
Share on other sites

Well yes the proper way to handle this is to create a polynomial through some curve fitting (speed vs Radians or preferrably degrees), however if you don't have experience in this it may be a little difficult to grasp. (Newtons divided differences or cubic splines are a good example http://www.ittc.ku.edu/~rvc/documents/781/report_3.pdf)

The other solution is less accurate but quite simple:

We will divide the scale into 4 separate ranges

[*] 0 - 50 knots = 0 - 10 degress = 10deg/50knots = 0.2

[*] 50 - 250 knots = 10 - 222degrees = 212deg/200knots = 1.06 deg/knot

[*] 250 - 300 knots = 222 - 247 degrees = 25deg/50knots = 0.5 deg/knot

[*] 300 - 600 knots = 247 - 337 degrees = 90deg/300knots = 0.3 deg/knot

Now through a set of if statements you can get a nice output

if speed <=50 then angle = 0.2 * speed

else if speed <= 250 then angle = 10 + (1.06 * (speed-50))

else if speed <= 300 then angle = 222 + (0.5 * (speed-250))

else angle = 247 + (0.3 * (speed - 300))

end if

EDIT: actually the first 50knots needs to be accounted for also, I'll fix that in a few

EDIT2: done

Share this post


Link to post
Share on other sites

Okay added another scale, that makes 4 different linear equations for the speedo, and it should display pretty nicely. You may need to use a constant multiplier(like Km to Knots) on the speed before you pass it into any of the equations.

Share this post


Link to post
Share on other sites

Wow thanks but oops.

Where my speedo pic go? lol

I guess I threw it offtrack showing the Biscamel speedo,but thats the only speedometer offhand I found that even had a formula in it. And its in knots

An american F4U speedometer i believe should be mph,but I will settle for the metric kmh,but the bis oem speedo shows mph

So really just looking for a formula for the difference in the speedometer pie

I can work off what Bn880 has laid out as its going to take calibration anyways

Share this post


Link to post
Share on other sites

oops i was fitting the curve to the one shown on the post.

I found all of the degrees of rotation to each number from zero.

It turns out to be linear in 3 sections

0 to 50

50 to 250

and 250 to 600

i was trying two different ways. using excel to do a trend line..but it doesn't work

then trying to fit a logrithmic equation to it.... biggrin_o.gif

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×