c172p-team / c172p

A high detailed version of the Cessna 172P aircraft for FlightGear
GNU General Public License v2.0
80 stars 43 forks source link

Create Alternate Static Source knob and static system #741

Open gilbertohasnofb opened 8 years ago

gilbertohasnofb commented 8 years ago

Create Alternate Static Source knob and static system. This will involve:

gilbertohasnofb commented 8 years ago

@Juanvvc wrote:

The alternate air intake takes the static pressure from the cabin, as onox says. It is used when the pitot tube is blocked, normally due to icing. The alternate air intake uses the cabin air as static pressure, and this air is usually much warmer (i.e.: less dense) than the external air. This means readings will be skewed: the altimeter will show an altitude higher than real, for example. In some cases, there is not any alternate air valve and you must break the glass of the VSI. Check: http://www.aviationgroundschool.com/sample_pages/airspeed3.html and http://studentpilot.com/interact/forum/archive/index.php/t-37253.html

algefaen commented 8 years ago

video with alternate static source knob: https://goo.gl/photos/rApgjAdzfuSsEUcw6

gilbertohasnofb commented 8 years ago

@algefaen was this video shot by you? If so, can I use as source for the sound for the static knob?

algefaen commented 8 years ago

@algefaen was this video shot by you? If so, can I use as source for the sound for the static knob?

