Trying to calculate G-Forces in LUA

  • Thread starter Wetter42
  • Start date
  • Tags
    G-forces
In summary, the game has planes and code, and collects things like angle of attack and speed. The player experiences g-forces while climbing turns, but is unable to find a formula for calculating the load-factor.
  • #1
Wetter42
13
2
TL;DR Summary
I see that G-forces = 1/cosϕ to get the g force of a given aircraft at level, however, what about during a climb / descend? Want to be accurate to a reasonably simple degree
There's a game that I like to play that has planes and code, and collects things like angle of attack and speed. I was wondering how it'd be possible to get the rate of g-forces experienced within a climbing turn;

I already understand from this thread:
https://aviation.stackexchange.com/questions/51715/how-much-g-force-is-experienced-in-a-45-turn

that

1/cosϕ gets you your load factor on straight and level flight, however, what about climbing turns?

This was also explained in the aforementioned thread, but wasn't very clear to me. And websites on turn performance don't really help me equate this either;

If anyone has advice (first post so be brutal ;) ), please let me know! Thanks!
 
Physics news on Phys.org
  • #2
Welcome to PF. :smile:

What's a LUA?
 
  • #3
Hello Berkeman! Lua is a programming language that the game leverages. Lua (along with the game's native functions) gathers all sorts of things like the aircraft's pitch, roll, speed, rotational axis, and even MASS. It's quite an amazing thing, but sadly, not G-forces. I wanted to basically destroy the airplane / make the player pass out once the player exerts enough G-load for a sustained amount of time, but am having a hard time finding the formula.

I'd love some help from an aviation physics person finding such equasion!
 
  • #4
Maybe I should rephrase by asking:
What elements do I need to get the g-force of a climbing turn?

Turn radius? Rate of change? Speed? Mass? Angle of attack?

I'd love to get some insight - Hopefully I'm giving enough information here! (If not, please school me!)
 
  • #5
This suggestion dates to the late 1980's and 90's. Search for "Chuck Yeager flight simulator" with the options of adding terms 'games' and 'software'. Some of the sim software may be open source or downloadable. At least the OP can see other programmers' approaches.

General Yeager viewed digital flight simulators as 'expressing the envelope' of each aircraft, the optimum mix of flight parameters characteristic of the aircraft responding to pilot control inputs. NASA publishes reams of data and flight equations organized by airframe and mission.

Designations such as "combat" or "military" simulators generally refer to more extreme flight envelopes permitted during engagement, fighting and escape. Each aircraft model responds differently depending on configuration.
 
  • Like
Likes berkeman
  • #6
For simultaneous turning and climbing, the wing must compensate for the additional load of the combined vertical and horizontal centrifugal forces.

Calculate both based on ground speed and vertical and horizontal radii of turn, then add both vectors up.

Please, see:
https://www.flightliteracy.com/load-factors-part-two/

https://code7700.com/aero_turn_performance.htm

:cool:
 
  • #7
Klystron said:
This suggestion dates to the late 1980's and 90's. Search for "Chuck Yeager flight simulator" with the options of adding terms 'games' and 'software'. Some of the sim software may be open source or downloadable. At least the OP can see other programmers' approaches.

General Yeager viewed digital flight simulators as 'expressing the envelope' of each aircraft, the optimum mix of flight parameters characteristic of the aircraft responding to pilot control inputs. NASA publishes reams of data and flight equations organized by airframe and mission.

Designations such as "combat" or "military" simulators generally refer to more extreme flight envelopes permitted during engagement, fighting and escape. Each aircraft model responds differently depending on configuration.
Hey Klystron - Unfortunately, I had no luck locating any open-source software, however I did take a deep dive into Nasa documentation and went on a rabbit hole;

I've come across some very notable documents. My strongest lead is the following:
https://apps.dtic.mil/sti/pdfs/ADA319977.pdf
(which isn't NASA but explicitly talks about the delta between loadfactors based on previous loadfactors). Frustratingly though, everyone's talking about "Level flight."

What frustrates me is the fact that there's not really much other documentation speaking on a way to measure G forces / load / Centrifugal forces on an aircraft in all scenarios except the most basic one.

Would you be able to take a look at the aforementioned doc (around eq 6.11) and let me know if this sounds about right? Or if there's anything missing. Just to re-iterate, I would like to make a script that takes the plane phyisics (and a few predetermined functions like angle of attack, bank angle, etc) and measure the psuedo load-factors / g-forces. I understand that the game I'm referencing has no Load factor or turn radius, but I may / should be able to substitute it myself.

Thanks in advance!

Additional resources I've drowned myself in:
https://www.nasa.gov/centers/dryden/pdf/88104main_H-1391.pdf

https://aviation.stackexchange.com/...-compute-the-stable-vertical-path-load-factor

https://www.rcgroups.com/forums/sho...ou-accurately-measure-G-loads-on-RC-aircraft#
 
Last edited:
  • #8
Lnewqban said:
For simultaneous turning and climbing, the wing must compensate for the additional load of the combined vertical and horizontal centrifugal forces.

Calculate both based on ground speed and vertical and horizontal radii of turn, then add both vectors up.

Please, see:
https://www.flightliteracy.com/load-factors-part-two/

https://code7700.com/aero_turn_performance.htm

:cool:
Fortunately, this seemed like the most straight forward answer until I started digging. Unfortunately, I started digging. There's not really many resources that talk about centrifugal forces, and I've learned that apparently, centrifugal forces are artificial and just an effect / feeling / result of inertia. But I guess that's beside the point. Your resources were great, but didn't really help me understand how to graph the horizontal and vertical centrifugal forces. Maybe I'm just not looking in the right direction.

Another issue I've been confusing myself with is all of the different equations of ways to measure load factor / g-forces (for example,

[converting the radius turn and velocity into a load factor: https://www.calculatoratoz.com/en/load-factor-for-a-given-turn-radius-calculator/Calc-8542]
vs
[converting the turn rate into load factor https://www.calculatoratoz.com/en/load-factor-for-a-given-turn-rate-calculator/Calc-8569];

What bothers me is that they're both supposed to give the same answer but can have different conditions that can give them different results. Which is the 'default correct' equation, and how do the two answers relate to each other? Like am I supposed to leverage both listed equations and perform some other equation to get parity between the results?

Man I am lost, hahaha! Anyways, some guidance on your original proposal (finding hori + verti centrifugal forces) would be lovely; And if you need any additional information on what's currently calculatable / anything else, please let me know!
 
  • #9
Sorry to resurrect but I went on a very, very deep dive skimming through NASA publications and a few others to try to find the golden equation to measure the load factor in different equations, but couldn't find anything explicit. (and for the sake of simplicity, we can assume the flight will always be coordinated!
 
  • #10
Wetter42 said:
Fortunately, this seemed like the most straight forward answer until I started digging. Unfortunately, I started digging. There's not really many resources that talk about centrifugal forces, and I've learned that apparently, centrifugal forces are artificial and just an effect / feeling / result of inertia. But I guess that's beside the point. Your resources were great, but didn't really help me understand how to graph the horizontal and vertical centrifugal forces. Maybe I'm just not looking in the right direction.
Yes, centrifugal forces are fictitious forces which are apparent only to the pilot (mainly on his rear end-seat interphase).
The real forces respect to the ground are the ones forcing the airplane to deviate from a straigh level path of constant ground speed.

As you surely know, such force breaks the dynamic equilibrium of level flight: drag equals thrust and weight equals lift.
From horizontal level flight, the direction of that disturbing force depends on the control inputs: only elevator for a pure vertical loop; aileron, elevator and rudder for a pure horizontal level turn.

That force induces a centripetal acceleration, with always changing direction but constant magnitude, that points toward the center of rotation, being that rotation purely vertical, purely horizontal, or a combination of both, as in our case.

Wetter42 said:
Man I am lost, hahaha! Anyways, some guidance on your original proposal (finding hori + verti centrifugal forces) would be lovely; And if you need any additional information on what's currently calculatable / anything else, please let me know!

Later, I will try to put something together for you.
For now, consider your airplane as tri-dimensionally moving in the air under the same laws that govern a roller coaster on rails.
Please, see:
https://www.physicsclassroom.com/mmedia/circmot

You have been digging way too deep; it is not that complicated. :smile:
 
  • Haha
Likes Wetter42
  • #11
Lnewqban said:
Yes, centrifugal forces are fictitious forces which are apparent only to the pilot (mainly on his rear end-seat interphase).
The real forces respect to the ground are the ones forcing the airplane to deviate from a straigh level path of constant ground speed.

As you surely know, such force breaks the dynamic equilibrium of level flight: drag equals thrust and weight equals lift.
From horizontal level flight, the direction of that disturbing force depends on the control inputs: only elevator for a pure vertical loop; aileron, elevator and rudder for a pure horizontal level turn.

That force induces a centripetal acceleration, with always changing direction but constant magnitude, that points toward the center of rotation, being that rotation purely vertical, purely horizontal, or a combination of both, as in our case.
Later, I will try to put something together for you.
For now, consider your airplane as tri-dimensionally moving in the air under the same laws that govern a roller coaster on rails.
Please, see:
https://www.physicsclassroom.com/mmedia/circmot

You have been digging way too deep; it is not that complicated. :smile:
Hey bud - I hope you haven't forgotten about me! I'm still struggling to find out the necessary components to calculating (or even estimating) the lift necessary to calculate load factor. Here are at least some of the vectors I have:
  • Directional vectors
  • Speed
  • Angle of attack
  • Pitch angle
  • Time (of course)
  • Gravity
  • Volume (constant)
  • Density (constant)
  • Affects of altitude on air (constant)
Keep in mind that this isn't a perfectly simulated world so there are factors that are poorly simulated such as stall, and changes in density at particular altitudes and even lift.

The annoying thing I'm finding in my research is that you typically need one to calculate the other. For example, In around 70% of research I've found they've all mentioned that coefficient of lift is a direct result of lift. Or that lift is a direct result of coefficient of lift.

I've seen Euler's equation / Navier-Stokes Equasions for lift, but I don't understand some of the calculus symbols and how to measure them / equate / compute them unfortunately.

Any guidance you can send would be greatly appreciated as I'm running into hardened brick walls!
 
  • #12
Sorry, yes, my old confussed brain had forgotten.

Don't let that coefficient of lift drive you crazy; it is only a percentage of the total aerodynamic resistance that the moving surface receives from the air.
That percentage is what we use to fight gravity.
If that percentage is greater than the weight of the aircraft it goes up and vice-verse.
To keep level flight, the pilot modulates that percentage, via elevator-AOA, or forward airspeed, to be exactly equal to weight.
 
  • Like
Likes Wetter42 and FactChecker
  • #13
A steady climb or descent does not directly imply any change in force because there is no acceleration involved. But a steady climb or descent does change the angle of attack and the associated coefficients of lift and drag, ##C_l, C_d##. For a small climb angle, ##c##, you can probably assume that the changes in lift and drag are simple functions of ##c## (see this). For larger angles of climb, the angle of attack changes enough that the aerodynamic changes must be considered. The coefficients of lift and drag are reasonably linear functions of the angle of attack over a fairly large range.
 
Last edited:
  • Like
Likes Wetter42 and Lnewqban
  • #14
Lnewqban said:
Sorry, yes, my old confussed brain had forgotten.

Don't let that coefficient of lift drive you crazy; it is only a percentage of the total aerodynamic resistance that the moving surface receives from the air.
That percentage is what we use to fight gravity.
If that percentage is greater than the weight of the aircraft it goes up and vice-verse.
To keep level flight, the pilot modulates that percentage, via elevator-AOA, or forward airspeed, to be exactly equal to weight.
See - This is exactly what threw me for a loop!

I went ahead and out of laziness, took the "Thin airfoil theory" route which isn't 100% accurate, but asserts that the [coefficient of lift = 2 times pi times the angle of attack (in radians)].

Easily enough I was able to calculate that, and use that in the lift equation found here, however, it posed a problem. When making changes to the speed (in straight and level flight, in game - at least using some specific plane-models), load factor increased due to the fact the lift is directly proportional to the speed of the aircraft (see above). Is this normal? I've basically balanced the weight and the surface area of the aircraft so that when flight is straight and level (and no excess thrust provided), lift / weight = 1, but from your description above, it sounds like coefficient / weight should be = 1 right?
 
  • #15
Wetter42 said:
load factor increased due to the fact the lift is directly proportional to the speed of the aircraft (see above). Is this normal?
No. As a general rule, the lift is proportional to the square of the airspeed. Lift is proportional to q= dynamic pressure.
 
  • Like
Likes Lnewqban
  • #16
Wetter42 said:
When making changes to the speed (in straight and level flight, in game - at least using some specific plane-models), load factor increased due to the fact the lift is directly proportional to the speed of the aircraft (see above).
Please, see:
https://wright.nasa.gov/airplane/lifteq.html

https://www.grc.nasa.gov/www/k-12/airplane/lifteq.html

lifteq.gif
 

FAQ: Trying to calculate G-Forces in LUA

How do I calculate G-forces in LUA?

In order to calculate G-forces in LUA, you will need to use the acceleration data from your object or vehicle and apply the formula: G-force = acceleration / 9.8. This will give you the G-force in multiples of the Earth's gravitational force.

Can I use LUA to calculate G-forces for any object?

Yes, you can use LUA to calculate G-forces for any object as long as you have the necessary acceleration data. However, keep in mind that the formula will only give you an estimate of the G-forces and may not be completely accurate.

Are there any built-in functions in LUA for calculating G-forces?

No, there are no built-in functions in LUA specifically for calculating G-forces. You will need to write your own code using the formula mentioned above.

How can I incorporate G-force calculations into my LUA script?

You can incorporate G-force calculations into your LUA script by first obtaining the acceleration data for your object or vehicle, then using the formula to calculate the G-forces, and finally using the result in your desired way (e.g. displaying it on a screen or triggering an event).

Is it possible to convert G-forces to other units of acceleration in LUA?

Yes, it is possible to convert G-forces to other units of acceleration in LUA. You can use the appropriate conversion factor to convert G-forces to meters per second squared (m/s²) or any other unit of acceleration that you need.

Similar threads

Replies
8
Views
26K
Replies
10
Views
4K
Replies
3
Views
10K
Replies
4
Views
2K
Replies
6
Views
2K
Back
Top