Added effect of vertical velocity and of scatter and intensity

This commit is contained in:
Pax1601
2023-10-30 15:56:10 +01:00
parent c0f3f3a40a
commit 11a5fec195
11 changed files with 116 additions and 36 deletions

View File

@@ -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