Jump to content

Switching RWR audio


Beamscanner

Recommended Posts

Which files do I need to play with to swap out the HB RWR audio with my own?

 

I looked over the RWR lua, but its like its generating sounds rather than telling the program to play an audio file..

 

Emitter_Types = {}
Emitter_Types = {
-- Fyll på!
{ -- Moscow-class ship
	Type_Level4 = 3, -- Moscow
	Type_Level3 = 13, --wsType_HCarrier
	Type_Level2 = 12, --wsType_Ship
	Type_Level1 = 3, --wsType_Navy
	Search = "88888----------", -- Beep one second then silence one second
	Lock = "3-3-3-3-3-", -- Beep every 0.2 second
	Carrier_Frequency = 4000000, --Khz 4Ghz (Band 1)
},
{ -- OSA
	Type_Level4 = OSA_9A33BM3, -- OSA
	Type_Level3 = wsRadarLongRange, 
	Type_Level2 = wsType_GenericTank,
	Type_Level1 = wsType_Ground, 
	Search = "LLLLL---------------", -- Beep half second then silence one and a half second
	Lock = "L-L-L-L-", -- Beep every 0.2 second
	Carrier_Frequency = 7000000, --Khz 7Ghz (Band 2)
},
-- { -- SA-6
	-- Type_Level4 = KUB_1C91, -- STR
	-- Type_Level3 = wsRadarAir, 
	-- Type_Level2 = wsType_SAM,
	-- Type_Level1 = wsType_Ground, 
	-- Search = "DDDDDDDDDD--------------------", -- Beep one second then silence two seconds
	-- Lock = "-8-8-8-D-D-D-P-P-P-D-D-D", -- Sweeping sound 8->P->8
	-- Carrier_Frequency = 10000000, --Khz 10Ghz X-Band (Band 2)
-- },
	-- { -- SA-15
	-- Type_Level4 = 28,
	-- Type_Level3 = 102, 
	-- Type_Level2 = 16,
	-- Type_Level1 = 2, 
	-- Search = "DDDDDDDDDD--------------------", -- Beep one second then silence two seconds
	-- Lock = "-8-8-8-D-D-D-P-P-P-D-D-D", -- Sweeping sound 8->P->8
	-- Carrier_Frequency = 10000000, --Khz 10Ghz X-Band (Band 2)
-- },
{ -- Early warning radar EWR_1L13
	Type_Level4 = EWR_1L13,
	Type_Level3 = 101, 
	Type_Level2 = 16,
	Type_Level1 = wsType_Ground, 
	Search = "444444444444444-------------------------------------------------------------------------------------", -- Beep 1.5 second then silence 8.5 seconds
	Lock = "4-4-4-4-4-", -- Beep every 0.2 second (this will never happen)
	Carrier_Frequency = 1500000, --Khz L-Band 1.5Ghz (Band 1)
},
{ -- Early warning radar EWR_55G6
	Type_Level4 = EWR_55G6,
	Type_Level3 = 101, 
	Type_Level2 = 16,
	Type_Level1 = wsType_Ground, 
	Search = "444444444444444-------------------------------------------------------------------------------------", -- Beep 1.5 second then silence 8.5 seconds
	Lock = "1-1-1-1-1-", -- Beep every 0.2 second (this will never happen)
	Carrier_Frequency = 1500000, --Khz L-Band 1.5Ghz (Band 1)
},
{ -- Early warning radar generic?
	Type_Level4 = 0,
	Type_Level3 = 105, 
	Type_Level2 = 16,
	Type_Level1 = wsType_Ground, 
	Search = "111111111111111-------------------------------------------------------------------------------------", -- Beep 1.5 second then silence 8.5 seconds
	Lock = "1-1-1-1-1-", -- Beep every 0.2 second (this will never happen)
	Carrier_Frequency = 1500000, --Khz L-Band 1.5Ghz (Band 1)
},
{ -- MiG-29C
	Type_Level4 = 50,
	Type_Level3 = 1, --wsType_Fighter
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = ":::::------------", -- Beep half second then silence two and a half second
	Lock = "ff-----RR-----", -- Beep every 0.6 second, mid/high prf interleved mode
	Carrier_Frequency = 9000000, --Khz X-band 9Ghz (Band 2)
	Scan_Area = 130, -- Degrees
},
{ -- MiG-29G
	Type_Level4 = 49,
	Type_Level3 = 1, --wsType_Fighter
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = ":::::------------", -- Beep half second then silence two and a half second
	Lock = "ff-----RR-----", -- Beep every 0.6 second, mid/high prf interleved mode
	Carrier_Frequency = 9000000, --Khz X-band 9Ghz (Band 2)
	Scan_Area = 130, -- Degrees
},
{ --MiG-25PD
	Type_Level4 = 24,
	Type_Level3 = wsType_Intercepter, --3
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = ">>>>>---------------", -- Beep half second then silence one and a half second
	Lock = "MM------", -- Beep every 0.8 second
	Carrier_Frequency = 10000000, --Khz X-band 10Ghz (Band 2)
	Scan_Area = 60, -- Degrees
},

{ --F-14
	Type_Level4 = 5,
	Type_Level3 = 1, --wsType_Fighter
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = "33333-------------------------", -- Beep half second then silence two and a half second
	Lock = "33------", -- Beep every 0.8 second
	Carrier_Frequency = 10000000, --Khz X-band 10Ghz (Band 2)
	Scan_Area = 80, -- Degrees
},
{ -- F-15C
	Type_Level4 = F_15,
	Type_Level3 = 1, --wsType_Fighter
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = "99999------------", -- Beep half second then silence two and a half second
	Lock = "kk-----<<-----", -- Beep every 0.6 second, mid/high prf interleved mode
	Carrier_Frequency = 9000000, --Khz X-band 9Ghz (Band 2)
	Scan_Area = 120, -- Degrees
},
{ -- F-16A
	Type_Level4 = F_16A,
	Type_Level3 = 1, --wsType_Fighter
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = "99999------------", -- Beep half second then silence two and a half second
	Lock = "JJ-----??-----", -- Beep every 0.6 second, mid/high prf interleved mode
	Carrier_Frequency = 9000000, --Khz X-band 9Ghz (Band 2)
	Scan_Area = 120, -- Degrees
},
		{ -- F-16
	Type_Level4 = F_16,
	Type_Level3 = 1, --wsType_Fighter
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = "99999------------", -- Beep half second then silence two and a half second
	Lock = "JJ-----??-----", -- Beep every 0.6 second, mid/high prf interleved mode
	Carrier_Frequency = 9000000, --Khz X-band 9Ghz (Band 2)
	Scan_Area = 120, -- Degrees
},
		{ -- E-2C
	Type_Level4 = E_2C,
	Type_Level3 = wsType_Cruiser, --wsType_Fighter
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = "33333----------------------------------------------------", -- Beep half second then silence six and a half second
	Lock = "JJ-----??-----", -- Beep every 0.6 second, mid/high prf interleved mode
	Carrier_Frequency = 1500000, --Khz L-Band 1.5Ghz (Band 1)
	Scan_Area = 360, -- Degrees
},
{ -- E-3 Sentry   
	Type_Level4 = E_3,
	Type_Level3 = wsType_Cruiser, --wsType_Fighter
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = "3333333333----------------------------------------------------", -- Beep one second then silence six and a half second
	Lock = "JJ-----??-----", -- Beep every 0.6 second, mid/high prf interleved mode
	Carrier_Frequency = 1500000, --Khz L-Band 1.5Ghz (Band 1)
	Scan_Area = 360, -- Degrees
},
{ -- А-50 Mainstay  
	Type_Level4 = A_50,
	Type_Level3 = wsType_Cruiser, --wsType_Fighter
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = "2222222222----------------------------------------------------", -- Beep one second then silence six and a half second
	Lock = "JJ-----??--- --", -- Beep every 0.6 second, mid/high prf interleved mode
	Carrier_Frequency = 1500000, --Khz L-Band 1.5Ghz (Band 1)
	Scan_Area = 360, -- Degrees
},

	{ --General category: Interceptors
	Type_Level4 = 0,
	Type_Level3 = wsType_Intercepter, --3
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = ">>>>>---------------", -- Beep half second then silence one and a half second
	Lock = "MM------", -- Beep every 0.8 second
	Carrier_Frequency = 10000000, --Khz X-band 10Ghz (Band 2)
	Scan_Area = 60, -- Degrees
},

{ -- General category: fighters
	Type_Level4 = 0, --0 = Any type 
	Type_Level3 = 1, --wsType_Fighter
	Type_Level2 = 1, --wsType_Airplane
	Type_Level1 = 1, --wsType_Air
	Search = ":::::------------", -- Beep half second then silence two and a half second
	Lock = "ff-----RR-----", -- Beep every 0.6 second, mid/high prf interleved mode
	-- Search = "33333---------------", -- Beep half second then silence one and a half second
	-- Lock = "3-3-3-3-3-", -- Beep every 0.1 second
	Carrier_Frequency = 10000000, --Khz 10Ghz (Band 2)
	Scan_Area = 120, -- Degrees
},
	-- { -- General category: ships
	-- Type_Level4 = 0, --0 = Any type 
	-- Type_Level3 = 0, --0 = Any type 
	-- Type_Level2 = 12, --wsType_Ship
	-- Type_Level1 = 3, --wsType_Navy
	-- Search = "2---------", -- Short beep every second
	-- Lock = "3-3-3-3-3-", -- Beep every 0.1 second
	-- Carrier_Frequency = 10000000, --Khz 10Ghz (Band 2)
-- },	
 { -- General category: missiles
	Type_Level4 = 0, --0 = Any type 
	Type_Level3 = 0, --0 = Any type 
	Type_Level2 = 12, --wsType_Ship
	Type_Level1 = wsType_Weapon,
	Search = "2---------", -- Short beep every second
	Lock = "??-??-",
	Carrier_Frequency = 10000000, --Khz 10Ghz (Band 2)
	Scan_Area = 24, -- Degrees (this is a wild guess after 0.5 seoncds of Googling)
},
-- { -- Everything else
	-- Type_Level4 = 0, --0 = Any type 
	-- Type_Level3 = 0, 
	-- Type_Level2 = 0, 
	-- Type_Level1 = 0, 
	-- Search = "1111111111----------", -- Beep one second then silence one second
	-- Lock = "2-2-2-2-2-", -- Beep every 0.2 second
	-- Carrier_Frequency = 10000000, --Khz 10Ghz (Band 2)
-- }
}