Yes, yes. Sorry for the potato quality, my gopro ran out of steam. (=

alge

gilbertohasnofb commented 8 years ago

@algefaen Thanks, so I will prepare the sound and add to a new branch bug-741. Would anyone else be up for implementing the static system?

gilbertohasnofb commented 8 years ago

I created a branch named bug-741 with two new sounds from the video by @algefaen: alt-static-push.wav and alt-static-pull.wav. So once we have the 3D model for the alt static source lever, we can implement the static source system and use these sounds for the lever.

gilbertohasnofb commented 8 years ago

@onox would you maybe be interested in helping with the programming?

okroth commented 6 years ago

The error in the alternate static system's pressure is not induced by the different temperature. There are two items: the selector valve works like a piston during switching which introduces an short term error. An during flight the cabin pressure is different to the static port's pressure because the air streams differently around and through the cabin. Open windows, pressure drops. Close them, open cabin air vent and pressure is increased. Side slip also affects the pressure in a non-trivial way

okroth commented 6 years ago

Found some data in the POH of the 172R-NAVIII, which has the same static system (more or less). It gives detailed figures for the IAS with having the cabin vent and/or the windows open.

gilbertohasnofb commented 6 years ago

@okroth Great, could you please post what you have found here? If you can upload images only of the parts of the POH that are relevant that will make our job much easier! Or is it a long section? Thanks a lot!

okroth commented 6 years ago

172R_NavIII-IM-p164-165.pdf One can easily find such a POH using "172RPHBUS-00" as search term. Take the ones from Cessna support...

gilbertohasnofb commented 6 years ago

Great, many thanks!!

okroth commented 6 years ago

I found the momentary hops the VSI and altimeter make when alternate static is selected in a movie "Cessna C172R Pre-Flight". The VSI jumps momentarily to +250fpm when knob is pulled out, and -150 when pushed in. The altimeter jumps from 790ft to 800ft when knob is pulled, and back to 790ft when knob is pushed in again. In another movie "How to preflight a Cessna 172", the VSI jumps +400fpm and -300fpm.

gilbertohasnofb commented 6 years ago

We have a branch named bug-741 which contains two sounds I created for the alternate static source knob. @wlbragg should I close that branch and re-push those files to whatever branch we will continue with the interior work or would you like to tackle this on that very branch?

wlbragg commented 6 years ago

@gilbertohasnofb good question, how much other mesh/modeling work is there? I ask because it may make more sense to open a new, more generic, branch/PR encompassing multiple mesh issues and attach this, the sound, etc. to the new "generic" branch with "Fixes #XX" in the first comment. If not then I think we should use the sound branch and finish this entire issue before proceeding to any other mesh work.

gilbertohasnofb commented 6 years ago

I think it's very little mesh work so maybe it makes sense to simply do everything together. I will close that branch then and then merge the sounds when we tackle this in the next mega PR. Sounds good?

wlbragg commented 6 years ago

Who wants to do the system? Graphics are almost ready.

altstaticsrcknob

@gilbertohasnofb maybe you want to push your sounds now?

wlbragg commented 6 years ago

@gilbertohasnofb not sure how or more like "where" to put this?

altstaticsrcknob2

okroth commented 6 years ago

vertically same height as radio dimmer horizontally half way between throttle and mixture

gilbertohasnofb commented 6 years ago

image

@wlbragg I will fix the textures later, just put the knob in the correct position and I will fix the rest

gilbertohasnofb commented 6 years ago

Who wants to do the system? Graphics are almost ready.

Maybe let's just work on the 3D object and textures and leave the system for some other PR, this is already way more massive than it should be. I really want that mammoth getting merged asap. Would that be fine with you?

@gilbertohasnofb maybe you want to push your sounds now?

What sounds?

gilbertohasnofb commented 6 years ago

@wlbragg Do let me know once you have the knob in the correct place and I will fix the panel textures, ok?

gilbertohasnofb commented 6 years ago

Done the texture for the knob, see:

image

Will fix the panel once you have the position of the knob defined.

gilbertohasnofb commented 6 years ago

@wlbragg just one thing, this is only applied to 4X-CHV for now. If you like the textures I will sync it to all other liveries so you can make it livery dependent. Also, that new courtesy light has been applied to all textures and so it can also be made livery dependent.

wlbragg commented 6 years ago

I created a branch named bug-741 with two new sounds from the video by @algefaen: alt-static-push.wav and alt-static-pull.wav. So once we have the 3D model for the alt static source lever, we can implement the static source system and use these sounds for the lever.

I really want that mammoth getting merged asap. Would that be fine with you?

Sure, but only if we can get this PR cleaned up, finalized and merge asap so I can continue. I don't even have to push this model yet if you would rather wait for the system to go along with it.

I think everything else is appropriate for the PR (new key, master bat and alt logic, radio and panel light mesh edits).

So I will freeze after one more push of some miscellaneous stuff I have. Then we can clean-up and get this merged and start over.

Sound good!

Let me know if you want me to push the the Alt Static Source Knob now or wait!

gilbertohasnofb commented 6 years ago

I pushed it already.

wlbragg commented 6 years ago

Do let me know once you have the knob in the correct place and I will fix the panel textures, ok?

It is in place, you want me to push it then with my last commits or take a picture or both?

gilbertohasnofb commented 6 years ago

Just pull my last commits and push whatever you have. I will take a look at the sim later today and work from there.

wlbragg commented 6 years ago

OK, I'm going to freeze after that push until we merge this PR.

gilbertohasnofb commented 6 years ago

By freeze you mean feature freeze, right? As we still need to fix some stuff:

callahanp commented 6 years ago

I'd like to help in a small way after you determine what commit the freeze is on.

Let me know if there's a simpler way than the following to get your frozen version.

-Pat To obtain and use the frozen C172P from :

  1. git-clone your repository to my local machine.
  2. set the clone to the freeze commit or branch.
  3. Copy the clone to new directory ~/Downloads/Aircraft/C172P
  4. copy the clone to directory c172p in the fgdata Aircraft in place of the existing one.

I try it out from both directories and will report any issues I see to the list. Test plan: A. do some touch and go work. B. use the autopilot & all radios C. click or click/drag anything I can find in the cockpit. D. do a reset E. relocate the aircraft to a different airport F. exceed Vne G. stall and recover(I hope. I haven't done stall training in a real aircraft, so I might not know what to do exactly. Time to get out the POH)

On Sun, Jun 24, 2018 at 2:58 PM Gilberto Agostinho notifications@github.com wrote:

By freeze you mean feature freeze, right? As we still need to fix some stuff:

  • sync all textures among different liveries
  • fix panel textures due to new alt static knob
  • UV-map this knob
  • decide and implement a solution for the integral lights dilema
  • make the transponder backlit
  • possibly other bug fixes

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/c172p-team/c172p/issues/741#issuecomment-399779158, or mute the thread https://github.com/notifications/unsubscribe-auth/AF2R0BsSpAQNtEJk9rjSNPuzuVp76L7kks5t_-FxgaJpZM4H8wGN .

gilbertohasnofb commented 6 years ago

@callahanp Hi Pat, when I spoke of 'freeze' I just meant that @wlbragg and I should stop adding new features to that PR as it is gigantic already but I did not mean a 'feature freeze' as in a release or anything like that. The branch behind that PR is where we introduced the alt static air knob (therefore it is still not our master branch). If the work you want to do involves developing this system then I would suggest holding your horses for a few more days so that the branch interior-updates will be merged to our master branch making it all easier for you to create local work based on that.

But if you want just to test our branches and report bugs to us but not create work upon then, then it's quite easy and you can do that at any time and at any point in our development: once you have a local close you can use git checkout <branch> to load any branch in your local folder. So for instance you can use git checkout interior-updates to check the branch in which we are working in the night lighting, then you can do git checkout master to go back to the master repository. Every time we push or merge some new work to any branch, you can load the latest by doing git pull. Do let me know if this helps or if you have any other questions, ok?

Secondly, you don't need to substitute the c172p in FGData, you can have an alternative directory with your local clone of our repository and use that directory to load the aircraft. I use FGRun and I have two c172p's there: one from FGData, one from this repo.

wkitty42 commented 6 years ago

On 06/27/2018 12:22 PM, Pat Callahan wrote:

  1. Copy the clone to new directory ~/Downloads/Aircraft/C172P
  2. copy the clone to directory c172p in the fgdata Aircraft in place of the existing one.

neither of these steps needs to be done at all... just clone the repo into your ~/Downloads/Aircraft directory if that's where you fly your custom craft from... if you store your custom craft elsewhere, just clone into there... there's no problem flying from the actual repo on your local system... the craft doesn't write anything to the directory it is stored in...

you certainly do not want to replace your fgdata c172p... if you do, you cannot compare the two variations of the craft if desired... you also wouldn't be able to return to the default craft without having to do some other dancing about...

the launcher allows you to have more than one craft of the same name and you can see which craft you have selected by clicking on the craft after having selected it... the path is at the bottom of the information window... i assume that other launchers, FGRun, FGo, FFGo, and similar, allow for multiple craft with the same name, too... as long as the path for the custom craft location is listed in the launcher, it should be easily found and used...

wlbragg commented 6 years ago

@callahanp as soon as @gilbertohasnofb merges the "Interior updates and upgrades" PR #1103 You can pull and update your master branch if you already have one or clone master from https://github.com/c172p-team/c172p if you don't. @wkitty42 outlined where and how you can store this clone. Then you can and start working on this system. When ready we can guide you in the steps you need to take both to get the repo where you want it and then on how to do a Pull Request.

gilbertohasnofb commented 6 years ago

@callahanp Just one more thing: from your message it is not clear to me if you plan to work on the feature of implementing the alternate static system or whether you were more generally talking about testing the aircraft and just happened to comment on this very issue here. Do let us know of your plans and if you need any help with anything.

callahanp commented 6 years ago

Gilberto,

I have no current plans to participate in aircraft developement unless it aligns with my current project: building the first instrument for a C172P cockpit or panel. I do have a strong interest in the incredibly detailed work you and the rest of the C172p-team are doing. I hope to build on that to increase the accuracy of what I'm trying to construct.

At this point I'm trying to understand how items in the cockpit are projected on to the 2d screen and how measurements on a screen shot are affected.

What I am looking for is an understanding of which of these the terms below apply when we look at the C172P's instrument panel in Cockpit right and left and the ifr training views. I'll be trying to modify that view so the resulting display is Isomorphic. I'd then print that view at scale and take some real world measurements. For example, the true width of the panel at different heights.

I'm currently trying to understand the following terms and how they are applied in flightgear/simgear/aircraft to result in different views in flightgear.

Please do not try to define these terms in a response to this e-mail. I believe they are adequately described in https://en.wikipedia.org/wiki/Graphical_projection, other wikipedia articles and elsewhere on the internet or in books.

They are listed here to give a sense of what I think might be involved in learning this topic in some depth, to ask if I'm on the right track. I'm assuming flightgear uses some but not all of the topics. If I'm missing something you think's important, let me know.

Orthogonal Orthographic Projection parallel projection perspective projection Orthographic Drawing Orthographic Projection Isomorphic Isomorphic Drawing Isomorphic Projection perspective divide 1, 2 and 3 point perspective camera focal length camera distance affine affine transformation combining an orthographic projection with a perspective divide.

On Fri, Jun 29, 2018 at 4:52 PM, Gilberto Agostinho < notifications@github.com> wrote:

@callahanp https://github.com/callahanp Just one more thing: from your message it is not clear to me if you plan to work on the feature of implementing the alternate static system or whether you were more generally talking about testing the aircraft and just happened to comment on this very issue here. Do let us know of your plans and if you need any help with anything.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/c172p-team/c172p/issues/741#issuecomment-401470956, or mute the thread https://github.com/notifications/unsubscribe-auth/AF2R0H6X19tGCReQmMMCDJToA0ADUtSvks5uBpOBgaJpZM4H8wGN .

gilbertohasnofb commented 6 years ago

I have no current plans to participate in aircraft developement unless it aligns with my current project: building the first instrument for a C172P cockpit or panel.

@callahanp Not a problem, the misunderstanding came from you commenting on an issue about the alt static source knob. I see that you are answering us by email, but in our interface your response appears as a comment in that specific issue. See: https://github.com/c172p-team/c172p/issues/741 But no worries, all is clear now.

callahanp commented 6 years ago

By leaving that extended message attached to this particula/r issue, Is it likely that others in the group have even read it? Should I address a new e-mail to the group, not in reply to any other e-mail?

gilbertohasnofb commented 6 years ago

@callahanp It is likely that others read it, though sometimes people might skip a message if the thread is out of their area of expertise. Your best bet would be to create a new issue in our repository. Also as much as GitHub does work with email replies the absolutely best way to use it is through its web interface. Please open https://github.com/c172p-team/c172p/issues and create a New Issue (green button on top right) so that we keep topics separate from each other, ok?

wlbragg commented 6 years ago

@callahanp while most of the developers that work on this aircraft may know some of these concepts, what we do here doesn't directly relate to them as they have more to do with the "rendering" process. Something you might see discussed more often and in greater detail on the developers mailing list. https://sourceforge.net/p/flightgear/mailman/flightgear-devel/?limit=50&viewmonth=201807 I think you might get better feedback there.

wkitty42 commented 6 years ago

On 07/01/2018 11:40 AM, Pat Callahan wrote:

By leaving that extended message attached to this particula/r issue, Is it likely that others in the group have even read it? Should I address a new e-mail to the group, not in reply to any other e-mail?

you have to go to the github site and create new topics there... it would be a new issue unless it was a comment on a pull request or a file diff...

i don't know of any way to start a new issue on github via email... this isn't an email list ;)

wlbragg commented 6 years ago

@callahanp @wkitty42

I have no current plans to participate in aircraft developement unless it aligns with my current project: building the first instrument for a C172P cockpit or panel. [snip] What I am looking for is an understanding of which of these the terms below apply when we look at the C172P's instrument panel in Cockpit right and left and the ifr training views.

I don't see any of this as an "issue" pertaining to this development thread. That is why I am suggesting taking it over to the mailing list.

wkitty42 commented 6 years ago

On 07/01/2018 02:31 PM, wlbragg wrote:

I don't see any of this as "issue" pertaining to this development thread. That is why I am suggesting taking it over to the mailing list.

i don't have any problems with that... i didn't understand what he was talking about anyway... it just felt far deeper than what we go in the system when it comes to creating an object and placing it in a scene view...

wlbragg commented 6 years ago

it just felt far deeper than what we go in the system when it comes to creating an object and placing it in a scene view...

That is precisely my point and it isn't an issue or pertain to "development" in the context of this project.

legoboyvdlp commented 6 years ago

This was actually quite simple - I'll make a pull request. See #538

legoboyvdlp commented 6 years ago

Or not so simple - I'm actually sitting still here 😁 image

(see the VSI and ASI)

I think its a problem of units - do the gas laws expect any units? I'm using Kelvin and the default inHg. I thought all the physics laws expected kelvin? Let's try in Pascals.

legoboyvdlp commented 6 years ago

Ok - one problem is that the cabin heat is initialized to 0. Let's see if it can be initialized to the outside temperature.

Edit: it can't, apparently. Any suggestions as to how to do it?

okroth commented 6 years ago

cabin temperature is not relevant; the gas pressure equation does use a temperature as parameter, but this is referring to the average temperature of the complete gas column between ground and plane. Cabin ventilation is what changes the pressure as it adds a little dynamic pressure; open the vent and the pressure raises, open a window (or door) and the pressure drops.

dany93 commented 6 years ago

I've seen somewhere in my e-mail Gay - Lussac's Law.

Don't forget that the general gas law is P.V = N.k.T where k is the Boltzmann constant, N is the number gas molecules in the volume V.

Which can be written P = (N/V).k.T showing that the relation between P and T depends on N/V, that is on the altitude because this number of molecules per volume unit also depends on the altitude.

Gay - Lussac's Law: P1 / T1 = P2 / T2 is if the mass and volume of the gas are held constant (typically in a closed volume).

Anyway, it seems that this kind of calculation can't be useful in your case.

okroth commented 5 years ago

Right,

the alternate static source measures the same static pressure as the normal port, but with some error due to the cabin being vented or drained by dynamic pressure (which in turn is speed dependent). So you can take the normal static pressure and add an error term based on cabin vent and window being open. And even on ground you may see a short hopping of the pointers as the valve works like a small piston while switching.