Jump to content

TACAN2Frequency

From CMM Wiki
Return to CMM Command Reference
Environment: Mission Scripting
Function: TACAN2Frequency
Function Description: Converts a TACAN channel number and mode ("X" or "Y") into the corresponding frequency in hertz. The calculation follows the DCS World TACAN beacon logic: for channels 1‑63 the base frequencies differ between X/Y modes, while for channels 64‑127 the base values shift accordingly.
File Location: cmm.DCSFunctions.lua
Syntax: CMM.TACAN2Frequency( number TACANChannel , string TACANMode )
Return Value: number or nil
Parameters: Name Description
TACANChannelThe TACAN channel (must be a numeric value).
TACANModeEither "X" or "Y"; any other value returns nil.
Example: local freq = CMM.TACAN2Frequency(45, "X"); env.info("TACAN freq: "..tostring(freq))
Example Description: Demonstrates converting channel 45 with mode "X" to its frequency and logging the result.
Related Functions:
Notes: