Reviewed-on: #49 Co-authored-by: dutchie031 <timrorije@gmail.com>
This commit was merged in pull request #49.
This commit is contained in:
@@ -7,6 +7,7 @@ local RTB = {}
|
||||
---@param airbase Airbase
|
||||
---@param missionPoint Vec2
|
||||
---@param capConfig CapConfig
|
||||
---@return table
|
||||
function RTB.getAsMission(airbase, missionPoint, capConfig)
|
||||
return {
|
||||
id = "Mission",
|
||||
@@ -47,7 +48,7 @@ local getRunwayIntoWindCourseRad = function(airbase)
|
||||
else
|
||||
rad = 0 - rad
|
||||
end
|
||||
|
||||
|
||||
local runwayVec = {x = math.cos(rad), z = math.sin(rad), y = 0}
|
||||
local alignment = Util.vectorAlignment(windVec, runwayVec)
|
||||
|
||||
@@ -60,14 +61,14 @@ local getRunwayIntoWindCourseRad = function(airbase)
|
||||
do --inverse
|
||||
local degree = math.deg(runway.course)
|
||||
degree = (degree + 180) % 360
|
||||
|
||||
|
||||
local rad = math.rad(degree)
|
||||
if rad < 0 then
|
||||
rad = math.abs(rad)
|
||||
else
|
||||
rad = 0 - rad
|
||||
end
|
||||
|
||||
|
||||
local runwayVec = {x = math.cos(rad), z = math.sin(rad), y = 0}
|
||||
local alignment = Util.vectorAlignment(windVec, runwayVec)
|
||||
|
||||
@@ -113,6 +114,7 @@ end
|
||||
---comment
|
||||
---@param airbase Airbase
|
||||
---@param missionPoint Vec2
|
||||
---@return table
|
||||
---@param capConfig CapConfig
|
||||
function RTB.getApproachPoint(airbase, missionPoint, capConfig)
|
||||
|
||||
@@ -147,6 +149,7 @@ function RTB.getApproachPoint(airbase, missionPoint, capConfig)
|
||||
end
|
||||
|
||||
---@param airbase Airbase
|
||||
---@return table
|
||||
function RTB.getInitialPoint(airbase)
|
||||
local point = calcInitialPoint(airbase)
|
||||
return {
|
||||
@@ -170,6 +173,8 @@ function RTB.getInitialPoint(airbase)
|
||||
}
|
||||
end
|
||||
|
||||
---@param airbase Airbase
|
||||
---@return table
|
||||
function RTB.getLandingPoint(airbase)
|
||||
local basePoint = airbase:getPoint()
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user