Corsac Posted Saturday at 03:38 PM Posted Saturday at 03:38 PM Hi, I've started flying on CW:Germany with a date before GPS, so having to rely only on INS navigation. There's obviously some drift after a while and the advice from the manual is either to update position using a waypoint over a recognizable feature, or use the tacan database. It seems that the Tacan database is only populated on Caucasus and unpopulated on all the others I could test (Cold War Germany, Marianas, Persian Gulf, Sinai). Manually adding a TACAN at the beginning of each flight will rapidly become old, so is there a way to populate that database differently? I assume at some point there will be a DTC interface for that but it's not yet the case. I can see the maps have a Beacons.lua (or beacons.lua) file defining those so I'm unsure what would be needed. It'd be really useful for those CW scenarios. 1
MAXsenna Posted Saturday at 10:00 PM Posted Saturday at 10:00 PM The in game airfields will only have TACAN according to their real world counterparts. No TACAN in real life, no TACAN in game. You also won't have TACAN on civilian airports IIRC. Hence the lack of TACAN in The Marianas/Persian Gulf. Sïnai? Not many NATO countries there.
Tholozor Posted Saturday at 11:24 PM Posted Saturday at 11:24 PM (edited) What he means is that the Hornet in DCS has a TACAN database page in the HSI submenus that is populated with the TACAN stations on the Caucasus map (which IRL doesn't have TACAN stations in Georgia), but not the other maps. Edited Saturday at 11:24 PM by Tholozor 1 REAPER 51 | Tholozor VFA-136 (c.2007): https://www.digitalcombatsimulator.com/en/files/3305981/ Arleigh Burke Destroyer Pack (2020): https://www.digitalcombatsimulator.com/en/files/3313752/
MAXsenna Posted Saturday at 11:39 PM Posted Saturday at 11:39 PM What he means is that the Hornet in DCS has a TACAN database page in the HSI submenus that is populated with the TACAN stations on the Caucasus map (which IRL doesn't have TACAN stations in Georgia), but not the other maps.Ah, I see. Thanks! Sent from my SM-A536B using Tapatalk
Minsky Posted Sunday at 08:51 AM Posted Sunday at 08:51 AM 17 hours ago, Corsac said: is there a way to populate that database differently? I presume it should auto-populate this list with TACAN and VORTAC entries found in a map's "beacons.lua" file. However, this feature seems broken or was never finished. The only two maps where it "works" are Caucasus and Nevada, and only because their beacons were manually added into this file: (DCS)\Mods\aircraft\FA-18C\Cockpit\Scripts\Computers\MC_No1.lua My attempts to add other maps to that file were unsuccessful. 1 Dima | My DCS uploads
Scotch75 Posted Sunday at 10:31 AM Posted Sunday at 10:31 AM Hopefully, this will integrate far better into the mission computer as the DTC is fleshed out more.Cheers!Sent from my SM-G998B using Tapatalk 1 W10 Home 64Bit, Intel Skylake I5 6600K 3.50GHz, ASUS ROG Stryx Z270F MoBo, 64GB G.Skill RipJaws V DDR4 3200 RAM, Samsung 960 Pro 512GB M.2 SSD (OS), Samsung 850 Pro 512GB SSD, 2TB Seagate SDHD, 2TB WD Green HDD, Gigabyte 3060 12GB VRAM
Corsac Posted yesterday at 06:48 AM Author Posted yesterday at 06:48 AM 21 hours ago, Minsky said: I presume it should auto-populate this list with TACAN and VORTAC entries found in a map's "beacons.lua" file. However, this feature seems broken or was never finished. The only two maps where it "works" are Caucasus and Nevada, and only because their beacons were manually added into this file: (DCS)\Mods\aircraft\FA-18C\Cockpit\Scripts\Computers\MC_No1.lua My attempts to add other maps to that file were unsuccessful. Thanks for the pointer to that file, I'll take a look as well. 1
Solution Corsac Posted yesterday at 12:42 PM Author Solution Posted yesterday at 12:42 PM So, thanks @Minskyfor pointing me to that file. I investigated a bit and initially reproduced your issue trying to add any other map than the ones currently in it (Caucasus and Nevadat). It turns out that it's because the file uses get_terrain_related_data("name") to get the current map name, and apparently it only works on Caucasus (and I guess Nevada), not on any other map I have (it returns NULL). The problem was actually identified in 2021 and a workaround was found (see by using: get_terrain_related_data("id") If I do that and use the id found in the terrain entry.lua file (check for the self_ID field) then I can enter specific TACAN inside the database. I'm not really sure I can attach my MC_No1.lua (for IP reasons) but you should be able to reproduce easily locally (feel free to ask if needed). Obviously it breaks IC but on SP and PVE servers I think it should not be too much of an issue. Still it'd be nice to have it fixed/supported directly in DCS Hornet. In the end I think there's a bug (either in DCS core or in all the external maps) where get_terrain_related_data("name") doesn't work. And if it's on purpose then I guess MC_No1.lua should be changed to "id". And then maybe a wishlist thread for adding relevant beacons for relevant maps. 1 1
Minsky Posted yesterday at 02:29 PM Posted yesterday at 02:29 PM 1 hour ago, Corsac said: get_terrain_related_data("id") Yeah, tried this in Syria and Germany, worked like a charm. 1 hour ago, Corsac said: I'm not really sure I can attach my MC_No1.lua (for IP reasons) I wouldn't worry about that, people post modded files all the time. Here's mine with Syria and CWG added as an example: \Mods\aircraft\FA-18C\Cockpit\Scripts\Computers\MC_No1.lua -- 1. Ensure that the line 23 below has "id" instead of "name". -- 2. Get self_ID value from \Mods\terrains\(map name)\entry.lua, e.g. "Syria". -- 3. Open \Mods\terrains\(map name)\beacons.lua, search for BEACON_TYPE_TACAN and BEACON_TYPE_VORTAC and grab their beaconId values, e.g. "airfield44_2". -- 4. Copy & paste the whole "elseif" section below and populate it with the self_ID and beaconsIds values. -- Note that the Hornet will only display the first ten beacons in its TACAN database. -- Thanks to Corsac and JTFF_Gemini for figuring this out: https://forum.dcs.world/topic/380541-hornet-tacan-database/#comment-5708106 local gettext = require("i_18n") _ = gettext.translate device_timer_dt = 0.05 -- 20 Hz need_to_be_closed = true -- lua_state will be closed in post_initialize() ------------------------------------------------------------------------------------------------- -- TACAN Data Stored in Memory (only for T4) ---------------------------------------------------- local fileName = get_terrain_related_data("beacons") or get_terrain_related_data("beaconsFile") if fileName then local f = loadfile(fileName) if f then f() end end theatre = get_terrain_related_data("id") -- Changed from "name" that didn't work TACAN_Data = {} if beacons then local beacons_by_id = {} for i,o in pairs(beacons) do if (o.type == BEACON_TYPE_TACAN) or (o.type == BEACON_TYPE_VORTAC) then beacons_by_id[o.beaconId] = o end end local getTACAN = function (id) local res = {} res.Channel = beacons_by_id[id].channel res.Elevation = beacons_by_id[id].position[2] res.Latitude = beacons_by_id[id].positionGeo.latitude res.Longitude = beacons_by_id[id].positionGeo.longitude return res end local theatre_ = theatre or "none" if theatre_ == 'Caucasus' then TACAN_Data = { getTACAN('airfield22_2'), -- BTM getTACAN('airfield24_4'), -- KBL getTACAN('airfield25_3'), -- KTS getTACAN('airfield29_9'), -- GTB getTACAN('airfield23_4'), -- TSK getTACAN('airfield31_4'), -- VAS --getTACAN(''), -- --getTACAN(''), -- --getTACAN(''), -- --getTACAN(''), -- } elseif theatre == 'Nevada' then TACAN_Data = { getTACAN('airfield1_4'), -- IndianSprings getTACAN('airfield2_2'), -- Groom_Lake getTACAN('airfield4_1'), -- Nellis getTACAN('airfield18_4'), -- Silverbow getTACAN('airfield3_4'), -- LasVegas getTACAN('world_5'), -- Daggett getTACAN('world_19'), -- PeachSprings getTACAN('world_14'), -- BryceCanyon getTACAN('world_12'), -- WilsonCreek getTACAN('world_18'), -- Coaldale } elseif theatre == 'Syria' then TACAN_Data = { getTACAN('world_13'), -- GHI getTACAN('airfield44_2'), -- Akrotiri getTACAN('airfield16_0'), -- INCIRLIC getTACAN('airfield46_5'), -- Pafos getTACAN('airfield64_1'), -- PrinceHussein getTACAN('airfield30_1'), -- RAMATDAVID } elseif theatre == 'GermanyCW' then TACAN_Data = { -- Hornet's database is limited to ten items so comment out those you don't need: getTACAN('world_0'), -- Hamburg --getTACAN('world_1'), -- KIR --getTACAN('world_3'), -- WSR --getTACAN('world_5'), -- WRB getTACAN('world_10'), -- Nattenheim --getTACAN('world_13'), -- BKD getTACAN('world_14'), -- Fulda --getTACAN('world_15'), -- HLZ getTACAN('airfield200_2'), -- Bitburg getTACAN('airfield235_0'), -- BUCHEL getTACAN('airfield11_1'), -- Fassberg getTACAN('airfield163_6'), -- Frankfurt getTACAN('airfield159_0'), -- Giebelstadt getTACAN('airfield16_1'), -- Gutersloh getTACAN('airfield155_0'), -- Hahn getTACAN('airfield232_0'), -- Pferdsfeld getTACAN('airfield165_2'), -- Ramstein getTACAN('airfield156_1'), -- SEMBACH getTACAN('airfield162_4'), -- Spangdahlem getTACAN('airfield28_6'), -- TEGEL getTACAN('airfield29_1'), -- Tempelhof getTACAN('airfield170_1'), -- Wiesbaden getTACAN('airfield32_1'), -- WUNSTORF getTACAN('airfield158_0'), -- Zweibrucken } end end -- Failures F18_MC_FAILURE = 0 Damage = { {Failure = F18_MC_FAILURE, Failure_name = "Failure_Comp_MC1", Failure_editor_name = _("MC 1 FAILURE"), Element = 4, Integrity_Treshold = 0.7, work_time_to_fail_probability = 0.5, work_time_to_fail = 3600*300}, } 2 Dima | My DCS uploads
Corsac Posted yesterday at 03:48 PM Author Posted yesterday at 03:48 PM My changes are basically the same except I used: local theatre_ = theatre or get_terrain_related_data("id") or "none" and then a different selection : elseif theatre_ == "GermanyCW" then TACAN_Data = { getTACAN('world_0'), -- HAM (Hamburg) getTACAN('world_10'), -- NTM (Nattenheim) getTACAN('world_14'), -- FUL (Fulda) getTACAN('airfield200_2'), -- BIT (Bitburg) getTACAN('airfield235_0'), -- BUE (Buchel) getTACAN('airfield163_6'), -- FFM (Frankfurt) getTACAN('airfield16_1'), -- GSO (Gutersloh) getTACAN('airfield165_2'), -- RMS (Ramstein) getTACAN('airfield29_1'), -- TOF (Tempelhof) getTACAN('airfield32_1'), -- WUN (Wunstorf) } 1
Recommended Posts