Link to comment
Share on other sites

Switching RWR audio

 

Yes it’s only one sound that is pitched to make different tones. It looks first in the database you posted and if it doesn’t find a match it generates a likely PRF/pattern based on maximum radar-range of the emitter in DCS. You can add as many different entries in the database as you like, if you make any I could include it in the official release. Note that you can add broad categories in the database.

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

unfortunately I'm handcrafting radar tones via a python signal generator + audacity. So I want to be able to trigger the RWR to loop-play my audio files when a signal is detected.

 

My radar tones take into account:

 

-PRF (if available on public sources, or guesstimated via radar type & Low, Medium, High PRF modes)

-PRF modulation type (MTAR suppression PRF jittering, MTI PRF switching, "3 of 8" MPRF switching, etc.)

-Duty cycle

-Antenna Scan time/rate

-Antenna main beam/sidelobe illumination time


Edited by Beamscanner
Link to comment
Share on other sites

Switching RWR audio

 

Look at the letters. Each letter represents a tone that plays 0.1 seconds. The ‘-‘ symbol represents a 0.1 second pause. To know what tone it is look here: https://en.cppreference.com/w/cpp/language/ascii and look at the decimal column, then multiply that with 100 IIRC. So ‘L’ means 7600 hertz tone. Hope that helps.


