Digital Speedometer

View previous topic View next topic Go down

Digital Speedometer

Post by Tstageman on Wed Apr 25, 2012 6:32 pm

Guys,

Am trying to incorporate a digital speedometer into one of my tram cabs but have read through the guide on the Open website and it may as well be written in double dutch, it doesn't make the blindest bit of sense to me, anyone have any ideas where to start please?

Thanks

Tom
avatar
Tstageman

Posts : 154
Join date : 2011-10-21

Back to top Go down

Re: Digital Speedometer

Post by graymac on Wed Apr 25, 2012 7:03 pm

Probably the same principle as the digital clock, with code to link to the ats function for kph. I've done a digital clock but not the speedo. However, in OpenBVE the route clock is displayed (ctrl+C) and the speed is displayed (ctrl+V) so there is that in common.
In the clock the figures on the bitmap are shifted by the formula:

TextureShiftYFunction = 0.1 * floor[mod[time * 0.000277777777777778, 24] * 0.1]

so maybe if you substituted time for speed it would work.
Of course clock uses 12 units/hour and 60/min so speed might be simpler as its strictly decimal.
avatar
graymac

Posts : 1740
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Digital Speedometer

Post by Dexter on Wed Apr 25, 2012 7:55 pm

What kind of cab is that? 2D or 3D?
avatar
Dexter

Posts : 1824
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Digital Speedometer

Post by graymac on Wed Apr 25, 2012 8:37 pm

I think it HAS to be 3D construction for it to work. Animated file format is used for the clock, which is what I was thinking when I mentioned it.
If it is possible with a panel2 cab I would like to know, but I don't think it is.
avatar
graymac

Posts : 1740
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Digital Speedometer

Post by Dexter on Wed Apr 25, 2012 9:02 pm

graymac wrote:If it is possible with a panel2 cab I would like to know, but I don't think it is.

It actually is, digital clock (and also speedo) can be used in a panel2 based cab. Download this train, which will prove my words. I will incorporate the feature into an eventual new class 362 cab.
avatar
Dexter

Posts : 1824
Join date : 2011-07-08
Age : 31
Location : Brno, Czech republic

http://www.brnobve.eu

Back to top Go down

Re: Digital Speedometer

Post by graymac on Wed Apr 25, 2012 9:09 pm

OK Derryck, thanks for that tip! Very Happy
avatar
graymac

Posts : 1740
Join date : 2011-08-28
Location : Co Mayo, Eire

http://www.celtictrainsim.com

Back to top Go down

Re: Digital Speedometer

Post by Tstageman on Wed Apr 25, 2012 9:29 pm

Thanks for the replies guys, the cab I'm trying to build is a 3D cab but I've never attempted anything like this so its all a new theory. I'll maybe have a go at building a digital clock into the cab to see how I get on with that and then maybe attempt the digital speedo. I'll have a look at some others and see how theyre constructed but sometimes thats more confusing! What am I going to need to make this work like which components?

Regards,

Tom
avatar
Tstageman

Posts : 154
Join date : 2011-10-21

Back to top Go down

Re: Digital Speedometer

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum