mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge pull request #1210 from FlightControl-Master/FF/Develop
ATIS v0.4.0
This commit is contained in:
commit
3e9f54aaa5
@ -321,6 +321,8 @@ function RADIOQUEUE:Broadcast(transmission)
|
|||||||
|
|
||||||
-- Set command for radio transmission.
|
-- Set command for radio transmission.
|
||||||
sender:SetCommand(commandTransmit)
|
sender:SetCommand(commandTransmit)
|
||||||
|
|
||||||
|
--MESSAGE:New(string.format("transmissing file %s duration=%.2f sec, subtitle=%s", filename, transmission.duration, transmission.subtitle or ""), 5, "RADIOQUEUE"):ToAll()
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
@ -347,6 +349,7 @@ function RADIOQUEUE:Broadcast(transmission)
|
|||||||
if vec3 then
|
if vec3 then
|
||||||
self:T("Sending")
|
self:T("Sending")
|
||||||
self:T( { filename = filename, vec3 = vec3, modulation = self.modulation, frequency = self.frequency, power = self.power } )
|
self:T( { filename = filename, vec3 = vec3, modulation = self.modulation, frequency = self.frequency, power = self.power } )
|
||||||
|
--MESSAGE:New(string.format("transmissing file %s duration=%.2f sec, subtitle=%s", filename, transmission.duration, transmission.subtitle or ""), 5, "RADIOQUEUE (trigger)"):ToAll()
|
||||||
trigger.action.radioTransmission(filename, vec3, self.modulation, false, self.frequency, self.power)
|
trigger.action.radioTransmission(filename, vec3, self.modulation, false, self.frequency, self.power)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@ -872,6 +872,23 @@ function UTILS.VecHdg(a)
|
|||||||
return h
|
return h
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Calculate the difference between two "heading", i.e. angles in [0,360) deg.
|
||||||
|
-- @param #number h1 Heading one.
|
||||||
|
-- @param #number h2 Heading two.
|
||||||
|
-- @return #number Heading difference in degrees.
|
||||||
|
function UTILS.HdgDiff(h1, h2)
|
||||||
|
|
||||||
|
-- Angle in rad.
|
||||||
|
local alpha=math.rad(h1)
|
||||||
|
local beta=math.rad(h2)
|
||||||
|
|
||||||
|
-- Runway vector.
|
||||||
|
local v1={x=math.cos(alpha), y=0, z=math.sin(alpha)}
|
||||||
|
local v2={x=math.cos(beta), y=0, z=math.sin(beta)}
|
||||||
|
|
||||||
|
return math.abs(UTILS.VecAngle(v1, v2))
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
--- Rotate 3D vector in the 2D (x,z) plane. y-component (usually altitude) unchanged.
|
--- Rotate 3D vector in the 2D (x,z) plane. y-component (usually altitude) unchanged.
|
||||||
-- @param DCS#Vec3 a Vector in 3D with x, y, z components.
|
-- @param DCS#Vec3 a Vector in 3D with x, y, z components.
|
||||||
|
|||||||
@ -1076,7 +1076,7 @@ function AIRBASE:GetRunwayData(magvar, mark)
|
|||||||
|
|
||||||
-- Debug mark
|
-- Debug mark
|
||||||
if mark then
|
if mark then
|
||||||
runway.position:MarkToAll(string.format("Runway %s: true heading=%03d, length=%d m", runway.idx, runway.heading, runway.length))
|
runway.position:MarkToAll(string.format("Runway %s: true heading=%03d (magvar=%d), length=%d m", runway.idx, runway.heading, magvar, runway.length))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Add runway.
|
-- Add runway.
|
||||||
@ -1104,7 +1104,7 @@ function AIRBASE:GetRunwayData(magvar, mark)
|
|||||||
|
|
||||||
-- Debug mark
|
-- Debug mark
|
||||||
if mark then
|
if mark then
|
||||||
runway.position:MarkToAll(string.format("Runway %s: true heading=%03d, length=%d m", runway.idx, runway.heading, runway.length))
|
runway.position:MarkToAll(string.format("Runway %s: true heading=%03d (magvar=%d), length=%d m", runway.idx, runway.heading, magvar, runway.length))
|
||||||
end
|
end
|
||||||
|
|
||||||
-- Add runway.
|
-- Add runway.
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user