Edited by RagnarDa

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

Ok.

 

Well I'm making authentic audio that I'd like to use in multiple modules. I just lack to programming know-how to implement it.

 

Below is an example of the F-5 radar (search mode) I made using radar specs from a document published by NASA.

 

https://ntrs.nasa.gov/archive/nasa/casi.ntrs.nasa.gov/19770011366.pdf

 

 

j83etlg.png

 

Attached is a zipped copy of that audio.

(F-5) Search.rar

Link to comment
Share on other sites

I’m on my phone so I can’t listen, but apart from amplitude I believe you can do that. PRF 2500 would be “\031” (Lua escape character octal 31 = ascii 25 = times 100 = 2500). So something like this:

 

{ -- F-5

Type_Level4 = some number you’ll need to find in database.lua I believe,

Type_Level3 = 1, --wsType_Fighter

Type_Level2 = 1, --wsType_Airplane

Type_Level1 = 1, --wsType_Air

Search = "\031\031\031\031\031------------", -- Beep half second then silence two and a half second as example. I don’t know what would be correct for F-5

Lock = "\031\031\031\031\031-----", -- Here I just increased the frequency of the beeps

Carrier_Frequency = 9000000, --Didn’t find the carrier frequency of the F-5 radar

Scan_Area = 130, -- Radar come, in degrees

},

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

