PDA

View Full Version : OutGuage - for T6... comments wanted!


Scawen
28th April 2006, 13:33
Right, I've quickly coded up this OutGuage system by duplicating OutSim and changing it. It's needed for anyone who wants to make an external dashboard. I have tried to include all the info you would want on the dash. Please let me know if anything's missing.

It works like OutSim, you can start it with the cfg.txt or by sending an InSim packet. Then the viewed car will send the following information in a UDP packet, at the specified rate.


#define OG_KM 1
#define OG_BAR 2
#define OG_SHIFT 4
#define OG_HANDBRAKE 8
#define OG_TC 16
#define OG_REDLINE 32
#define OG_PITSPEED 64

struct OutGuagePack
{
unsigned Time;

char Car[4]; // Car name
word Flags; // Combination of OG_FLAGS
byte Gear; // Reverse:0, Neutral:1, First:2...
byte SpareB;
float Speed; // M/S
float RPM; // RPM
float Turbo; // BAR
float EngTemp; // C
float Fuel; // 0 to 1
float Spare1;
float Spare2;
float Throttle; // 0 to 1
float Brake; // 0 to 1
float Clutch; // 0 to 1
char Display1[16]; // Usually Fuel
char Display2[16]; // Usually Settings

int ID; // if GameID is specified
};

xaotik
28th April 2006, 13:37
That is awesome news.
...btw, isn't it "gauge"?

EDIT:
How about adding the tyre condition, temp/suspension damage information?
Not exactly dashboard info but it could be used for some external "pitcrew" like app that gives you damage rep and such instead of having to cycle through the overlays to check things out...

EDIT 2:
Oh yeah - and the pit limiter.

Hyperactive
28th April 2006, 13:44
I don't see the direction indicators there...?

Theafro
28th April 2006, 13:50
:doh:


I'm assuming we'd need a seperate program to take those UDP jobbies and send them to a port in the desired manner :shrug:

BTW is it too early to ask for an oil pressure guage? it doesn't have to really do anything (yet) but maybee move a little when you rev:D

good plan tho scawen :thumb: been waiting for something like this to complicate my cockpit setup :tilt:


edit: and headlights (all 3 kinds would only be needed once we get real-time lighting)

Scawen
28th April 2006, 13:53
Ok, indicators, headlights, full beam and oil pressure added to the GAUGE system! :D

(pit limiter is already there - OG_PITSPEED)

Si_Si
28th April 2006, 13:59
Sounds very interesting. I'd add instructions tho lol

xaotik
28th April 2006, 14:08
Sounds very interesting. I'd add instructions tho lol

Check the docs/Insim.txt file in your LFS installation directory.

Si_Si
28th April 2006, 14:12
Check the docs/Insim.txt file in your LFS installation directory.

That document means nothing to me:pillepall lol

BlakjeKaas
28th April 2006, 14:18
IRL when you have problems with your car, you can press in the console of the car on a triangle and then both indicators go on, will that be in the car, and will it flas when it's pressed?
p.s. maybe we need something like windscreenwiper fluid almost empty thing....[it's also a hint for adding wipers] [the previous hint is also a hint for adding rain :) ]

oh yeah, so if I get it right there will be better lights?

Theafro
28th April 2006, 14:22
Hazard warning lights :thumb:

axus
28th April 2006, 14:27
Awesome - I've been looking forward to this for a while, because it had been mentioned before. One quick question, will there be a way to put it on the car in LFS or will one need an enternal display for the info on this dash?

JogDive
28th April 2006, 14:28
nice new feature !

Scawen
28th April 2006, 14:31
Yes hazard warning is included, I will light the L and R indicators.

Axus, this is for external programs, to make external dashes, or anything else they want to do with this info. It's not for LFS internal use. This info is already displayed on the dash inside LFS so I'm not really sure what you mean anyway.

BTW, it is now renamed to "OutGauge". Funny that I've always got that spelling wrong.

BlakjeKaas
28th April 2006, 14:31
Hazard warning lights :thumb:
yeah, that! :)

xaotik
28th April 2006, 14:32
One quick question, will there be a way to put it on the car in LFS or will one need an enternal display for the info on this dash?

Take it out of LFS just to ... put it back in LFS?
You could do it by hijacking d3d, like Kegetys does his Ghost Car app... but other than an exercise in programming it wouldn't really help much. This is more for a physical cockpit deal (but it can also be used for some realtime basic telemetry from insim apps).

axus
28th April 2006, 14:33
Take it out of LFS just to ... put it back in LFS?
You could do it by hijacking d3d, like Kegetys does his Ghost Car app... but other than an exercise in programming it wouldn't really help much. This is more for a physical cockpit deal (but it can also be used for some realtime basic telemetry from insim apps).

Well this could allow users to make pretty looking dashes for the GTR cars without it taking as much time for Scawen...

