PDA

View Full Version : Flight Model: How?



EnGaurde
02-13-2005, 07:41 AM
ok, based on my,,,, er,,,, introductory object orientation prgramming skills in C++, and after seeing that PF plane viewer and the info available, i had an idea.

in fact its 1am here in OZ and it bugged me so much i had to get it out of my head. http://forums.ubi.com/images/smilies/53.gif

i reckon, after hearing Olegs comments on changing one FM thing screwed another, i might have an idea on how they made the engine to power PF. Or ondeed IL2.

base class: an master flight algorithm, that determines everything in all states ie perfect or destroyed about a planes nature in flight.

the derived classes, (for those that dont know think of offspring / kids... you are the base class, ie the child "inherits" your genes, but has unique identifiers abouyt itself.... ie possibly 16 children all gain some base characteristics about themselves from a common source, although they are not necessarily clones.... geddit?) ie right down to the individual aircraft including the function? that draws the corect 3d model, contain crucial info ie wing area, mass, surface area, working / damaged / destroyeed components, guns etc.

indeed the guns may be a derived class from a weapon base class?

i know this may be elementary indeed to all you C++ gurus, but it just seems so right to have a list of data ie horsepower, wingarea, even front and rear flight surfaces or more so flight surfaces balanced around the CG, all numbers, feed it all into a mother group of equations and come out the other end as a set of totally automatic flight characteristics of real aircraft.

if you got your equations right, all youd have to do is feed in the planes actually dimension number power etc, and voila you'd have a **** good idea on hwo the real thing flew.

seeing aeronautical engineers can determine if a plane will fly without even seeing a prototype thru maths, i dont see why this could not be done.

now for the fun bit: damage. You shoot a wing... you reduce, possibly, total wing area.

