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
This commit is contained in:
commit
079e60163d
@ -22,7 +22,7 @@
|
||||
-- @module Functional.Mantis
|
||||
-- @image Functional.Mantis.jpg
|
||||
--
|
||||
-- Last Update: May 2024
|
||||
-- Last Update: July 2024
|
||||
|
||||
-------------------------------------------------------------------------
|
||||
--- **MANTIS** class, extends Core.Base#BASE
|
||||
|
||||
@ -2135,6 +2135,10 @@ function RAT:_InitAircraft(DCSgroup)
|
||||
self.aircraft.length=16
|
||||
self.aircraft.height=5
|
||||
self.aircraft.width=9
|
||||
elseif DCStype == "Saab340" then -- <- These lines added
|
||||
self.aircraft.length=19.73 -- <- These lines added
|
||||
self.aircraft.height=6.97 -- <- These lines added
|
||||
self.aircraft.width=21.44 -- <- These lines added
|
||||
end
|
||||
self.aircraft.box=math.max(self.aircraft.length,self.aircraft.width)
|
||||
|
||||
|
||||
@ -4058,3 +4058,25 @@ function UTILS.ReadCSV(filename)
|
||||
|
||||
return csvdata
|
||||
end
|
||||
|
||||
--- Seed the LCG random number generator.
|
||||
-- @param #number seed Seed value. Default is a random number using math.random()
|
||||
function UTILS.LCGRandomSeed(seed)
|
||||
UTILS.lcg = {
|
||||
seed = seed or math.random(1, 2^32 - 1),
|
||||
a = 1664525,
|
||||
c = 1013904223,
|
||||
m = 2^32
|
||||
}
|
||||
end
|
||||
|
||||
--- Return a pseudo-random number using the LCG algorithm.
|
||||
-- @return #number Random number between 0 and 1.
|
||||
function UTILS.LCGRandom()
|
||||
if UTILS.lcg == nil then
|
||||
UTILS.LCGRandomSeed()
|
||||
end
|
||||
UTILS.lcg.seed = (UTILS.lcg.a * UTILS.lcg.seed + UTILS.lcg.c) % UTILS.lcg.m
|
||||
return UTILS.lcg.seed / UTILS.lcg.m
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user