toutenglisse Posted June 11, 2022 Posted June 11, 2022 DCS-miscScripts/ObjectDB at master · mrSkortch/DCS-miscScripts · GitHub While aircraft, helos or air defenses have sensors in their lua, no ship has any. That means that no ship's sensor can be used to work with scripting function getDetectedTargets() DCS func getDetectedTargets - DCS World Wiki - Hoggitworld.com At least that is my issue from what I can see, maybe ships' sensors can be accessed by another mean ? Example in this thread :
near_blind Posted June 11, 2022 Posted June 11, 2022 Ships do have sensors in DCS. Here is the lua that defines the CG-47, you can see the radars being set up at the bottom: https://github.com/Quaggles/dcs-lua-datamine/blob/master/_G/db/Units/Ships/Ship/TICONDEROG.lua [...] Sensors = { OPTIC = { "long-range naval optics", "long-range naval LLTV", "long-range naval FLIR" }, RADAR = { "Patriot str", "ticonderoga search radar" } }, [...] But you are correct in for some reason none of them are accessible to us using the scripting engine in game. It seems like the interfaces for the naval classes are the least developed from a scripting perspective, there is much less granularity and accessibility compared to the ground class. Commands that work for the latter either don't work for the former or only work at the group level. That said, forgive me for asking, what's to stop you from using the generic controller sensor definition with getDetectedTargets()? In the mission below I have a single Ticonderoga surrounded by a couple aircraft. Using the following code: local bote = Group.getByName('Naval-1') local ooga = bote:getUnit(1):getController():getDetectedTargets(Controller.Detection.Radar) local booga = bote:getUnit(1):getController():getDetectedTargets(Controller.Detection.OPTIC) env.info("I See On Radar: " .. mist.utils.oneLineSerialize(ooga)) env.info("I See w/ Eyes: " .. mist.utils.oneLineSerialize(booga)) I get the following in the logs: 2022-06-11 20:24:23.960 INFO SCRIPTING: I See On Radar: { [1] = { ["visible"] = true, ["type"] = false, ["object"] = { ["id_"] = 16778240, }, ["distance"] = true, }, [2] = { ["visible"] = true, ["type"] = false, ["object"] = { ["id_"] = 16777728, }, ["distance"] = true, }, [3] = { ["visible"] = true, ["type"] = false, ["object"] = { ["id_"] = 16777984, }, ["distance"] = true, }, } 2022-06-11 20:24:23.960 INFO SCRIPTING: I See w/ Eyes: { [1] = { ["visible"] = true, ["type"] = false, ["object"] = { ["id_"] = 16777728, }, ["distance"] = true, }, } boatcontrol.miz 1
toutenglisse Posted June 11, 2022 Author Posted June 11, 2022 (edited) @near_blind much thanks for chime in. My bad I had an issue that made me conclude to something false. Ticonderoga works fine with getDetectedTargets(), but Tarawa, that I was testing with, doesn't seem to work normally as I had no target radar detection (in fact not until less than 30Kms away). Having a look at units database I linked, I saw no ["sensors"] for ships and concluded all ships had an issue with that. Both ship should detect targets within 150Kms and below 30Kms and 20Kms high, but for a reason Tarawa can't. Attached tracks for both. tarawa-radar-detec.trk ticonderoga-radar-detec.trk Edited June 11, 2022 by toutenglisse 2
near_blind Posted June 12, 2022 Posted June 12, 2022 (edited) Tarawa looks like it's using the generic 'carrier search radar', which I assume is meant to be the AN/SPS-49. DCS has it's max detection range configured to 39 Km. That's... hilariously low. This also effects the Vinson, Stennis, all the Super Carriers, the Forrestal and the Kuznetsov (that should probably be spun of into a separate radar). https://github.com/Quaggles/dcs-lua-datamine/blob/master/_G/db/Sensors/Sensor/carrier search radar.lua Edited June 12, 2022 by near_blind 1 1
toutenglisse Posted June 12, 2022 Author Posted June 12, 2022 @near_blind Thanks again, for valid and complete information. 1
Recommended Posts