mirror of
https://github.com/Pax1601/DCSOlympus.git
synced 2025-10-29 16:56:34 +00:00
Added effect of vertical velocity and of scatter and intensity
This commit is contained in:
@@ -888,6 +888,7 @@ function Olympus.setUnitsData(arg, time)
|
||||
local lat, lng, alt = coord.LOtoLL(unit:getPoint())
|
||||
local position = unit:getPosition()
|
||||
local heading = math.atan2( position.x.z, position.x.x )
|
||||
local velocity = unit:getVelocity();
|
||||
|
||||
-- Fill the data table
|
||||
table["name"] = unit:getTypeName()
|
||||
@@ -896,7 +897,9 @@ function Olympus.setUnitsData(arg, time)
|
||||
table["position"]["lat"] = lat
|
||||
table["position"]["lng"] = lng
|
||||
table["position"]["alt"] = alt
|
||||
table["speed"] = mist.vec.mag(unit:getVelocity())
|
||||
table["speed"] = mist.vec.mag(velocity)
|
||||
table["horizontalVelocity"] = math.sqrt(velocity.x * velocity.x + velocity.z * velocity.z)
|
||||
table["verticalVelocity"] = velocity.y
|
||||
table["heading"] = heading
|
||||
table["isAlive"] = unit:isExist() and unit:isActive() and unit:getLife() >= 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user