Analysing and modifying the AFX file with QBasic. - Page 2
Page 2 of 11 FirstFirst 12345678910 ... LastLast
Results 26 to 50 of 264

Thread: Analysing and modifying the AFX file with QBasic.

  1. #26

    A quick canopy transparency test

    Hello again,
    The Airacobra AFX have a separate canopy component in Canopy High Wing, but it doesnīt react well to any AF99 or AA transparency.

    Simply by tracing the side and top of the canopy component, the templates were made for an identically shaped top-only structure, to be tagged for AA Alpha Teansparency 179. Then, the 7 "floorboards" were added in Body Main, declared as Insignia Top, and the result came out very clean, and very quickly, with no glue as yet, but it needs a little at the front and back as there are some bleeds. Hereīs a screenshot for now!

    Now for the canopy spars or frame - which will take a little more precision work.
    As yet, the fuselage hasnīt been modified.

    Cheers,
    Aleatorylamp
    "Why make it simple if you can also make it complicated?"

  2. #27
    Hello Aleatorylamp,

    I had also noticed the separate Component for the EJ P-39D Canopy, but didn't think it could be done well enough without bleeds. Not only that, but the Canopy in that AFX isn't really shaped correctly either.
    I don't see how you can get a proper shape with so little control over the cross sections that are forced upon you by the available options for Sructure bulkheads.

    Why not do it as a Component? There are certainly plenty of resources left.

    I may have to use your idea for the 12 sided Spinner. It certainly does improve the look.
    The other changes look pretty good too.

    Today I got enough of my replacement Development Computer running so that I could actually run a production through Aircraft Factory 99 and through Aircraft Animator. I thought I would do a quick edit with a manually set Center of Rotation but the result was that all my Aircraft Animator moving parts were lost.
    I backed out the changes after seeing this.

    I was wondering:
    The armament load in the real Airacobra affected flying characteristics.
    Most of this can be simulated in Combat Flight Simulator.
    How would you simulate this in Flight Simulator 98 where there isn't the varying armament load?

    - Ivan.

  3. #28
    Hello Ivan,
    I tried the same component but transparent, but the AA alpha transparency 179 option was invisible, except without hardware accelleration, and the AF99 transparent option was solid.
    There must be something amiss, but for the moment the only thing thatīs working is the
    Structure with AA-179.

    Iīm glad you like the provisional adaptation of the 12-sided spinner to the 8-sided fuselage.
    I noticed it required some +0.03 ft hand-work on the right (the parts arenīt mirrored),
    and with the canopy too. Not that itīs noticeable on the model in the sim, though!

    As far as I know, the only way to simulate armament weight in FS98 is by defining a separate fuel tank, and emptying it as required from the fuel menu. Having a user-defined location, this would affect flight behaviour.
    Fuel tank locations are in record 1003, and their capacities, in Record 302,
    and the Weight of the extra tank (this one is the Centre one) would be deducted from the Dry Weight.
    Here is a screenshot of the mouse-run fuel menu - My FS98 is a German one.

    Itīs annoying that AA is incapable of remembering a number of things, including everything after a global shift caused by a re-positioning of the Centre of Rotation in AF99, a global MoveIt process, or an equally global AFX Modifier Move operation.
    I suppose the best idea is to leave AA operations few and far between until you have achieved the correct null point position.

    AA forgetfulness is I think itīs a matter of age: When it came out, Siri or Cortana hadnīt been born yet. Iīm sure they would have shown AA the cool things, like a mother cat shows its kittens. Maybe Icould be shown something by these two, to retard neuron deterioration.

    That would make millions nowadays: Get an AI upgrade for the brain! They have sensors on limb-stumps to naturally control artificial extremities, so a brain upgrade is next on the list, I suppose. Or control FS by telepathy...

    Thatīs good news on your "new" hardware. The K6-II is a sturdy and reasonably fast machine, and seems to do nicely. Fine!

    Cheers,
    Aleatorylamp

  4. #29
    Hello Aleatorylamp,

    Interesting approach to weights and balances with extra Fuel in FS98.
    I had thought that Fuel was "Kraftstoff". That is how I am used to seeing it in the manuals.

    You need better numbers for your Mitte Tank.
    I am not really prepared to do the calculation at the moment.
    I was about to do a similar calculation for refining my own DP files but just had not gotten there with all the computer hardware events.

    I believe you are being very unfair to Aircraft Animator.
    It recognizes pieces of the aeroplane by their vertex locations. If you alter any of the vertices, you have a different piece.
    That is pretty fair.

    How is it to figure out that we have altered EVERY vertex in the MDL but that they are the SAME?
    Are they really the same?
    The axis of rotation is very dependent on the vertices of the animated piece of the aeroplane.
    For the CoG change, I shifted the entire aeroplane about 4-5 inches vertically.
    That means the Landing Gear is also shifted 4-5 inches from its axis of rotation and would look pretty stupid rotating about the old axis.

    By the way, I suspect that 0.03 feet offset is a side effect of the Truncation of numbers I was describing earlier.
    I will check my own copy of the P-39D to see if mine shows the same issues.

    - Ivan.

  5. #30
    Hello Ivan,
    I was just being facetious, like a brainless ignoramus, bragging... Actually, I had a hard enough time making AFX Modifier produce something recognizable by AF99, let alone remember something previous, that I quite envy the makers of Aircraft Animator, especially as regards the graphic interface.

    Imagine SCASM: You block out a certain routine between the label and the double dummy jump below, click on "G", and get a selection of Top, Side, Front and 3D view-pictures with coordinates as per the mouse pointer.

    No other possibility for FS98. Fuel = Bombs, bullets and shells, without the fireworks. I remember a guy with the alias FSAviator helping out with FS2002 versions of the Riesenflugzeug and the Grossflugzeug, and he suggested this principle. If you had a 500 Kg bomb or a 1000 kg one, youīd gain quite a lot of altitude as soon as you let go of one of those!

    "Kraftstoff" would be Power Stuff, whereas "Treibstoff" would be Drive Stuff or Impulse Stuff, and are the same. For the sake of illustration, I took the first aircraft I had in the FS98 aircraft list, added a Mitte-Tank with 50 Gallons, just to illustrate it, and did nothing else but a screenshot of the fuel menu.

    50 USG - 300 pounds worth of cannon, bullets and belly bombs is just about exactly wrong... but I just put in a different number to make it stand out from the normal Tanks. I expect that a convenient l/r fuel tank selector gauge that doesnīt include a Mitte-Tank, or Mitteltank, would ensure that your ammo and bombload wonīt get used for fuel and increase your range...

    Why a 0.03 ft truncation only on the right? The mind boggles anyway...

    Cheers,
    Aleatorylamp
    "Why make it simple if you can also make it complicated?"

  6. #31
    Hello Aleatorylamp,

    My German is pretty poor at this point and I never did study any technical German.
    I just try to read aircraft manuals to find the things I need to get something done and that is typically what I have been seeing.

    I just did a quick check on my version of the EJ P-39D and found a similar but lesser problem: only 0.01 feet off from Left to Right at the Nose where the Spinner joins.
    That sounds pretty fair. You have a Truncation problem in your program. I had a Rounding problem.

    Let's step back for a moment and remember where we started.
    The EJ P-39D is an old FS 5 Aeroplane.
    When we started, EVERY dimension was to a precision of 0.10 feet.
    We INCREASED the size of the Parts of this aeroplane.
    If there were any variations between Left and Right, the MINIMUM difference would be 0.10 feet which would be very noticeable.
    If there were variations that large, a magnification would have only increased the differences and we are not seeing that.
    Thus we can state with great confidence that the variations did not exist before we messed around with the model.

    I know now that there was a rounding problem with my StretchIt program.
    I corrected this when I encountered the same thing with test executions of the StretchTexture program.
    By that time, I had already used StretchIt on all the Parts and did not think to go back and check.
    Luckily, the Parts and AFA are not that dependent on each other. (!)

    Seems like losing the Animations is not the biggest problem with this little non-project.

    - Ivan.

  7. #32
    Hello Ivan,
    So itīs my fault again - I should have guessed. I can imagine my physicist daughter criticising me for not having had a scientific, empiric approach to check the original AFX for this discrepancy, not just checking my AFX Modifier modified one!

    Then I would have got curious as to why the AFX Modifier only increased the left, and not the right... and I might have caught on. But you are/were getting a 0.01 difference too.

    So the quest (non-quest) continues... Itīs still interesting though, this non-interesting stuff...
    Who said hobbies werenīt fun?

    Update: Confirmed: The Original AFX has no r/l differences at all.
    So why does the bug only appear with mirrored parts - do negative numbers bug ? Iīll do a page-by-page run with my Modifier and watch the input/output results.

    Update 2: Result: Right! Negative numbers process with +0.01 ft.
    Maybe itīs some logically illogical mathematical rule that rounding always goes in the positive direction - but truncating too? Or maybe itīs just computer illogical logic.
    Now I have to find out how to stop this.

    BTW: I wouldnīt worry about the German... Too many nouns for the same thing.
    Cheers,
    Aleatorylamp
    Last edited by aleatorylamp; June 16th, 2018 at 10:59.
    "Why make it simple if you can also make it complicated?"

  8. #33
    Hello Aleatorylamp,

    As I mentioned in my prior post, I already corrected this problem in StretchIt when I found it in the StretchTexture program.
    I just had not gone back to check, but fixing the model isn't that hard. Tedious, but not difficult.

    I have a great advantage over you in this area because this kind of thing is typically covered in a general Computer Science education, but perhaps not in a general programming class.
    ....I suppose I should CONFIRM that my fix actually worked before making the arrogant assumption that it did.

    - Ivan.

  9. #34
    Hello Ivan,
    I suppose one could hardly expect a beginnerīs COBOL class in 1978 to include positive and negative rounding off in a Personnel Database exercise during the first half of the first year.

    A Payroll Spreadsheet program that would include percentages, overtime, penalty hoursī reductions, and bank transfers, included it, but was for 2nd year students. Our computer teacher was the Oil refineryīs Univac 9030 programmer, who made a bit on the side at the school. I bet he rounded off upwards to the nearest 10 whole numbers!

    Iīll put in another "IF" clause to cover negative numbers then,
    or I might have my own idea for an efficient Smart Fix!

    More later!
    Cheers,
    Aleatorylamp
    "Why make it simple if you can also make it complicated?"

  10. #35
    Hello Aleatorylamp,

    With COBOL, I believe there is a good chance you would really be working with Binary Coded Decimal and not floating point numbers. There is much less ambiguity there.

    My suggestion (pretty obvious one) is to do an exhaustive test of the multiplication section WITH THE DATA THAT IS CAUSING PROBLEMS.
    You already know for sure that the Left - Right offsets at the base of the Spinner cause problems.

    I will re-run my StretchIt program on the Parts when I get a computer operational again.

    - Ivan.

  11. #36
    Hello Ivan,
    I have finally discovered that the problem has to do with negative numbers in general, at least in the case of QBasic, and is not the origin of the Bankersī Conspiracy to justify Money Lending.

    I was using the INT function to get 2 decimal places from a double precision number. This was causing a problem, because it doesnīt only truncate.
    Life is full of treacherous traps.

    "INT returns the largest integer less than or equal to a numeric expression."
    as told by QBasic Help. So, as they say, he who announces his intention, is not a traitor.

    Increasing the digit in a negative number makes it less than what it was before. The mind starts bending here, but of course, -2 plus -2 is -4. Itīs smaller...

    INT(12.54) 'Output is: 12
    INT(-12.54) 'Output is: -13

    INT(-(5.001) * 100) / 100: ' output: 5.01 <<<< OH ?? Yes!
    INT(-(5.3111) * 100) / 100: ' output: 5.32 <<<< OH ?? Yes!

    INT(5.001): ' output: 5
    INT(-5.001): ' output: -6 <<<< WHOA!!!! ARGHHHH! Youīre dead!

    But now Iīve just discovered a more useful one, even if not perfect:

    FIX truncates a floating-point expression to its integer portion.


    FIX(12.49) 'Output is: 12
    FIX(12.54) 'Output is: 12
    FIX(-(5.001) * 100) / 100: ' output is: 5 <<<< Fine.
    FIX(-(5.8891) * 100) / 100: ' output is: 5.88 <<<< Well, OK...

    Even if FIX wonīt round off anything and just truncates, at least it
    wonīt warp the model on the right, so thatīs what Iīll use.


    Cheers,
    Aleatorylamp


    "Why make it simple if you can als
    "Why make it simple if you can also make it complicated?"

  12. #37

    Let d6 = int (rnd (0) * 6) + 1

    Hello Aleatorylamp,

    Your code snippets actually bring back some memories from long, long ago, but not far, far away.

    The subject line above was the typical way we would program a 6-sided die.

    I was actually hoping you would see how close you actually were to taking care of the entire mess with truncation but it seems like you are satisfied with it. *I* would not be. It isn't at all hard to fix.

    Try This:

    LET Result2D = INT (FloatVar * 100 + 0.5) / 100

    My BASIC syntax may be a little rusty, but I think you can get the general idea.
    (Yes, I know "LET" isn't really necessary, but makes it very recognizable as BASIC.)

    I was doing something pretty similar in C with type conversions taking the place of the FIX function that you have available.
    That direction is a bit more cumbersome because there needs to be a conditional to check if the Floating Point value is Negative or not.
    Perhaps there is a quicker and simpler way to do this in C, but this was the first thing I tried and it worked, so I didn't bother looking any more.

    - Ivan.

  13. #38
    Hello Ivan,
    I actually liked the "LET" thing in Basic, because it gives a tremendous sense of power. You can let anything be whatever you want!

    MY$ = "1000000" is by no means as satisfying as: LET MY$ = "1000000" !!

    Wow, I was looking for something that would automatically do it, and not have to subtract 0.01 with an IF for all negatives, but I wouldnīt have thought of your fascinating code snippet.
    It appears that for negative values, the +0.5 takes care of preventing it from getting too small.

    Iīll try it out and think about why it works!
    Thanks a lot!
    Cheers,
    Aleatorylamp
    "Why make it simple if you can also make it complicated?"

  14. #39
    Hello Aleatorylamp,

    If I were you, I would go for a bit more than $1,000,000.
    After all, when you can control the outcome that well, why not make things comfortable for your self?
    I personally would go for about $100,000,000.
    That would give me a bit more freedom that just 1 million would not.

    LET me know if that code fragment works for you.
    I just finished up a little test this afternoon. After I got the pieces installed in my computer (minus the cover), I tested it by deleting all the Parts and then extracting the original AFX to replace the Parts.
    Then, I edited the spreadsheet with all the File Names that I had used last time to add the StretchIt command and also add the Parameters.
    When I ran the script, it ran fine on everything except for the last 4 Parts on the list.
    All 4 Parts caused StretchIt to fail with an illegal access attempt.
    It turned out that these 4 Parts did not exist.
    Apparently they were the result of my edits to create Wing Guns many years ago.

    When I figured this out, I copied all the hand modified Parts that were done after the first Stretch execution a couple weeks ago and also restored all the AFC and AFS files as well.
    It compiled with no problem and now the Bulkhead at the Spinner is a perfect octagon to match the Spinner.
    My edited StretchIt program is using q pretty similar formula to what is in the code snippet, so let me know how it works for you.

    I did a small edit of the Center of Rotation in AF99 while I was doing everything else. I have not checked to see how things line up.

    Now I get to re-do the animation but first I need to set up the computer in a new location after I clear some desk space.
    More on details in the other thread.

    - Ivan.

  15. #40
    Hello Ivan,
    Ha ha!
    Iīm afraid I havenīt had a chance to try anything since my last post, because
    a) I killed Windows 10 for being a predator on my dual-O.S. set-up and put in Windows 7 again, and
    b) A friend brought some expectedly dead hardware innards, which miraculously revived to a stable state after a memory and CPU-Fan exchange. Itīs one of the last single-core AMD computers - not bad. The interesting thing is that there are Win98, WinXP and Win7 drivers for it on the Internet.

    Now I have to give my daughter a German conversation class, and then do some chores in the house. I expect to get some time off tonight for some experimenting with the Stretching and Moving options on the AFX modifier, and will report accordingly!
    Cheers,
    Aleatorylamp
    "Why make it simple if you can also make it complicated?"

  16. #41
    Hello Aleatorylamp,

    It sounds like you have no shortage of computers.
    How fast is the AMD K6 on this machine?

    Last night I finished putting my computer together (details elsewhere) and did some basic animation with the MDL I had rebuilt earlier with the computer in pieces in my living room.
    I had not actually played much with the EJ P-39D, but it appears it could use some work in a few places.
    I will probably add a new Texture file and add a few Parts to address issues with the Flaps.
    I don't think the Airacobra had Slotted Flaps!

    - Ivan.
    Attached Thumbnails Attached Thumbnails FlapTextures.jpg   SlottedFlaps.jpg  

  17. #42
    Hello Ivan,
    Itīs a Sempron 3000+ at 1.8 Ghz, similar to a Pentium 4 at 3000 Ghz. (More details on the other thread). I have so many old computers that I donīt know what to do with them, but to just throw them out seems like a lack of consideration and respect for their existence...

    Iīm just clearing the work-place to be able to do a couple of things with the P-39D. I agree, the flaps have to be made into split flaps. Thatīs on my list too!

    The first thing Iīll do, however, is to correct the building-deviation on the right, i.e. try out and use the new non-distorting negative-decimal round-off formula you posted yesterday! The issue had me so mystified, you wouldnīt believe it!

    What I thought Iīd also give a try later on, just for fun, is to correct the rear-fuselage angle and height, and also correct the whole tail empenage cross-sections while Iīm at it! I think itīs quite an interesting project - no hurry, no pressure!

    OK, more later!
    Aleatorylamp
    "Why make it simple if you can also make it complicated?"

  18. #43
    Hello Aleatorylamp,

    Salute to Gaius SEMPRONius Gracchus!

    Using the old P-39D AIR file I worked on many years ago, I found that I had done some things pretty well, but there were a bunch of things that I did not address. Most probably it was because of a lack of knowledge at the time.

    It is also obvious that this was derived from a FS98 AIR file because once I got the Sea Level power correct, I could not get the Supercharger to work.
    Although it is certainly possible to add in the missing records, I will probably start over with a stock P51D AIR file just to make sure things are fairly consistent. There are many Tables / Records in the AIR file that I do not check and there may be something unexpected in one of those that would cause problems later.

    This is a good time to test my instructions for creating a new AIR file for Combat Flight Simulator.

    You seem to be seriously interested in fixing EJ's P-39D.
    My goal with this project is just to fix the things that are most objectionable and the repair whatever damage my "fixes" may have caused.
    This "Slotted Flaps" issue is one that would not have existed before I changed the Flaps from Plain Flaps to Split Flaps.

    On your EJ P-39D, I would suggest you create a copy of the directory you have now and extract and Stretch the Parts again.
    Although you know the two sides differ, your original code Truncated one side and really expanded the other.
    I believe it is pretty likely that BOTH sides are actually different from what they should be mathematically.
    That is why I basically re ran the StretchIt program on ALL the AFP Files.

    - Ivan.

  19. #44
    Hello Ivan,
    So the Sempron was named after this man! He seems to have been quite a controversial innovator in those convulsive times.

    As per your suggestion with the P-39D, Iīll perform a "redo from start" with the original AFX, stretching it with the correct formula. Thereīs really no other way around, but itīs OK, as the learning process here is one of the points of the exercise. Then Iīll move it into the correct null-point position, and copy over the improvements. The new parts are named differently anyway, so it wonīt be very hard to do.

    Cheers,
    Aleatorylamp
    "Why make it simple if you can also make it complicated?"

  20. #45
    Hello Aleatorylamp,

    Actually I doubt that AMD would name their new processor after one of the Gracchi.
    It probably just sounded great to somebody. Inspiron, Sempron, Athlon, Moron, etc.

    Last night I spent a couple hours going through my old P-39D AIR file and copying the changes to a new version from the stock P51D. It turns out that the one I had been modifying ALREADY WAS derived from the P51D. There was even still the Center1 Fuel Tank in place though it was set for Zero Gallons of fuel.
    The Supercharger doesn't work on the new AIR file either nor does it work on OTHER AIR files.....

    - Ivan.

  21. #46

    Almost there again

    Hello Ivan,
    I skim-read about the Gracchis - they didnīt have a fortunate end,

    Well! Iīve got the Airacobra to the point where it was before. The Move option worked as well as the Stretch option did, so the null point is once again at the correct Centre of Rotation. Everything is now correctly in place.

    Screenshots will look the same, so thereīs not much point in sending any.
    More tomorrow! Iīm off to bed.
    Good night
    Aleatorylamp.
    "Why make it simple if you can also make it complicated?"

  22. #47
    Hello Ivan,
    OK, I managed to get the model symmetrical, and with the correct length, span wheel locations and stance. Texture spread if fine too, and I also manually corrected my "nose-job".
    The only thing is the null point, that is around ten inches below the centreline, and would have been better at 9.

    So, I can continue on the transparent cockpit, but before that, I want to progress a bit on the CFS1 .air file I had started on some time ago, but I still have to decide on the type of engine I want to use.

    I noticed your comment on the other the other thread relative to Automixture!
    A very useful hint.


    Cheers,
    Aleatorylamp
    Last edited by aleatorylamp; June 21st, 2018 at 13:44.
    "Why make it simple if you can also make it complicated?"

  23. #48
    Hello Aleatorylamp,

    My 9 inches below the Engine Thrust Line for CoG was also an estimate.
    It may well be over 9 inches, but that is the number I am going with.
    That small of a difference will probably not make any difference in flight models and if it does, you can easily shift one inch without any impact on the relationship between flight model and visual model. We are really not that precise with most models.

    all engines used on the P-39 Airacobra were E series Allisons.
    The E series was the only version with the remote reduction gear.

    The version I am building is actually a P-39F or retrofitted P-39D-BE to start and if successful there will be a low level hotrod K version to follow. At this point, I really don't have any intention of building a military P-39Q, at least not yet.

    I don't believe the P-39D-2-BE would have been any faster than the P-39D-BE or the P-39F. The extra War Emergency Power was only at about 2500 feet and I have a reference that suggests that was also being used on the regular P-39D series. I have already listed quite a few specifications in the new Airacobra thread.
    To get a good idea of performance, you need to see the entire Power versus Altitude Graph. Take-Off power ratings really won't tell you much.

    - Ivan.

  24. #49
    Hello Ivan,
    Thanks for your quick answer!

    I had been trying to be more on-topic here once I noticed you had opened a new Airacobra thread, so I edited out some performance items from my previous post on this thread, adapted them for the new one and posted them there.

    OK, so I can leave the 10 inches below the centre line for the moment, because changes here will involve repeating all the animations, as you also commented recently!

    As regards performance, I see if I can find the performance chart you mention, and take it from there.
    What I did notice very clearly from the P51D .air file adaptation Iīm doing, is that Boost Gain has to go way down to about 2.47. Anyway, more technical details from now on would be for the new Airacobra thread!

    Cheers,
    Aleatorylamp
    "Why make it simple if you can also make it complicated?"

  25. #50
    Hello Aleatorylamp,

    I believe you should keep your version of the Airacobra here as you had originally intended.
    I believe I commented about this via email way before I started the Airacobra thread.
    We are not really building the same aeroplane nor are we actually building by the same methods and I don't really want to confuse the issues and chase things that are not related to what I am actually trying to do with this project.
    With the kinds of questions you have been asking, I am fairly certain you haven't actually done much research yet.

    The information I am working from isn't terribly hard to find. It is just time consuming to put together in a way that is useable for building an aircraft project. There is also the issue of sorting through the contradictory information to determine what an "accurate" representation really should be.

    - Ivan.

Members who have read this thread: 1

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •