Jump to content

HowTo: Get contents of CMSP, CMCP and some other indicators as a string


FSFIan

Recommended Posts

Can this be used to display the radio frequencies on my touchscreen monitor? I'm using Helios and the radio frequencies have been broken for a while.

Asus ROG C6H | AMD Ryzen 3600 @ 4.2Ghz | Gigabyte Aorus Waterforce WB 1080ti | 32Gb Crucial DDR4/3600 | 2Tb Intel NVMe drive | Samsung Odyssey+ VR | Thrustmaster Warthog | Saitek pedals | Custom geothermal cooling loop with a homemade 40' copper heat exchanger 35' in the ground

Link to comment
Share on other sites

Can this be used to display the radio frequencies on my touchscreen monitor? I'm using Helios and the radio frequencies have been broken for a while.

 

You would need to write an Export.lua file that uses the above functions to get the radio frequencies out of DCS (probably via UDP). There's a detailed explanation on the Warthog Pit wiki. It may also help to look at the CMSPExport.lua in my DCS Arduino example.

 

Then you need to get that information onto your touch screen. Unless you can figure out a way to get Helios to display it, you will probably need to make a program that listens for the UDP packets from DCS and displays them.

Link to comment
Share on other sites

the function list_cockpit_params() returns some interesting data too like radio frequencies with the good format

 

MAV_FOV:"OFF"
TGP_FOV:"WIDE"
MAV_VIDEO:"OFF"
ACCELERATION_X_W:0.001236
TGP_VIDEO_MODE:"CCD"
TGP_TRACK_MODE:"NONE"
MAV_STATUS:0.000000
TGP_DESIGNATOR:"LASER"
TGP_ZOOM:1.000000
ACCELERATION_Y_W:-0.001244
ACCELERATION_Z_W:-0.000178
SOI:"TAD"
DTS_UPLOAD:"NO_UPLOAD"
HUD_MODE:"NAV"
STEERPOINT:"INIT POSIT"
MFCD_LEFT_PAGE:"TAD"
MFCD_RIGHT_PAGE:"CDU_WAYPT1"
CDU_PAGE:"CDU_WAYPT1"
[color=Red]VHF_AM_FREQ:135.150000
UHF_FREQ:263.100000
VHF_FM_FREQ:30.125000[/color]

Link to comment
Share on other sites

Hello guys,

 

A-10C

 

list_indication(1)

MFD 1

 

list_indication(2)

MFD 2

 

list_indication(3)

CDU

 

list_indication(4)

Digital Clock

-----------------------------------------
txtHours
14
-----------------------------------------
txtColon
:
-----------------------------------------
txtMinutes
30
-----------------------------------------
txtSeconds
04
-----------------------------------------
txtC
C
-----------------------------------------
secondsNeedle

-----------------------------------------
txt5MinStepDigits_5
5
-----------------------------------------
txt5MinStepDigits_10
10
-----------------------------------------
txt5MinStepDigits_15
15
-----------------------------------------
txt5MinStepDigits_20
20
-----------------------------------------
txt5MinStepDigits_25
25
-----------------------------------------
txt5MinStepDigits_30
30
-----------------------------------------
txt5MinStepDigits_35
35
-----------------------------------------
txt5MinStepDigits_40
40
-----------------------------------------
txt5MinStepDigits_45
45
-----------------------------------------
txt5MinStepDigits_50
50
-----------------------------------------
txt5MinStepDigits_55
55
-----------------------------------------
txt5MinStepDigits_60
60

list_indication(5)

HUD???

 

list_indication(6)

???

 

list_indication(7)

CMSP

-----------------------------------------
txt_UP
240 120 000  A
-----------------------------------------
txt_DOWN1
CHAF
-----------------------------------------
txt_DOWN2
FLAR
-----------------------------------------
txt_DOWN3
OTR1
-----------------------------------------
txt_DOWN4
PROG

list_indication(8 )

CMSC

-----------------------------------------
txt_CHAFF_FLARE
A240s120
-----------------------------------------
txt_JMR
SBY AIR
-----------------------------------------
txt_MWS
ACTIVE

list_indication(9)

empty???

 

list_indication(10)

AN/ARC-164 Channel

-----------------------------------------
txtPresetChannel
01

list_indication(11)

AN/ARC-164 ???

-----------------------------------------
txtDot
.
-----------------------------------------
txtFreqStatus
251000

list_indication(12)

AN/ARC-164 Frequenc

-----------------------------------------
txtFreqStatus
251.000

Simpit Software by SDA "SIMPIT DEVELOPER ASSOCIATION"

  • DCS ExportScript
  • D.A.C. DCS to Arcaze Communicator
  • Ikarus a new Virtual Cockpit Software

Deutscher Forums Thread

English Forums Thread

 

Hard/Software: AMD Ryzen 7 1800X, 32 GiB RAM, extra SSD for Windows 10 and DCS World, AMD Vega Frontier Edition with 16 GiB VRAM

Link to comment
Share on other sites

Hello,

 

Ka-50

 

list_indication(1)

HUD

 

list_indication(2)

SHKVAL

 

list_indication(3)

ABRIS

 

list_indication(4)

ERKAN

-----------------------------------------
frame

-----------------------------------------
txt_1
        0
  ELEC  2
   ON   1
BATTERY  6
-----------------------------------------
txt_2
        0
        2
        2
        1

list_indication(5)

PVI-800

-----------------------------------------
txt_VIT
41383
-----------------------------------------
txt_NIT
041332
-----------------------------------------
txt_OIT_PPM
1
-----------------------------------------
txt_VIT_apostrophe1
'
-----------------------------------------
txt_VIT_apostrophe2
'
-----------------------------------------
txt_NIT_apostrophe1
'
-----------------------------------------
txt_NIT_apostrophe2
'

list_indication(6)

Wepaon

-----------------------------------------
txt_weap_type_AT
ПС
-----------------------------------------
txt_weap_count
12
-----------------------------------------
txt_cannon_count
24

list_indication(7)

UV-26

-----------------------------------------
txt_digits
064

list_indication(8 )

empty

 

list_indication(9)

ADF table ???

 

list_indication(10)

empty

 

list_indication(11)

Frame ???

 

list_indication(12)

Warning Panel

 

list_indication(13)

???

 

list_indication(14)

???

 

CU Micha

Simpit Software by SDA "SIMPIT DEVELOPER ASSOCIATION"

  • DCS ExportScript
  • D.A.C. DCS to Arcaze Communicator
  • Ikarus a new Virtual Cockpit Software

Deutscher Forums Thread

English Forums Thread

 

Hard/Software: AMD Ryzen 7 1800X, 32 GiB RAM, extra SSD for Windows 10 and DCS World, AMD Vega Frontier Edition with 16 GiB VRAM

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

OK what am I doing wrong?

I don't seem to have the list_indication() function.

I did a clean install of DCS and all the modules that I have, and following the witchcraft readme. Is there anything else I need to do?

Here's the top level of _G that I'm getting:

 

 

[

"log",

"tostring",

"gcinfo",

"Unit",

"mist",

"getfenv",

"Spot",

"debug",

"assert",

"tonumber",

"coalition",

"env",

"load",

"module",

"console",

"Airbase",

"witchcraft",

"_G",

"_FINAL_VERSION",

"coroutine",

"missionCommands",

"country",

"loadstring",

"string",

"xpcall",

"package",

"_VERSION",

"AI",

"witchcraft_log",

"land",

"table",

"ret",

"setmetatable",

"next",

"trigger",

"ipairs",

"fcnname",

"rawequal",

"msg",

"timer",

"getmetatable",

"Weapon",

"witchcraft_start",

"socket",

"countryQty",

"class",

"Controller",

"rawset",

"Group",

"print",

"atmosphere",

"unpack",

"newproxy",

"_ARCHITECTURE",

"math",

"pairs",

"pcall",

"world",

"Object",

"type",

"radio",

"SceneryObject",

"select",

"_ED_VERSION",

"StaticObject",

"rawget",

"collectgarbage",

"coord",

"doZipFile",

"setfenv",

"dofile",

"error",

"loadfile"

]

 

Link to comment
Share on other sites

OK what am I doing wrong?

I don't seem to have the list_indication() function.

I did a clean install of DCS and all the modules that I have, and following the witchcraft readme. Is there anything else I need to do?

Here's the top level of _G that I'm getting:

 

The witchcraft readme describes how to set it up to run inside the mission scripting environment, which is the original purpose.

 

To use it in the Export.lua environment, you have to follow the instructions in this video (basically call WitchcraftExport.lua from your existing Export.lua or rename it to Export.lua if you don't already have one).

 

Also make sure not to use a mission that uses witchcraft when you have it set up for the Export.lua environment. It does not support both use cases at the same time.


Edited by [FSF]Ian
Link to comment
Share on other sites

Ah ok I got it working.

I was following the readme that had me putting witchcraft.lua in the scripts directory and editing MissionScripting.lua

 

I had to undo all that and just use the WitchcraftExport.lua like in your video; once I did that I was able to get it to work.

Thanks!

Link to comment
Share on other sites

  • 2 months later...

Hi Guys

 

Just a quick heads-up, if you turn off the cockpit view (alt-f1) then it appears that DCS no longer updates the CMSC and CMSP values available to the indications(x) LUA call. It sort of makes sense as it saves on CPU cycles, but confused the heck out of me, as I thought I'd goofed when I moved the code from the desktop test environment to the primary pit.

 

Do anyone do of any little trick to force the updates to occur even if the cockpit is not being displayed?

 

Cheers

Peter

Link to comment
Share on other sites

Hi Guys

Do anyone do of any little trick to force the updates to occur even if the cockpit is not being displayed?

 

Simple: export the CMSP indicator to another viewport, so it will always be rendered because it is always visible. That viewport can be 1x1 pixels in size (0x0 did not work for me). You can also hide it entirely by placing it at negative coordinates (assuming you don't have any monitors to the left of your primary one):

ED_A10C_CMSP =
{
	x = -50;
	y = 0;
	width = 20;
	height = 20;
}

 

To make the ED_A10C_CMSP viewport available, append the following two lines to mods/aircraft/A-10C/Cockpit/Scripts/CMSP/indicator/CMSP_init.lua:

dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("ED_A10C_CMSP")

Link to comment
Share on other sites

Thanks Ian - perfect solution

 

Ian;2222974']Simple: export the CMSP indicator to another viewport, so it will always be rendered because it is always visible. That viewport can be 1x1 pixels in size (0x0 did not work for me). You can also hide it entirely by placing it at negative coordinates (assuming you don't have any monitors to the left of your primary one):

ED_A10C_CMSP =
{
	x = -50;
	y = 0;
	width = 20;
	height = 20;
}

 

To make the ED_A10C_CMSP viewport available, append the following two lines to mods/aircraft/A-10C/Cockpit/Scripts/CMSP/indicator/CMSP_init.lua:

dofile(LockOn_Options.common_script_path.."ViewportHandling.lua")
try_find_assigned_viewport("ED_A10C_CMSP")

Link to comment
Share on other sites

  • Recently Browsing   0 members

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