GeForz
28th April 2006, 14:37
Then the viewed car will send the following information in a UDP packet, at the specified rate. [...]
float Fuel; // 0 to 1
char Display1[16]; // Usually Fuel
char Display2[16]; // Usually Settings[...][/CODE]

Does that mean you can view Fuel from other racers while spectating??

xaotik
28th April 2006, 14:41
Well this could allow users to make pretty looking dashes for the GTR cars without it taking as much time for Scawen...

The amount of trouble to do that properly using this is almost more than editing the current models in the game. :)

Scawen
28th April 2006, 14:59
Does that mean you can view Fuel from other racers while spectating??No, the standard rules for displaying values are also applied to the values sent to OutGauge.

sdether
28th April 2006, 15:42
I've looked the spec over a couple of times and the only thing that's not in there (and strictly speaking not Guage info anyway) would be the info from F9-F12 with emphasis on F9 and F10. Adding that would be icing on the cake. Either way, that information is going to fantastic. I've got a serial LCD that I've been toying with and I'm also looking into using a WinCE device (way overkill, but it opens up so much). I think outGauge will spawn a lot set of new unofficial add-ons.

Thanks Scawen!

CrazyICE
28th April 2006, 15:43
damn...if i only have more time for doing some nice tool...
omg...damn...

(sorry, but i'd love doing some thing with that, but there are so many to do's)

but if i got time, expect something from me :)
i have an idea already :)

Scawen
28th April 2006, 15:52
I've looked the spec over a couple of times and the only thing that's not in there (and strictly speaking not Guage info anyway) would be the info from F9-F12 with emphasis on F9 and F10. Adding that would be icing on the cake. Either way, that information is going to fantastic.Thanks. In fact F11 is there - Display2 - provided you are in a Formula car - because live settings are in real life done on the steering wheel (in some cars). Though F11 is quite lacking in LFS at the moment, needs live diff settings and some other things.

There's a case for F12 on the dash in LFS, though in real life you'd just talk on the radio about pit settings.

F9 and F10 I would suggest as an OutSim extension - as you say they aren't anything to do with guages - they are quite fake really, but as they are car state things they should probably be in an extended OutSim packet - that's debatable anyway - not for version U though.

CrazyICE
28th April 2006, 16:03
i see, throttle and brake is also availabe...coOL
so making a screen like in the FIA F1 is now possible...how coOL!

scawen...what shall i say...
don't find words :D

Frankmd
28th April 2006, 16:18
I see EngTemp in there. What about Tyre temperatures and wear? Altough I guess it should then be renamed to OutTelemetry, and I dont think it is the point of this OutGauge thing :)

tbh, I think the reason for not putting tyre info in there is the size of the packets :) 48 tyre-simulationpoints, right?

Edit: maybe I should read the complete topic before frantically rushing for the Post Reply button :tilt:

Frankmd
28th April 2006, 16:23
Well this could allow users to make pretty looking dashes for the GTR cars without it taking as much time for Scawen...

I guess waiting just a little bit longer until Eric has done new GTR interiours would be the best option :)

inCogNito
28th April 2006, 16:55
so who's making a nice G15 applet now? :)

Theafro
28th April 2006, 17:11
I'm well up for testing this new system out. I'm pretty good with hardware but i suck at software!

I've been looking into what the flight sim boys are doing and they seem to be using a usb interface board

like this one-

http://www.simkits.com/product.php?prodid=343

they supply software with it that interfaces with M$FS but i'm sure the code monkeys out there could figure out how to get it working with LFS.

It looks like the controller would work with homebuilt gauges using standard servos (usually found in model shops for R/C stuff) so that means i can build a rig nice and cheap (flight sim gauges are seriously expensive!)

BTW the controller board is 89 euros ( about 60 quid)

Kegetys
28th April 2006, 17:20
Couldn't all this just be added to OutSim (Also with the data from tires and everything from the HUD)? I find the InSim and OutSim separation already a bit confusing since you need to use different methods and protocols to retrieve very similar things, like with InSim there's only two axis rotation data available so to get the third axis you need to add code to handle OutSim. With yet another protocol for gauges, and an extended outsim later on would just make things even more complicated when you need to use so many different ways to retrieve very similar data. Like laptimes = InSim, Car position = OutSim, Gauges = OutGauge... You often need data from all of these anyway so separating them to different protocols seems to me like it will just add unnecessary complications for people using them...

Scawen
28th April 2006, 18:14
Fair point but there are already several programs out there using OutSim, so I don't want to just change the packet size. Also, you may want OutSim data at 100 Hz but for the purposes of gauges, you only want OutGauge at maybe 10 Hz. Also maybe you want to run Gauges but you aren't running a motion platform...

They are just two different packets really, and each "system" can be kicked off by one simple packet from InSim.

I'm closing this thread now, as the system is now released in T6. Here is a special OutGauge thread :

http://www.lfsforum.net/showthread.php?t=7334