I’m on my phone so I can’t listen, but apart from amplitude I believe you can do that. PRF 2500 would be “\031” (Lua escape character octal 31 = ascii 25 = times 100 = 2500). So something like this:

 

{ -- F-5

Type_Level4 = some number you’ll need to find in database.lua I believe,

Type_Level3 = 1, --wsType_Fighter

Type_Level2 = 1, --wsType_Airplane

Type_Level1 = 1, --wsType_Air

Search = "\031\031\031\031\031------------", -- Beep half second then silence two and a half second as example. I don’t know what would be correct for F-5

Lock = "\031\031\031\031\031-----", -- Here I just increased the frequency of the beeps

Carrier_Frequency = 9000000, --Didn’t find the carrier frequency of the F-5 radar

Scan_Area = 130, -- Radar come, in degrees

},

 

Thanks, but I'll have to figure something else out. My goal is to mod other aircraft as well. And while your code works good enough (and saves alot of storage), I can't use it with other aircraft.

 

Thank you again for your quick responses. It says a lot about your team.

 

 

BTW, why do you use the carrier freq? It shouldn't affect the audio tone provided to the pilot. The RWR audio works just like an AM radio, it strips away the AM from the carrier RF. Also, lock tones should be constant with no breaks. Unless this is something unique to the viggen receiver..?

Link to comment
Share on other sites

Switching RWR audio

 

The carrier frequency is used for categorizing the emitter on the recorder. They are categorized in two categories (A and B with some pivot frequency I don’t remember right now). This is then used in the post-mission analysis to determine the type of emitter, and you can see this on the ELINT-page in the DCS:Viggen kneeboarding.

 

About lock-tone you are probably correct.

 

Edit: I’d love if someone would take the time to flesh out the database. Especially for fighters it’s a bit lacking


Edited by RagnarDa

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

Edit: I’d love if someone would take the time to flesh out the database. Especially for fighters it’s a bit lacking

 

I can help you out

 

EDIT: Your code is generating square waves right?

 

EDIT2: \035 does not work when trying to trigger a 2900 Hz tone.

 

	{ -- OSA (SA-8)
	Type_Level4 = OSA_9A33BM3, -- OSA (SA-8)
	Type_Level3 = wsRadarLongRange, 
	Type_Level2 = wsType_GenericTank,
	Type_Level1 = wsType_Ground, 
	Search = "\035-\035\035-\035------------", -- sidelobe (.1), null (.1), Mainbeam (.2), null (.1), sidelobe (.1), silence (1.2 seconds)
	Lock = "\035\035\035\035", -- steady tone
	Carrier_Frequency = 7000000, --Khz 7Ghz (Band 2)
},

 

I believe if I use "GS" it will play a "G" and "S" tones (ie 7100 Hz for .1 sec, 8300 Hz for .1 sec) rather than the desired 2900 Hz...

 

EDIT3:

 

Looking at ur notes in the lua

 

