Masterputin Posted January 24, 2022 Posted January 24, 2022 Hello, I wanted to build an SPO 15 RWR for all the Flanker and Fulcrum jets. But i dont know how to get the output data by DCS. Cant remember that DCS Bios can give me the output data for the SPO 15 RWR. Thanks for help
okopanja Posted January 24, 2022 Posted January 24, 2022 Are you talking about physical device or software? Do you intend to produce more than one? If later, there is alredy a software called Helios.
Masterputin Posted January 24, 2022 Author Posted January 24, 2022 (edited) I want to build an physical device for it. I just need some software that gives me the output data. Also i only want to build one device. Edited January 24, 2022 by Masterputin
okopanja Posted January 24, 2022 Posted January 24, 2022 I have been playing with the exporting of data as my mini-peformance-monitoring project. I am afraid this will require some software development skills. Most of the guys tinkering with electronics usually have some of them. The best documentation on how exporting works and what sort of data you can find out is here: https://wiki.hoggitworld.com/view/DCS_export The incomplete list of available functions that you can call and their data structures is located here: https://wiki.hoggitworld.com/view/DCS_Export_Script So you got like 2 options: 1. build your own exporter script in Lua (I did this since I wanted to collect the frame rates, and inspected slightly what sort of data is available). In case you go this way the following functions are of interest for you: LoGetTWSInfo (returns list of emitters). For exporting data you can use one of the options: file based communication or network sockets for UDP/TCP. 2. try to reuse DCS BIOS (I did not use this, so I can not advise). First approach is better if you need something light, second if you wish to do something more in line with community or possibly even produce more devices. I would also suggest you to google for Helios (more precisely there is a fork of older version, new one will not work for Flanker), since it has the SPO-15 implemented as a software "device". The source code will be there that will enable you to map the internal input to how SPO-15 is supposed to work. 1
Masterputin Posted January 24, 2022 Author Posted January 24, 2022 Thanks for the quick answer and alot of informations. Gonna try that out.
okopanja Posted January 24, 2022 Posted January 24, 2022 Out of curiosity: can you tell us more about your plans on building the device? E.g. level of details and choice of materials.
agrasyuk Posted January 24, 2022 Posted January 24, 2022 All I can say is I've seen an SPO for FC3 built before. Can't come up with a link to the topic. Sorry not much help. Pretty certain it wasn't exposed via Helios so it must have been some creative scripting. Anton. My pit build thread . Simple and cheap UFC project
okopanja Posted January 24, 2022 Posted January 24, 2022 5 minutes ago, agrasyuk said: Pretty certain it wasn't exposed via Helios so it must have been some creative scripting. You have to install Su-27 profile, RWR is there and behaves like the one from the SIM (with some minor differences)
Masterputin Posted January 24, 2022 Author Posted January 24, 2022 Yes i can explain later my idea of designing it but gotta learn for exam right now
Masterputin Posted January 28, 2022 Author Posted January 28, 2022 (edited) Here are the Details: i plan on using an normal rectangle electronics case in black. I am also gonna attach everything to the cover of the case . The first black line is the cover of the case.This is where i drill the holes. The light blue line in the picture is an thin acrylicglass to protect the LEDs from someone sticking an pen or something in the holes. The yellow/red/green lines are "colored transparent foils or paper". In the second picture u can see the colored marks. This is where i cut and glue the transparent foil or paper so it has an colored background. The grey line is some board or plate (metal or plastic doesnt matter). This is where i attach the 3mm or 5mm LEDs. The holes of the grey line must be the exact same as the cover of the case (Black line). I am gonna solder the resistors directly to the LEDs (ignore the drawn value in the picture) and put the + wires to the Arduino mega and the ground wire to an seperate Terminal block for all ground wires. Probably gonna use Dupont connectors for that. But before starting all of that, i first gotta figure out on how to export the DCS data for the SPO-15 and i have never done that kind of stuff so that is gonna be the biggest problem. I also gotta check if that script would also work with Multiplayer because i red somewhere that some server dont allow that kind of scripts. Also i gotta check the current consumption as there are going to be alot of LEDs. I am also probably going to use an compact form of an Arduino Mega because i want to keep this project as compact as possible and neatly as possible. For the letters , I am probably just going to glue letter stickers. And of course i am gonna put heatshrink at the LEDs contacts to prevent shorts. The black kind of rectangle at the LED is supposed to be an black heatshrink to isolate the light. Also sorry for that professional paint drawing i did. Edited January 28, 2022 by Masterputin
okopanja Posted January 28, 2022 Posted January 28, 2022 The export script is relatively easy. I can send you the example(there are many out there but also many do not quite well handle the other scripts that listen to the events). I did not quite get how you intend to connect arduino? Wifi, ethernet, USB? Also note thar rwr export does not include information on which led to turn on, but rather azimuth (radians) and signal strength ( float [0-1]). From there you have to fogure out which leds to turn on. The Helios profile for su-27 has some angle values but I do not know if they really represent the true SPO-15.
Masterputin Posted January 29, 2022 Author Posted January 29, 2022 I want to connect the Arduino Mega Via USB. And yes it would be great if u send an example script. Thanks for the many valuable information.
Masterputin Posted January 29, 2022 Author Posted January 29, 2022 (edited) I just found the Beryoza Script (Export.lua) in the SU-27 Helios Profile. Seems pretty straight forward for me. My only worry is this quote on Capt Zeen Helios Profile Website for the Su27:,, Important notice !! For the Beryoza implementation, i use export functions that can be forbiden in some online dedicated servers. Soon i'll prepare a new export.lua version of the profile widthout the Beryoza implementation, to avoid this problems on those servers." Because i mainly just play online on the Growling sidewinder server. ------------------------------------------------------------------------------------------------------------------------------------ local threats = LoGetTWSInfo() ----------------------------------------------------------------- get TWS info for Beryoza if threats then tabla_azimuths_small = {0,0,0,0,0,0,0,0,0,0} -- table to store the 10 small azimuth lights tabla_power_lights = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0} -- table to store the 13 power lights tabla_azimuths_big = {0,0,0,0,0,0,0,0,0,0} -- table to store the 10 big azimuth lights secondary_radar_types = {AIR = 0, LRR = 0, MRR = 0, SRR = 0, EWR = 0, AWACS = 0, Lock = 0, TopHemisphere = 0, BottomHemisphere = 0} primary_radar_type = {AIR = 0, LRR = 0, MRR = 0, SRR = 0, EWR = 0, AWACS = 0, Lock = 0, TopHemisphere = 0, BottomHemisphere = 0} sector = 0 max_priority = 0 power_light = 0 max_power = 0 emmiter_index=1 Primary_azimuth = 0 local Primary_Threat_Index=0 for mode,emit in pairs (threats.Emitters) do threatType = LoGetNameByType(emit.Type.level1, emit.Type.level2, emit.Type.level3, emit.Type.level4) ---- calculate azimuth light to put ON if emit.Azimuth < -1.95 then tabla_azimuths_small[1] = 1 end -- back left if emit.Azimuth < -1.03 and emit.Azimuth > -1.95 then tabla_azimuths_small[2] = 1 end -- 90 if emit.Azimuth < -0.54 and emit.Azimuth > -1.4 then tabla_azimuths_small[3] = 1 end -- 50 if emit.Azimuth < -0.29 and emit.Azimuth > -0.73 then tabla_azimuths_small[4] = 1 end -- 30 if emit.Azimuth < 0.08 and emit.Azimuth > -0.42 then tabla_azimuths_small[5] = 1 end -- 10 if emit.Azimuth > -0.08 and emit.Azimuth < 0.42 then tabla_azimuths_small[6] = 1 end -- 10 if emit.Azimuth > 0.29 and emit.Azimuth < 0.73 then tabla_azimuths_small[7] = 1 end -- 30 if emit.Azimuth > 0.54 and emit.Azimuth < 1.4 then tabla_azimuths_small[8] = 1 end -- 50 if emit.Azimuth > 1.03 and emit.Azimuth < 1.95 then tabla_azimuths_small[9] = 1 end -- 90 if emit.Azimuth > 1.95 then tabla_azimuths_small[10] = 1 end -- back right -- type of the secondary threat secondary_radar_types = FC_FindRadarTypeForSPO15(threats) if max_priority < emit.Priority then -- if the treath is max priority prepare data tabla_azimuths_big = {0,0,0,0,0,0,0,0,0,0} -- table to store the 10 big azimuth lights ---- calculate azimuth light to put ON for the main treath if emit.Azimuth < -1.95 then tabla_azimuths_big[1] = 1 end -- back left if emit.Azimuth < -1.03 and emit.Azimuth > -1.95 then tabla_azimuths_big[2] = 1 end -- 90 if emit.Azimuth < -0.54 and emit.Azimuth > -1.4 then tabla_azimuths_big[3] = 1 end -- 50 if emit.Azimuth < -0.29 and emit.Azimuth > -0.73 then tabla_azimuths_big[4] = 1 end -- 30 if emit.Azimuth < 0.08 and emit.Azimuth > -0.42 then tabla_azimuths_big[5] = 1 end -- 10 if emit.Azimuth > -0.08 and emit.Azimuth < 0.42 then tabla_azimuths_big[6] = 1 end -- 10 if emit.Azimuth > 0.29 and emit.Azimuth < 0.73 then tabla_azimuths_big[7] = 1 end -- 30 if emit.Azimuth > 0.54 and emit.Azimuth < 1.4 then tabla_azimuths_big[8] = 1 end -- 50 if emit.Azimuth > 1.03 and emit.Azimuth < 1.95 then tabla_azimuths_big[9] = 1 end -- 90 if emit.Azimuth > 1.95 then tabla_azimuths_big[10] = 1 end -- back right Primary_azimuth = emit.Azimuth Primary_Threat_Index = emmiter_index max_power= emit.Power max_signaltype = emit.SignalType max_priority = emit.Priority end emmiter_index=emmiter_index + 1 -- SendData("13", string.format("%.2f", emit.Azimuth) ) -- only to test rad numbers end -- type of the primary threat primary_radar_type = FC_FindRadarTypeForSPO15(threats,Primary_Threat_Index, altBar ) -- calculate the power lights of the main treath if max_power >0 then power_light = math.floor(max_power * 15) +1 -- how many light of 13 to put ON for the power indicator for a = 1, power_light do tabla_power_lights [a] = 1 end end -- Sending to Helios all the data fron the beryoza SendData("18", string.format("%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s", table.concat(tabla_azimuths_big, ""), table.concat(tabla_azimuths_small, ""), table.concat(tabla_power_lights, ""), primary_radar_type.AIR, primary_radar_type.LRR, primary_radar_type.MRR, primary_radar_type.SRR, primary_radar_type.EWR, primary_radar_type.AWACS, primary_radar_type.Lock, primary_radar_type.TopHemisphere, primary_radar_type.BottomHemisphere, secondary_radar_types.AIR, secondary_radar_types.LRR, secondary_radar_types.MRR, secondary_radar_types.SRR, secondary_radar_types.EWR, secondary_radar_types.AWACS, secondary_radar_types.Lock, secondary_radar_types.TopHemisphere, secondary_radar_types.BottomHemisphere )) -- send beryoza in side deviation end Edited January 29, 2022 by Masterputin
okopanja Posted January 29, 2022 Posted January 29, 2022 Basically, of the "sensors" exports are prohibited RWR will not work (maybe even crash in his script). In addition: he is also exporting the object, to get altitude for SPO-15 height indication (low, level, high). On most servers this does not work even if they allow sensor exports. Also his code is not really good: SRS will stop working, since it also exports...
Masterputin Posted January 29, 2022 Author Posted January 29, 2022 thats a bummer. i ll then try to go the bios way. found the developer guide here: http://dcs-bios.a10c.de/docs/v0.2.3/developerguide.html#_connecting_to_dcs_bios
okopanja Posted January 29, 2022 Posted January 29, 2022 I will post the example how to properly chain into other today. My own plans are to export RWR and display it AlienFX. My G7 laptop has LEDs I control via C programing API, I want it to flash RED (more for dramatic effect) when the missile warning is triggered by RWR. The best you can do is send UDP datagram to another process on your PC which will receive it and communicate via USB to arduino. I would favor in this case UDP over TCP, since you do not need to maintain connection (e.g. handle connection and disconnection).
Recommended Posts