dmurley
New member
I have a piece of code to establish a constant vertical velocity on the moon of 1 m/s which works just fine when invoked directly, but not when called. When called, the Delta Glider NT barely moves at all and settles back to the ground very quickly. I don't understand what is going on here. Any help would be appreciated.
Also, I am using 1.622 as the gravitational acceleration of the moon. I actually get better results using 1.624. What is the proper value to use?
Also, I am using 1.622 as the gravitational acceleration of the moon. I actually get better results using 1.624. What is the proper value to use?
Code:
-- VelOne
--
-- Description: The purpose of this function is to establish
-- a constant vertical velocity of about 1 m/s on the moon.
--
-- Inputs:
-- dAcc - desired acceleration in g's
--
-- Assumptions:
-- 1) A handle (hGLNT) to the interface of a vessel
-- is established before this routine is invoked.
function VelOne(dAcc)
term.out ('Enter VelOne')
pbA=1.622
sA = (9.8*dAcc)-pbA
tA = 1/sA
curMass = hGLNT:get_mass()
gF=curMass*pbA
aF = curMass*sA
tF=gF+aF
eng0F=tF*.6026
eng0L=eng0F/110000
eng0HF=gF*.6026
eng0HL=eng0HF/110000
hGLNT:set_thrustergrouplevel(THGROUP.HOVER,eng0L)
proc.wait_simdt(tA)
hGLNT:set_thrustergrouplevel(THGROUP.HOVER,eng0HL)
proc.wait_simdt(tA)
term.out ('Exit VelOne')
end