-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CG of wing tanks too far outboard #1327
Comments
Thank you @okroth, I'm looking at this. |
Thank you @wlbragg. |
I just found in the POH, page 6-10 (or page 1-4), that for the C172P there are four tank options:
|
@okroth What you are giving in your last message is for the 160 hp. The 2 x 129 lbs (43 gal) in the current FDM corresponds to the 160 hp standard tanks. (historical remaining) Hence my response to @wlbragg
We will have to make a choice for the 160 hp tanks. I think that the tank locations are not an issue. We can take @okroth's values |
This is the current setting unless we're changing it elsewhere that I don't know about.
Why do you think the Z is OK, shouldn't that be in the wing and not a few feet above it as it is now?
I have no problem making a system file to manage the fuel tank change to engine change. I know I did it for the J3Cub/PA-18 switch, but that was one center tank to two wing tanks. I'll have to review how I did that and see if that is the approach needed here. I don't know off hand what properties are dynamically exposed for fuel tank location. |
it would seem to be more proper to be located in the wing, yes... especially if the FDM engine takes the location and weight into account... not to mention the raised CoG with the tanks being higher than the wing... how high off the ground is the center of the leading edge? |
POH, page 6-10 gives a cabin height of 48", which is pretty much the distance from cabin floor to mid of wing height. |
that would work in with where is 0,0,0 and is there an offset that comes into affect... but that's more 3D detail stuff that i haven't picked up (yet)... |
I was trying to make that clear once more. The axis locations are a nightmare in FG... The Blender and FDM Z-axes are different. Looking at Blender and with these values, it makes about 50 inches between the aircraft belly and a tank close to the wing shaft. Hence, a bit more between the FDM Z-axis and the tank. I think that Z = 59.4 inches (for the initial tanks, but also for the AERORP, line 31in the FDM) is at mid length of the wings. The wing shaft is a bit lower (dihedral angle). 50 to 55 inches for the tanks would be a good approximation. Difficult to be accurate, but I think that the Blender Z-axis is higher than the FDM Z-axis by about 33 to 35 inches (40 ?) measured at the propeller X location. |
@dany93 why then when we determine an animation and need the center coordinates can we take the numbers directly from blender without taking into account the model position z against the blender z? I have never dealt with this conversion as long as I have been doing this. Not on any aircraft. Not even the zposition of the wheels for WOW, all the gear change outs and the ground softness routines I programed. |
@gilbertohasnofb @legoboyvdlp we could use some input here when you get a chance! I'd like some more input. @dany93 I'll admit the original zpositions for the wheels are a bitch to tune, maybe that is why. If so then anyone that makes a model and doesn't position it with the wheels sitting on the Blender Z is a fool and are making nothing but trouble for all those that follow.
Why "belly" and not wheel bottom? Dany, I'm not arguing with you, I'm only trying to understand this so please don't take any questioning the wrong way. I may have been working under false assumptions for awhile now or merely having a brain fart. |
OK, stepped back and tried to grasp this, your propeller axis is key here 26.6". |
The propeller axis is fixed in the plane's coordinate system, CG not. Consume fuel and the z-coordinate of the CG goes down (slightly). CG position is only nice for the FDM as the forces from accelerations (gravitational included) refer to this. The z-coordinate of the empty-weight CG may actually be too high; the Cessna POHs show a location slightly below the propeller axis, whereas the C172P model puts it 10" higher than the prop. AERORP is the point where the forces of the main airfoil attack; usually 25% of the mean airfoil cord; here as well. |
Found some data about CG positions in a report about three crash tests conducted at the NASA LaRC: |
@okroth wrote |
@wlbragg
I don't know how it came. If I rememember well, I have determined this Z = 0 location mainly by deleting every contact and adding several new ones located at Z = 0. If the test contacts are hard enough to avoid a noticeable spring compression (but not too hard, which would prevent the JSBSim consergence), the aircraft sits on the ground at Z = 0 in the FDM (structural) frame. However, I don't unserstand how it works in the code. The VRP (in the FDM) and offsets (Models/c172p.xml) are here to make the 3D model and the FDM match, but the values are not consistent with my observations (except maybe the 3 deg pitch). |
In any case moving the tanks on the x and y should be fine? |
@dany93: @legoboyvdlp : |
OK, I defer the positions to the two of you to determine. I really dislike it when we have to get into these types of offsets. I am willing however to write any code we need to dynamically switch the load positions if necessary as soon as it is determined what direction to go. So the Y axis should be a one to one match with Blender tank coordinates (even though there really is no modeled tank), X will be related to DATUM and Z will be related to prop axis. I really wish I understood this well as I have two aircraft that have more complex fuel systems that are dynamic in nature. The AirCrane which is YASim has the position in the fdm as a 1to1 match with the Blender coordinates I believe. I have a feeling the J3Cub may be off as well. |
@okroth wrote Your criteria |
The tests were made July 2015: This video : https://www.youtube.com/watch?v=FsRwlr7RDkk shows test #2. |
Sorry team, I've been a bit busy these days. I just took a look at the whole discussion but I am not sure I would have any relevant input to give, FDM is one of those areas I am very uncomfortable with. But I'm happy to test and give feedback on any PRs, as well as review code and merge. Or did you have something more specific in mind @wlbragg? |
I'm not far from being ready to propose commits. To summarize: (according to my current understanding)
Capacities: (total for both wing tanks) Or farther but more complicated:
|
I think the question is how perceptible the difference in the FDM would be. If we are talking of a barely perceptible difference, it might be worth to generalise the different engines using a single value as you propose. |
I've tested your FUEL-TANK-OPTION branch. Now, I agree with Gross Weight and CoG with the 160hp engine, using Standard or Integral Tanks. X, Y, Z tank locations and capacities are OK. The Integral tanks [2] and [3] do not feed the float chamber [4] (no consumption). After a few seconds, the engine stops "Out of fuel". One can change the amount of fuel for the non-active tanks, but I think that you know this (unfinished). A small mistake: Integral left (and right) tank (not "Intergal"). |
Corrected the feed and the Integral typo. Added the new tanks to the fuel gauges. TODO: I just learned something really interesting. I had a backup of the original aircraft-dialog.xml named aircraft-dialogORG.xml in my local dialog folder and FG pick up the one with the ORG appended on the end. It was the last one in the folder alphabetically. So I wasn't getting the tank selection in the GUI, talk about weird. |
@legoboyvdlp @gilbertohasnofb @dany93 @wkitty42 @okroth I've been working out of the test branch because I wasn't sure if this was going to come to fruition. Are we far enough into this to finish it and add a fuel tank option to the c172p? Is everyone convinced and ok with this? If so I will start adding the conversion into the PR @dany93 created, with logical git commit progressions and then when we get it all verified and we tie up any loose ends we can merge. Everyone onboard? |
Checked your last commits, nothing to say at first tests, its' working fine. About the fuel tank options, I'm not rigid. Adding the integral tanks on the 180 hp is a code compromise, acceptable even if we have no mention of it on the real one. Useless to say that I'm more focused on the FDM and as much as possible a correct flight behavior (at least from my point of view...). Even if the integral tanks do no appear in the180 hp 552SP POH, some 160 hp owners with initially integral tanks might have fitted it with a 180 hp engine. Waiting for better informed opinions... The other compromise would be a single 55 (2 x 27.5) gallons configuration (intermediate between 160hp "Long range" 54 gallons and 180 hp 56 gallons). But after the amount of work that you did, that would be a pity. @wlbragg, another thing: if you (we) decide for the multiple tanks configuration, I'm wondering if the best, the more logical, wouldn't be to include my changes into your branch (which is already done) and merge your branch. You did (are still doing) at least 99% of the coding work. |
@dany93 I did a little searching and found an article about an Alaska club who talked about upgrading the 160 hp with long range tanks to a 180. I would think some one has upgraded the 160 integral to a 180. I'm OK offering the integral tanks on both engine configurations and let it go at that. Another option if we want to remain pure in what we have verified is to limit the integral tanks to 50, 55 or the default 56 gal that is supposedly in the 180 POH when the 180 engine is selected. I can code it so you can't add more than the 56 gal amount when in the 180 + integral tank configuration. It would still show Integral 68 gal capacity but only allow 56 max gal. Not my first choice though.
Well, I actually have a little more in that branch than just the fuel stuff and the commit history doesn't really show it. So I think I would still rather add commits to your PR branch. I do want to add the other unrelated stuff that's in my branch to master, but I think it need to go in it's own issue and PR as well. It has some fairly extensive -set file refactoring. So, I am going to go on under the assumption we are good with it in the current configuration of tank selections and I will over the next few days get it all committed in a descriptive way. I will do another issue and PR for the -set file work I have and I will review the KAP140 PR and finish up any loose ends on it and ask for a merge of it as well. |
Sounds good, it's been a while since we last did a release. We could also take a look at fixing some other bugs too, I flagged a couple that could be addressed. |
@wlbragg wrote
it's a proof (at least a clue) that, technically, it can be done. That the 160 hp structure can sustain a 180 hp upgrade. |
For the 172R exists a Cessna documentation MK172-72-01C that explains how to upgrade from 160HP to 180HP. However, the engine stays the same IOC360L2A, it just gets a new propeller, engine instruments, etc. The higher power rating comes from higher RPM allowed (2700 instead 2500) |
@okroth wrote
If I understand well, the IOC360L2A engine is from the IO360 family, already a 180 hp engine. |
Correct. But rated at 160 hp in the standard configuration with 2500 rpm limitation |
@dany93 @gilbertohasnofb @legoboyvdlp |
Note to myself: |
@wlbragg |
@gilbertohasnofb @dany93
For simplicity sake and to eliminate and extra function I would like to have autostart and the default startup fuel load be the same, Is that OK and how much fuel should be onboard for each configuration, default tanks and integral tanks?
I did a find-in-files and there is no other reference to these properties anywhere else in the entire c172p project files, what is this /consumables/fuel/tank[x/level-norm? |
Note: this PR is introducing a fairly aggressive refactoring of the variants and I really need to get this finished and pushed before we can even consider introducing #1335. This is really close to being finished as soon as I can get the above questions resolved. Notes to myself, check preflight tutorial and limit fuel contamination check to default tanks. |
|
After investigating farther, I assume it is a tied property and if you adjust /consumables/fuel/tank[2]/level-gal_us then /consumables/fuel/tank[1]/level-norm is adjusted as well. If you adjust /consumables/fuel/tank[1]/level-norm then /consumables/fuel/tank[2]/level-gal_us is adjusted. They are tied together with level-gal_us being the one measure and level-norm being a percentage from 0 to 1. In fact in c172p.nas we essentially we're setting it three times, ie: Once on startup, total 40 gal, 20 gal in each tank times 2. So, I think I can safely use the .25 (level-norm method). Once on startup and again on autostart. I can then use or call just one function that sets the fuel level for either on startup or on autostart. |
I think the
Sounds good to me. |
Yeah, I agree. Also, I noticed the level-norm method checked to see if there was less than .25 (a quarter tank) and only then would it make it change the volume to quarter tank on autostart. So if the fuel was set to anything more than a quarter when autostart was executed, then autostart didn't adjust the fuel. |
I think the autostart logic is fine, but applying the same thing to the aircraft when the sim starts regardless of save state is wrong IMO. I think we should only override the amount of fuel at the start of the sim if save state is off and if the fuel level is below |
Right, I must have said that poorly, that is indeed my conclusion. At startup... |
Yes, I think we are on the same page now, I indeed had misunderstood you. This all sounds like a reasonable approach to it.
No, I'd never reduce it, we are just ensuring the newbie pilot won't crash out of gas within 2 minutes of take off 😄 |
List of items to check!
@gilbertohasnofb @dany93 this is done as far as I can tell. The fuel tank portion touched a bunch of areas. The variant refactoring also needs to be checked, Basically all variant set files should be relatively short and all tie to c172p-main.xml where the details are and the main setup of the aircraft occurs. |
A few small typos, to be changed for "Integral".
Fuel.xml, line14 |
Done, thanks @dany93 |
@dany93 thanks! |
@wlbragg, thanks for this work! |
in the c172p.xml file, the CG position of tank 0 and 1 seem to be wrong. The y-position shall be 112" outboard, whereas in reality the tanks are, according to the parts catalogue, positioned between WS38.38 and WS65.125. That would result in a y-position near 51.8 inches.
On top the x position is given with 56" aft of firewall, but the POH indicates 48" on page 6-9.
The capacity is given with 185lbs eq. to 30.6gallons. Is this correct?
Although of minor influence, one should position the float chambers tank 3 and 4 near the engine, about x=-10, y=0, z=26.
The text was updated successfully, but these errors were encountered: