mirror of
https://github.com/FlightControl-Master/MOOSE.git
synced 2025-10-29 16:58:06 +00:00
Merge remote-tracking branch 'origin/master' into develop
# Conflicts: # Moose Development/Moose/Sound/SRS.lua
This commit is contained in:
commit
7978bbc612
@ -20,6 +20,7 @@
|
|||||||
-- ### Author: FlightControl - Framework Design & Programming
|
-- ### Author: FlightControl - Framework Design & Programming
|
||||||
-- ### Refactoring to use the Runway auto-detection: Applevangelist
|
-- ### Refactoring to use the Runway auto-detection: Applevangelist
|
||||||
-- @date August 2022
|
-- @date August 2022
|
||||||
|
-- Last Update Nov 2023
|
||||||
--
|
--
|
||||||
-- ===
|
-- ===
|
||||||
--
|
--
|
||||||
|
|||||||
@ -1216,12 +1216,10 @@ end
|
|||||||
-- --Start ATIS
|
-- --Start ATIS
|
||||||
-- atis:Start()
|
-- atis:Start()
|
||||||
function MSRS:LoadConfigFile(Path,Filename)
|
function MSRS:LoadConfigFile(Path,Filename)
|
||||||
if not lfs then
|
|
||||||
env.info("MSRS - Config load, lfs is not available!",false)
|
if lfs == nil then
|
||||||
return
|
env.info("*****Note - lfs and os need to be desanitized for MSRS to work!")
|
||||||
end
|
return false
|
||||||
if not os then
|
|
||||||
env.info("MSRS - Config load, os is not available!",false)
|
|
||||||
end
|
end
|
||||||
local path = Path or lfs.writedir()..MSRS.ConfigFilePath
|
local path = Path or lfs.writedir()..MSRS.ConfigFilePath
|
||||||
local file = Filename or MSRS.ConfigFileName or "Moose_MSRS.lua"
|
local file = Filename or MSRS.ConfigFileName or "Moose_MSRS.lua"
|
||||||
|
|||||||
@ -566,7 +566,7 @@ end
|
|||||||
-- @return #number Heading
|
-- @return #number Heading
|
||||||
function WEAPON:GetReleaseHeading(AccountForMagneticInclination)
|
function WEAPON:GetReleaseHeading(AccountForMagneticInclination)
|
||||||
AccountForMagneticInclination = AccountForMagneticInclination or true
|
AccountForMagneticInclination = AccountForMagneticInclination or true
|
||||||
if AccountForMagneticInclination then return self.releaseHeading - UTILS.GetMagneticDeclination() else return self.releaseHeading end
|
if AccountForMagneticInclination then return UTILS.ClampAngle(self.releaseHeading - UTILS.GetMagneticDeclination()) else return UTILS.ClampAngle(self.releaseHeading) end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Get the altitude above sea level at which the weapon was released
|
--- Get the altitude above sea level at which the weapon was released
|
||||||
@ -603,7 +603,7 @@ end
|
|||||||
-- @return #number Heading
|
-- @return #number Heading
|
||||||
function WEAPON:GetImpactHeading(AccountForMagneticInclination)
|
function WEAPON:GetImpactHeading(AccountForMagneticInclination)
|
||||||
AccountForMagneticInclination = AccountForMagneticInclination or true
|
AccountForMagneticInclination = AccountForMagneticInclination or true
|
||||||
if AccountForMagneticInclination then return self.impactHeading - UTILS.GetMagneticDeclination() else return self.impactHeading end
|
if AccountForMagneticInclination then return UTILS.ClampAngle(self.impactHeading - UTILS.GetMagneticDeclination()) else return self.impactHeading end
|
||||||
end
|
end
|
||||||
|
|
||||||
--- Check if weapon is in the air. Obviously not really useful for torpedos. Well, then again, this is DCS...
|
--- Check if weapon is in the air. Obviously not really useful for torpedos. Well, then again, this is DCS...
|
||||||
@ -766,7 +766,10 @@ function WEAPON:_TrackWeapon(time)
|
|||||||
|
|
||||||
-- Update coordinate.
|
-- Update coordinate.
|
||||||
self.coordinate:UpdateFromVec3(self.vec3)
|
self.coordinate:UpdateFromVec3(self.vec3)
|
||||||
|
|
||||||
|
-- Safe the last velocity of the weapon. This is needed to get the impact heading
|
||||||
|
self.last_velocity = self.weapon:getVelocity()
|
||||||
|
|
||||||
-- Keep on tracking by returning the next time below.
|
-- Keep on tracking by returning the next time below.
|
||||||
self.tracking=true
|
self.tracking=true
|
||||||
|
|
||||||
@ -836,8 +839,8 @@ function WEAPON:_TrackWeapon(time)
|
|||||||
-- Safe impact coordinate.
|
-- Safe impact coordinate.
|
||||||
self.impactCoord=COORDINATE:NewFromVec3(self.vec3)
|
self.impactCoord=COORDINATE:NewFromVec3(self.vec3)
|
||||||
|
|
||||||
-- Safe impact heading
|
-- Safe impact heading, using last_velocity because self:GetVelocityVec3() is no longer possible
|
||||||
self.impactHeading = UTILS.VecHdg(self:GetVelocityVec3())
|
self.impactHeading = UTILS.VecHdg(self.last_velocity)
|
||||||
|
|
||||||
-- Mark impact point on F10 map.
|
-- Mark impact point on F10 map.
|
||||||
if self.impactMark then
|
if self.impactMark then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user