now, the left side of the aircraft has, say, a representative wing area amount of 25. You, shooting your rounds thru the other side, upsets the balancing act of wing lift ( mebbe portWingArea(int zeroPortWing, int damageSection)? http://forums.ubi.com/images/smilies/16x16_smiley-very-happy.gif

You reduce, by sectional selective damage ( think of a map of your country... each state / province breaks the country into sections, and each of these sections represents a destructable constituent of the total wing area... clear?) by 3.

so the port wing has a lift value of 25 at a given speed. You shoot it up. It now has a lift (and quite possibly a higher drag value) value of 22, and depending on where the bullets hit is where you load your damage skin or source your fuel / smoke from.

now the left is producing less lift, your plane automatically begins to roll and slew to the left. In fact every movement from now on acts with this new, reduced ie damaged lift number, and thus blends perfectly with the rest of the data or indeed gets your plane into BAd Behaviour mode. The left wing on your corsair will stall at higher speeds now....

ie if(port wing is hit)
find(where hit)
source(smoke or fuel from hit site)
update skin.
update wing lift value

etc etc.

thus, this is all automatic, as your planes vital data is dynamically updated thru flight. The engine only ever gets it info from plane class, and weapons change these values.

if you registered a hit on a wing spar, depending on if your plane class had that detail and i dont see why it wouldnt, it could have a lower strength value.

when you pulled thoise extra Gs, even though the plane shows no ill effects after the hit and you happily fly along, your planes vital data in a critical component has been reduced from eg 25 to 18.

if the spar is stressed only to 3 g at that reduced value, and you pull 4, bam. Spar fails, you lose a wing and whinge as to why the aircraft are so porked, when it was actually valid battle damage http://forums.ubi.com/images/smilies/88.gif I do recall reading stories about victory rolls over airfields being banned as damaged control lines snapped. This, could be modelled.

in fact every system theoret. could be done. The machine would bog down, but its only a matter of time and GHz...

you could, depending on your inclination, go right down to piston level in the engine... fuel feed.... valve bouncing based on revs... the classes of each of these obects would be detailed indeed but the resulting synergy (gaah,,,, i hate that word) would be simply awe inspiring. One dead cylinder increases the load on the others... oil leaks / big end seizing due to damage actually stops the engine dead even thought the temp is fine...

i think it would be perfect... the flight engine determines the way the plane flies from the same data, all the time. You could retain the same basic flight characteristics of variants of the same plane whilst updating others.... and experience the real world physics results.

dammit this makes too much sense to not work.

http://forums.ubi.com/images/smilies/88.gif

or do i now sound like that perpetual motion engine guy.... http://forums.ubi.com/images/smilies/16x16_smiley-surprised.gif

(lisa ! In this house we obey the laws of thermodynamics !)

EnGaurde
02-13-2005, 07:41 AM
ok, based on my,,,, er,,,, introductory object orientation prgramming skills in C++, and after seeing that PF plane viewer and the info available, i had an idea.

in fact its 1am here in OZ and it bugged me so much i had to get it out of my head. http://forums.ubi.com/images/smilies/53.gif

i reckon, after hearing Olegs comments on changing one FM thing screwed another, i might have an idea on how they made the engine to power PF. Or ondeed IL2.

base class: an master flight algorithm, that determines everything in all states ie perfect or destroyed about a planes nature in flight.

the derived classes, (for those that dont know think of offspring / kids... you are the base class, ie the child "inherits" your genes, but has unique identifiers abouyt itself.... ie possibly 16 children all gain some base characteristics about themselves from a common source, although they are not necessarily clones.... geddit?) ie right down to the individual aircraft including the function? that draws the corect 3d model, contain crucial info ie wing area, mass, surface area, working / damaged / destroyeed components, guns etc.

indeed the guns may be a derived class from a weapon base class?

i know this may be elementary indeed to all you C++ gurus, but it just seems so right to have a list of data ie horsepower, wingarea, even front and rear flight surfaces or more so flight surfaces balanced around the CG, all numbers, feed it all into a mother group of equations and come out the other end as a set of totally automatic flight characteristics of real aircraft.

if you got your equations right, all youd have to do is feed in the planes actually dimension number power etc, and voila you'd have a **** good idea on hwo the real thing flew.

seeing aeronautical engineers can determine if a plane will fly without even seeing a prototype thru maths, i dont see why this could not be done.

now for the fun bit: damage. You shoot a wing... you reduce, possibly, total wing area.

now, the left side of the aircraft has, say, a representative wing area amount of 25. You, shooting your rounds thru the other side, upsets the balancing act of wing lift ( mebbe portWingArea(int zeroPortWing, int damageSection)? http://forums.ubi.com/images/smilies/16x16_smiley-very-happy.gif

You reduce, by sectional selective damage ( think of a map of your country... each state / province breaks the country into sections, and each of these sections represents a destructable constituent of the total wing area... clear?) by 3.

so the port wing has a lift value of 25 at a given speed. You shoot it up. It now has a lift (and quite possibly a higher drag value) value of 22, and depending on where the bullets hit is where you load your damage skin or source your fuel / smoke from.

now the left is producing less lift, your plane automatically begins to roll and slew to the left. In fact every movement from now on acts with this new, reduced ie damaged lift number, and thus blends perfectly with the rest of the data or indeed gets your plane into BAd Behaviour mode. The left wing on your corsair will stall at higher speeds now....

ie if(port wing is hit)
find(where hit)
source(smoke or fuel from hit site)
update skin.
update wing lift value

etc etc.

thus, this is all automatic, as your planes vital data is dynamically updated thru flight. The engine only ever gets it info from plane class, and weapons change these values.

if you registered a hit on a wing spar, depending on if your plane class had that detail and i dont see why it wouldnt, it could have a lower strength value.

when you pulled thoise extra Gs, even though the plane shows no ill effects after the hit and you happily fly along, your planes vital data in a critical component has been reduced from eg 25 to 18.

if the spar is stressed only to 3 g at that reduced value, and you pull 4, bam. Spar fails, you lose a wing and whinge as to why the aircraft are so porked, when it was actually valid battle damage http://forums.ubi.com/images/smilies/88.gif I do recall reading stories about victory rolls over airfields being banned as damaged control lines snapped. This, could be modelled.

in fact every system theoret. could be done. The machine would bog down, but its only a matter of time and GHz...

you could, depending on your inclination, go right down to piston level in the engine... fuel feed.... valve bouncing based on revs... the classes of each of these obects would be detailed indeed but the resulting synergy (gaah,,,, i hate that word) would be simply awe inspiring. One dead cylinder increases the load on the others... oil leaks / big end seizing due to damage actually stops the engine dead even thought the temp is fine...

i think it would be perfect... the flight engine determines the way the plane flies from the same data, all the time. You could retain the same basic flight characteristics of variants of the same plane whilst updating others.... and experience the real world physics results.

dammit this makes too much sense to not work.

http://forums.ubi.com/images/smilies/88.gif

or do i now sound like that perpetual motion engine guy.... http://forums.ubi.com/images/smilies/16x16_smiley-surprised.gif

(lisa ! In this house we obey the laws of thermodynamics !)

Airmail109
02-13-2005, 08:26 AM
My god your alive!!!!!!! Have you found anything out about UK pilots getting thier licenses in the US yet!!!!!!! http://forums.ubi.com/images/smilies/16x16_smiley-very-happy.gif

The12342sainT
02-13-2005, 12:27 PM
desire conquers time

Hairball_1
02-13-2005, 04:11 PM
That is exactly how the FM was done for WW2 Online, and it's horrible. The idea is sound, I think, but not easy to pull off.

EnGaurde
02-13-2005, 04:17 PM
i think the quality of your equations would make or break.

i dont see any other way to make one change ripple thru the rest, quickly and easily. Pretty much ll that happens is that your engine gathers data from your classes, and depending on which plane you fly, input is from the AI or your flight controllers/ keyboard.

adding planes would be simple... just add a new derived class to the list, or mebbe tack on another variant to the same model, this time with bigger guns / bigger engine / smaller wings / more weight etc. That way the plane still shares inherit traits with its brothers but has unique identifiers of its own.

no need to worry about separate plane damage models. Its all done thru the one flight engine, regardless of type. The engine doesnt actually see damage as such, maybe only to draw the correct damaged skin over the frame, but just a reduced set of numbers for what ever part of the aircraft has been shot off.

Damage reduces numbers correspondiong to flight surfaces, and these numbers get fed into the engine resulting in unbalanced flight. Be it no starboard wing or a mere nick on the paintwork, the size of the hit reflects in individual flight surfaces and the engine automatically determines the flight path.

poorly done, yes, i agree it could eb a disaster.

but if you were a mathimatical genius who could also code, you could really clean up.

collisoin detection, a detailed model of the bullets path thru the model or only against the armour... indeed you could leave the planes practically as their own entities and, mirroring the real world, apply a bullets energy to structural values of the aircraft depending on how far away it was fired and where it was fired as to whether or not it even penetrates the outer skin let alone any armour it finds.

Bullets are their own entity, and kinetic energy decays corresponding to real world ballistics data.

IF wind was modelled, you could even show the effect on trajectory of a strong crosswind.

Thus the plane model relies ona real world situation: like in real life, collision detection decides if the plane youre flying is damaged, and where. You may well be shot at, but the engine doesnt care until the collision detection tells it to reduce wing / engine / pilot values.

Instead of building damage into the plane model, you literally reduce key values with your bullets based on kinetic energy / bullet type etc.

after all, how does NASA test all its designs for flight before it actually builds a test bed?

do you think nuclear weapon testing is stopped, or just modelled in computers using data gathered from real weapon tests aka Ze Frawnch?

hmmm... wheres that book on pointers and dereferencing...