Go Back   Orbiter-Forum > Orbiter Addons > Orbiter Lua Scripting
Register Blogs Orbinauts List Social Groups FAQ Projects Mark Forums Read

Orbiter Lua Scripting Find support, share snippets and general discussion around using the Lua engine in Orbiter.

Thread Tools
Old 07-24-2019, 05:20 PM   #1
Default Is there a good way in Lua to determine vertical velocity?

Is there a good way in Lua to determine what your vertical velocity is at any given time? Thanks in advance.
dmurley is offline   Reply With Quote
Old 07-24-2019, 05:41 PM   #2
ele2png user
dgatsoulis's Avatar

From Orbiterroot\Html\Orbiter.chm Orbiter Scripting→Reference→Class Methods→Vessel Methods

vel = v:get_airspeedvector(frame)
Returns the true airspeed vector in the requested frame of reference.

frame (integer): frame of reference flag (see REFFRAME identifiers)

Return values:
vel (vector): true airspeed vector [m/s]

Valid entries for frame are:

REFFRAME.GLOBAL airspeed in global frame
REFFRAME.LOCAL airspeed in local vessel frame
REFFRAME.REFLOCAL airspeed in local planet frame
REFFRAME.HORIZON airspeed in local horizon frame

See also:
get_airspeed, get_groundspeedvector
If you want the vertical velocity as indicated in SurfaceMFD you need:

vel = v:get_airspeedvector(REFFRAME.HORIZON)
vertical_v = vel.y
dgatsoulis is online now   Reply With Quote
Old 07-25-2019, 05:59 PM   #3

That is a tremendous help. Thanks.
dmurley is offline   Reply With Quote

  Orbiter-Forum > Orbiter Addons > Orbiter Lua Scripting

Thread Tools

Posting Rules
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
Forum Jump

All times are GMT. The time now is 11:40 AM.

Quick Links Need Help?

About Us | Rules & Guidelines | TOS Policy | Privacy Policy

Orbiter-Forum is hosted at Orbithangar.com
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.
Copyright 2007 - 2017, Orbiter-Forum.com. All rights reserved.