Each waveform is characterised by a ASCII-character (http://www.ascii-code.com/)
-- starting from the '0' character (decimal code 48) and the decimal number represents the
-- wave hertz in 100Hz steps, so '0' character is (48-48)*100 = 0 hertz (CW), character '1' is (49-48) * 100 = 100Hz,
-- character '2' is (50-48) * 100 = 200Hz, character 'u' is (117-48) * 100 = 6900hz, and character 'ÿ'
-- is (255-48) * 100 = 20700Hz. To find the character for a specific frequency, eg 2.8Khz (OSA), use the formula
-- (2800 / 100) + 48 = 76 or 'L'

 

 

 

However, I just tested ur "L" code in audacity (via the tones here) and it generates a 1750 Hz tone, not the intended 2800 Hz tone.


Edited by Beamscanner
Link to comment
Share on other sites

Ha, I’ve made this years ago so I forgot how it worked exactly. So you are saying you put the L character in the string like this “LLLLL” and it played a 1750hz tone when painted by OSA in the game instead of 2800? How where you able to tell it was 1750hz?

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

Oh and in case it's not clear, you can not combine two characters. And sorry for bringing in the escape character/hex thing, just ignore that and follow the instructions in the file.

DCS AJS37 HACKERMAN

 

There will always be bugs. If everything is a priority nothing is.

Link to comment
Share on other sites

I used a audio analyzer on my phone to run a FFT to determine the pitch. However, I tested it in the database here: http://www.viggentools.se/ as it easier to run through the various tones. Perhaps the tone in there is wrong..?

 

I've run some tests and the tones dont have the proper harmonics to sound like a radar. Your tones are somewhat between that of a pure sine and a pure AC square wave.

 

A perfect radar sound should be close to a DC Square wave with a <50% duty cycle.

 

rAyr8YB.png?1

 

additionally, it doesn't seem like you can generate a tone above 7800 Hz (MPRF tones should be between ~10 - 40 KHz).

 

I'd rather use my own tones which sound much more authentic.

 

I also cannot generate complex PRF strings like one might find a MPRF radar with your tone generator.

 

F2Edvw7.png


Edited by Beamscanner
Link to comment
Share on other sites

Apparat 27 doesn't generate tones with pitch higher than 5 kHz in reality. If the incoming PRF is higher than 5 kHz (or if you're carrying the U22 jammer pod and it detects a CW signal), a synthetic "ambulance tone" is emitted instead. I'm not sure if this is implemented in the game though.

 

It's not explicitly stated in the SFI, but considering the above, I don't believe App 27 converts the incoming signal directly to audio. It might, but I'm doubtful. Your complex tones are interesting, but I'm not sure if they're realistic. I don't think any of us here has heard what it actually sounds like in reality (it was a notoriously secret part of the aircraft), so claiming that yours are "more authentic" is going a bit far, I think.

 

 

edit: hm, checked the old countermeasures PDF and maybe you're right after all. App 27 does have a bunch of filters for uninteresting signals but there's nothing that indicates that it's more complex than that. Really not sure though. The JA 37's app 27 variant only has synthetic tones though.


Edited by renhanxue
Link to comment
Share on other sites

Your complex tones are interesting, but I'm not sure if they're realistic. I don't think any of us here has heard what it actually sounds like in reality (it was a notoriously secret part of the aircraft), so claiming that yours are "more authentic" is going a bit far, I think.

 

False.

 

While "realistic" tones maybe a hard reach (unknown specific RADAR parameters), "authentic" audio can without a doubt be made, so long as we stick to known RADAR theory. However, even then sometimes radar parameters are available, such as with the F-5 APQ-153 tone I posted.

 

I'm in the process of building a powerpoint to explain how to make authentic audio (and realistic audio if radar parameters are available). The authenticity of my tones is based on RF theory and RADAR knowledge. This should be done soon.

 

I've been working on this for over a year now. I've built a vector signal generator that can create a complex waveform that incorporates PRI/PRF, PRF Modulation (stagger, jitter, pulse train switching, etc), Pulse Duration, Pulse Duration Modulation.

 

I then use audacity to apply amplitude modulation to the signal. AM from antenna scan speed and antenna beam width / sidelobes.

 

I've also cross examined my tones with radar tones that can be heard on various youtube videos.

 

If the Viggen RWR has synthetic tones then you are right, and my PRF tones do not apply. But most older RWRs used crystal video receivers, which can very easily/cheaply output the received radar signals to a speaker. (The CVR already converts the AC signal to DC, and has all the components of an old CVR AM radio)


Edited by Beamscanner
Link to comment
Share on other sites

Sorry if that came off as overly dismissive. I'm sure there are devices for which your tones are actually realistic (the RWR on the A 32 Lansen is a quite likely candidate, for one) - I'm only questioning if they're authentic/realistic on the AJS 37. I mean, it's entirely possible that they are, but given the fact that app 27 already has some synthetic tones (and can also generate synthetic tones based on the input from an external pod), and that an updated variant of it only has synthetic tones, I'm not so sure about the authenticity in this case. There was even talk at the design stage of implementing some form of threat categorization in CK37, and while that was never implemented, it sort of hints at greater ambitions here.

 

I don't think there are any strong realism arguments in favor of any particular side in this case, is what I'm saying. We simply don't know exactly how apparat 27 worked. Or maybe RagnarDa has access to information that I don't.


Edited by renhanxue
Link to comment
Share on other sites

  • Recently Browsing   0 members

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