Jump to content

Recommended Posts

Posted

There are two things that I want to do.

First is to export and write flight data into a text file.

Then I want to see how I can export the data to control a stepping motor, or simply a LCD display.

Any ideas? Can working gauges be made this way?

Posted

It's very simple to do. In the export.lua file there are instructions for saving flight data to a file and sending it to a UDP socket. I and a friend of mine have working input/outputs (for led lights and switches) and textLCD functionality (used for displaying navigation or weapon information). We use Phidgets (http://www.phidgets.com) and I just received the first servo controller and we'll be doing gauges sometime in the near future. I'm not sure if the Phidgets' servo controller is versatile enough to do all the gauges, but some of the simple ones should be doable.

 

Our software doesn't use UDP sockets to send data, we interface directly with the Lua export instead. This should be a more robust option and save some CPU cycles as well. Inputs, outputs and the textLCD have been tested and they work pretty well. Now if only there were separate ON and OFF functions for the laser and a cooling sequence override I'd be a little happier.

My blog full of incoherent ramblings on random subjects: https://anttiilomaki.wordpress.com/

Posted

Thanks, though I don't fully understand all these. But I agree that LOMAC only gives toggle commands, which made pit building a problem.

 

BTW, I and my friend are thinking about exporting the data to the game computer itself, then through the printer port (parallel port) to a programmed FPGA (not sure what it can do, only my friend does, some kind of logical chips), which in turn drives whatever we want to.

Is this a clumsy method?

 

EDIT: We are looking at this option because it seems to be a lot cheaper than buying commercial cards. Same for making switches, I know there are something like EPIC card, or keboard emulator, but they cost a ton. Are there cheaper options out there?

Posted

I'm sure your friend knows enough to get the export running if he can do parallel port stuff. Your method is pretty much what all the devices designed for simulator gauges usually do. I think it is slightly inefficient to use UDP server if you don't send the data to another computer, but in reality I doubt it'll make much difference. You should be fine.

 

You can test the export by using the built-in file functionality. MAKE A BACKUP OF THE FILE NOW. Go to export.lua and you'll see lots of good instructions on how to do it. Near the beginning you'll find something like "uncomment this function to enable data export" and the line after that is --[[. That is a "comment" which means that anything between that group of characters and the next instance of --]] is ignored by the program. Add one - into the first comment marker and it'll look like this: ---[[. Now your data export is enabled, congratulations.

 

Next you'll notice that there are lines 1) file in a few spots in the file.You need to uncomment the lines after this line until the 2) Socket lines. The first part in the LuaExportStart function should look like this:

 

-- Make initializations of your files or connections here.

-- For example:

-- 1) File

local file = io.open("./Temp/Export.log", "w")

if file then

io.output(file)

end

-- 2) Socket

 

Note that I removed the -- from every line in the file section. If you do that to the two other places that have the "1) File" in them you whould have a file called export.log in the Lock on \Temp -folder after you next time fly a mission in Lock on. An easy way to get started. If you need to send the data to a UDP client you just uncomment the "2) Socket" -parts. It's very simple to get going. The rest of the work comes from choosing what to export and how.

 

Hmm I wonder where my sig went? Well, here it is again:

 

Lock on must have toe brake functionality with differential braking!

My blog full of incoherent ramblings on random subjects: https://anttiilomaki.wordpress.com/

Posted

Phidgets are cheaper than EPIC and they seem to be pretty usable from my preliminary tests. http://www.phidgets.com. They have some sort of a software interface you can base your projects on. I'm not convinced that their servo controller would be capable of handling all the functions needed for gauges, though.

 

There are other manufacturers out there, for example http://www.simkits.com. I don't remember the websites, but many DIY kits are quite affordable.

 

Lock on must have toe brake functionality with differential braking!

My blog full of incoherent ramblings on random subjects: https://anttiilomaki.wordpress.com/

Posted

Though I haven't got v1.1 at hand, I read the new LUA script here

 

http://lockon.ru/index.php?end_pos=567&scr=default&lang=en

 

So I can only export what it allow me to?

Let's say I want to export the weapon that I currently choose, so it can be used to drive those indicator lights under the HUD. But the script doesn't seems to provide this data, does that mean I have to wait for ED to provide this option?

 

Oh, and where are those smilies? I can only add them to the title bar. :D

Posted

Reviewing the commands, I noticed there doesn't seem to be a thing for the VFD and RWR screens...

 

Are the MFD/VFD and RWR screens exportable?

Thanks,

Brett

Posted

Dammit!

Same thing that stops me from building a pit for F4 is here also....

 

Conspiracy! I say... Conspiracy! :)

 

ED, can you please post if you plan to encorporate this?

Thanks,

Brett

Posted

Our software doesn't use UDP sockets to send data, we interface directly with the Lua export instead. This should be a more robust option and save some CPU cycles as well.

 

Sorry for bumping this old thread, but after a long research, I still can't find a way to not using UDP socket, how can you interface with the Lua export directly?

Even if I can send it to a UDP port, I can't find an existing program to exchange the data with a serial port. Wtriting the program from scrap is pain.

  • 4 months later...
Posted

There is Locked Target info as well as Emitter information available for Radar and TWS (Threat Warning System) .

 

Too bad LOMAC doesnt give us a "Second view" we could place on our second monitor (like zoomed into the MFD) and leave it there. Then that would work great for a pit.

 

:cool:

When all else fails, Eject then read the manual.

Oh, and a good wingman helps.

Posted

Oops I didn't notice this earlier. Anyway, it's possible to call C functions from lua and that's what we did. I can't help you with serial port stuff, we don't use that. Like I said you shouldn't have any problems if you just send the data via UDP.

My blog full of incoherent ramblings on random subjects: https://anttiilomaki.wordpress.com/

Posted

I assume LUA could be used to export player stats (Kills, deaths, sorties, etc) from a server to a wep page of some sort. If that is done, would the server be open to AWACS cheats?

Posted

Actually no, you cannot export that data through LUA, sadly. I have asked for event exports but they have not been implemented yet.

 

This isn't open to cheats; the danger with cheating is if you disable the server's ability to force its own export.lua on the client - then the client executes its own export.lua.

[sIGPIC][/sIGPIC]

Reminder: SAM = Speed Bump :D

I used to play flight sims like you, but then I took a slammer to the knee - Yoda

Posted

You could do it on the fly, but for programming convience, post-processing (ie. when the mission finishes) is easier.

 

There is also the issue of aircraft being logged as 'crashed' when they exit the game, so you can't distinguish disconnects from legitimate destruction easily.

[sIGPIC][/sIGPIC]

Reminder: SAM = Speed Bump :D

I used to play flight sims like you, but then I took a slammer to the knee - Yoda

Posted

Even if I can send it to a UDP port, I can't find an existing program to exchange the data with a serial port. Wtriting the program from scrap is pain.

 

Well I just did, ;) both export trough a Port receiving it in a app. then resending it to an Serial LCD from MatrixOrbital. shoving bullseye info on your aircraft only

and the Server still pushes it's Export.lua (my version of it) wich in turn means

that every client in this case can have Lat & Long and Alt info on their own ac. only... More info on my app in the "Useful stuff" thread.

 

What did u want to send to the LCD ?

and what did you plan to write the app with ?

I used Delphi 3 (old but still going)

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...