Jump to content

Joe Kurr

Members
  • Posts

    668
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by Joe Kurr

  1. I think that's the unit's health.
  2. IMO Le Bourget can be missed. I stopped going there several years ago, due to high fences, bad runway visibility and unfriendly attitude towards foreign visitors. My top 5 at the moment (in no particular order): - RIAT - Flying Legends - RNLAF Airforce Days - MAKS (mainly because of the Russian hardware, they dropped a bit since they started using high fences as well) - Farnborough
  3. As Liger Zero said I took the liberty to do a rewrite of your script in order to make it easier to maintain and add functionality. At the moment I have the triggerzone part working: - Every second, the script checks if there are new units inside the trigger zone and adds them to the players list - Every 10 seconds, the script checks if units have left the trigger zone, and removes them from the players list. The remove timer can be set to a higher value at a later time, to enable crashed pilots to get a new aircraft and not lose their time. The script also doesn't stop after eject / rejoin. _zoneName = "RaceZone" _updateText = true _players = {} -- Initialize the script -- This function gets called only once, at the beginning of the mission function Init() mist.scheduleFunction(RaceTimer, nil, timer.getTime(), 0.01) mist.scheduleFunction(NewPlayerTimer, nil, timer.getTime(), 1) mist.scheduleFunction(RemovePlayerTimer, nil, timer.getTime(), 10) end -- The main timer, this is where the checks will be done, -- for now it only shows the players inside the trigger zone function RaceTimer() local text = string.format("Elapsed time: %d seconds", timer.getTime()) if #_players > 0 then text = string.format("%s\n%d players found", text, #_players) for playerIndex, player in ipairs(_players) do text = string.format("%s\n%d. %s", text, playerIndex, player.Name) end else text = string.format("%s\nNo players found", text) end logString(text) _updateText = false end -- Check for new players inside the trigger zone, and add them to the list -- This function gets called once every second. function NewPlayerTimer() local allUnits = mist.makeUnitTable( { '[all][plane][helicopter]' } ) local unitsInZone = mist.getUnitsInZones(allUnits, { _zoneName } ) for unitIndex, unit in ipairs(unitsInZone) do playerExists = false for playerIndex, player in ipairs(_players) do local unitName = "" if unit:getPlayerName() then unitName = unit:getPlayerName() else unitName = unit:getName() end if player.Name == unitName then playerExists = true break end end if not playerExists then table.insert(_players, newPlayer(unit)) _updateText = true end end end -- Check for players who have left the trigger zone, and remove them from the list. -- This function gets called once every 10 seconds, interval will be higher when script is done function RemovePlayerTimer() local allUnits = mist.makeUnitTable( { '[all][plane][helicopter]' } ) local unitsInZone = mist.getUnitsInZones(allUnits, { _zoneName } ) local playerExists = false for playerIndex, player in ipairs(_players) do playerExists = false for unitIndex, unit in ipairs(unitsInZone) do local unitName = "" if unit:getPlayerName() then unitName = unit:getPlayerName() else unitName = unit:getName() end if player.Name == unitName then playerExists = true break end end if not playerExists then table.remove(_players, playerIndex) _updateText = true end end end -- Create a new player and populate statistics for the new player -- Gets called from NewPlayerTimer function newPlayer(playerUnit) local unitName = playerUnit:getName() local playerName = "" if playerUnit:getPlayerName() then playerName = playerUnit:getPlayerName() else playerName = unitName end local player = { Name = playerName, Unit = Unit.getByName(unitName), UnitName = unitName, Location = {} } return player end function logString(message) trigger.action.outText(message, 10) end -- Initialize the script and start the timers Init() I'll see if I can add the actual race code shortly.
  4. Hey recoilfx, I'm releasing it when it works correctly. Tonight I had the first opportunity to test it, and there are still a couple of bugs I need to fix. Things that already work as expected: - It detects a connected Arduino at startup - It starts a UDP listener on the specified port (10310 in my case) - It forwards all data received over UDP to the Arduino - It receives data from the Arduino Things that don't work correctly yet: - The data from the Arduino isn't read in one piece - The data from the Arduino isn't forwarded to DCS - The application crashes when there is a lot of traffic (maybe the serial connection is too slow, could be a buffer that fills up, need to check this) Here is a screenshot of the first successful test:
  5. How about Su-30 or Su-34 (side by side cockpit)
  6. I'm working on something similar (see the DFDT Cockpit thread). I have written a small bridge application to make communication between DCS and the Arduino easier. This application simply transfers the data sent from DCS (via UDP) to the Arduino (via RS232) and vice versa.
  7. Currently working on the software for the panel. The lua script and Arduino code are pretty much done, but still need to be tested. The bridge application is also in a final stage, I hope to release this to the community as a universal tool to communicate with the Arduino from DCS. This application simply transfers the data sent from DCS (via UDP) to the Arduino (via RS232) and vice versa.
  8. Can't help you with the first question, but here's how to match the AB detent: Set the axis type to Slider, and define a user curve. Use the values below for both throttles: 0, 3, 6, 11, 23, 45, 60, 70, 80, 90, 100 This will give you 100% dry thrust with the throttles against the AB detent. Pull them over the detent to enable afterburner. Haven't tested this on the F-15 though, but this curve works for me on the Su-27, Su-33 and MiG-29.
  9. PAK FA stealth features patent published Entire article at Jane's
  10. The software for the countermeasures panel is progressing well. Today I started work on the panel design itself. Here is a first impression of an evening's work :) There is a small error in the design above, the holes for the стоп and контр buttons are spaced too far apart. But still I'm quite happy with the result so far, as this is my very first project in Sketchup :)
  11. Just FYI, that last picture is the one I'm working from, it's not a picture of my finished panel (though I hope to make something that looks like it ;) )
  12. The easiest way is to write a TCP listener in C#, and connect to that from lua. Here's a snippet from my export.lua: function InitExport() package.path = package.path .. ";.\\LuaSocket\\?.lua" package.cpath = package.cpath .. ";.\\LuaSocket\\?.dll" socket = require("socket") host = "localhost" port = 10309 connection = socket.try(socket.connect(host, port)) connection:setoption("tcp-nodelay", true) socket.try(connection:send("start")) end My C# application listens on port 10309, and initializes all output signals when it receives "start". Since my lua code was originally written for FC2, the below code might need changes in order to work for you. IIRC LoGetMechInfo() only works for FC2 / FC3 aircraft, and not the DCS modules. function ExportCockpitData() if LoGetMechInfo() then local RawGearStatus = LoGetMechInfo().gear.value local RawFlapStatus = LoGetMechInfo().flaps.value local RawBrakeStatus = LoGetMechInfo().speedbrakes.value --[[ RawGearStatus == 1 --> Gear Down RawGearStatus == 0 --> Gear Up RawGearStatus > 0 < 1 --> Gear Retracting / Extending --]] local GearWarning = (RawGearStatus > 0 and RawGearStatus < 1) and 1 or 0 local GearStatus = (RawGearStatus > 0.5 and GearWarning == 0) and 1 or 0 local FlapStatus = (RawFlapStatus > 0.5) and 1 or 0 local BrakeStatus = (RawBrakeStatus > 0.5) and 1 or 0 local FodStatus = ((LoGetMechInfo().gear.main.left.rod + LoGetMechInfo().gear.main.right.rod) / 2 > 0) and 1 or 0 local MasterWarning = LoGetMCPState().MasterWarning and 1 or 0 local returnString = string.format("leds %d%d%d%d%d%d%d%d\n", 0, 0, MasterWarning, GearWarning, BrakeStatus, FodStatus, FlapStatus, GearStatus) if connection then socket.try(connection:send(returnString)) end end end The important bit for you is the "if connection then ... " block. This will send the data in returnString to the C# application. Finally, I let the application know I'm done flying and close the connection when the mission ends: function EndExport() if connection then socket.try(connection:send("--\n")) connection:close() end end Finally, here's a bit of C# code for the TCP listener. I call this function from a new thread, so it runs in the background and keeps the user interface of the application responsive. void ListenForClients() { TcpListener listener = new TcpListener(IPAddress.Loopback, 10309); listener.Start(); while (keepListening) { Socket socketForClient = listener.AcceptSocket(); if (socketForClient.Connected) { NetworkStream stream = new NetworkStream(socketForClient); StreamWriter writer = new StreamWriter(stream); StreamReader reader = new StreamReader(stream); try { string line = keepListening ? reader.ReadLine() : "--"; while (line != "--") { // Handle your client requests here line = keepListening ? reader.ReadLine() : "--"; } } catch (Exception ex) { Console.Error.WriteLine(" !! -- " + ex.Message); } reader.Close(); writer.Close(); socketForClient.Close(); } } } Hope this helps.
  13. Time to dig up the thread again :) I'm starting work on a new instrument, the countermeasures panel. Currently I have ordered all the electronics parts, and I hope to have a working prototype somewhere in February. I'm using an Arduino Uno board as controller for it, and since this panel will only use up 6 I/O ports on the Arduino, the plan is to build one or two more panels on the same controller when this one is finished. For this panel the following steps need to be done: - Design and build the electonic circuit - Write the firmware for the Arduino - Alter the export.lua to collect the necessary data and send the correct signals to the sim - [optional] Write a control application which can communicate with the arduino and DCS - Design and build the panel front
  14. An AIM-18 ofcourse! Twice the range, twice the warhead. :D
  15. Ah, forgot that :) But that is also a paid module, so we can't count on everyone having it installed.
  16. The standard Su-25 would be best, but then only players with FC3 would be able to join, whilst with the Su-25T everyone can participate. Don't worry, it will still be a challenge ;)
  17. As long as it's officially flyable (ie not made flyable via lua editing), you can enter the dogfight compo with it.
  18. The LLTM Dogfight Compo will be gunzo, so no external weapons allowed, only internal guns. And Liger Zero is right, you can choose any aircraft you like, even the helicopters if you wish!
  19. At the moment we have no plan to use paid 3rd-party tools like LotATC, because we don't know if participants will have it. Building a mission around such a tool is a risk, as you can't fly the mission when nobody has the tool installed. Concerning the briefings, we will do a briefing before every mission, we haven't decided yet about debriefs.
  20. Hard to choose, I like all of them. But I selected Su-30, mainly because of my first encounter with this type was the white-blue Su-30MKI at Le Bourget in 1999.
  21. There's some input we can work with :) 1. We're using dynamic weather systems in the missions, and currently working out some nice and varied conditions. So expect visibility to range from unlimited to 0, with varying wind directions and speeds, and local precipitation. 2. Air defences will range from short-range AAA and MANPADS to long range SAMS (S-300 / Patriot), covering the entire battlefield and red/blue overlapping at the front line. We hope this will bring some challenges to the SEAD guys. We will definately look into your suggestion of placing SAM launchers and radars further apart.
  22. Ok, thanks for clearing that up :) I'm trying to work out if a weekend-long team vs team scenario is possible, where the progress between sorties is unpredictable, since it's based on the achievements of both teams.
  23. But the new mission will have to be built in advance, or can it be generated based on progress during the current mission, i.e. is it possible to have all the ground units in the same place as where they were during the last mission?
  24. ENO, your campaign option also sounds good. Is it possible to generate a new mission based on the outcome of the previous one?
  25. Thanks for the quick reply, that sounds great. Do you have a backup plan in case the server fails during a scenario, or do you just start over again?
×
×
  • Create New...