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

Add an after market thermometer in the cockpit. #626

Open wlbragg opened 8 years ago

wlbragg commented 8 years ago

This was mentioned on a form post http://forum.flightgear.org/viewtopic.php?f=17&t=28187

I think it would be a nice addition to have some kind of thermometer in the cockpit.

I never really even looked at the one on the vent to know for sure, but according to @wkitty42 it is the external temp.

gilbertohasnofb commented 8 years ago

Good idea. Which kind of model do you have in mind? Something digital like a small clock or something like this? https://s-media-cache-ak0.pinimg.com/236x/5a/c2/fd/5ac2fd4b564ee7ff5f7e16b52b257b08.jpg

I just would like to hear the opinion of @tigert or @Juanvvc about this, have you guys ever seen such thermometer in a cockpit?

As for the thermometer in the right vent, it's indeed external temperature.

onox commented 8 years ago

As for the thermometer in the right vent, it's indeed external temperature.

That's correct, it's the external temperature.

wkitty42 commented 8 years ago

On 12/14/2015 07:07 AM, Gilberto Agostinho wrote:

Good idea. Which kind of model do you have in mind? Something digital like a small clock or something like this?

take the one out of the Piper PA24-150 Comanche... it is a stick-on there on the left window... black round disk with a LCD screen and a pushbutton to toggle it through C or F or Off...

stick it to the dash panel and tie it to the internal temperature calculations instead of the OAT as it is now...

wkitty42 commented 8 years ago

On 12/14/2015 07:55 AM, onox wrote:

As for the thermometer in the right vent, it's indeed external temperature.

That's correct, it's the external temperature.

especially since it says OAT right on it :wink:

kjd-nc commented 8 years ago

If one is concerned about the fact that such a thermometer is not a standard (or not common) piece of equipment, then would it be a big deal for it to be an optional feature of the console, defaulted to off?

As for digital vs a fluid thermometer, my first thought is, whichever is easier to read. Personally I wouldn't lose any sleep over whether there is a control to switch from C to F - I'm perfectly happy to set my preference in a menu or even in the set.xml file, and leave it there.

If we treat it as a stick-on option, then it seems it would not be wired in to the console lights, therefore you'd need to use the flashlight to see it in the dark. Seems reasonable to me.

gilbertohasnofb commented 8 years ago

If one is concerned about the fact that such a thermometer is not a standard (or not common) piece of equipment, then would it be a big deal for it to be an optional feature of the console, defaulted to off?

That's also my concern (hence my PM to you earlier today :wink: ). Maybe we can add a check box (default state = unchecked) in the aircraft menu which would then add the thermometer.

Probably a simple car dashboard thermometer would do the trick:

According to the instructions of this specific little model:

Display -19.9°C ~ 80°C. To press the first button is to switch the temperature on Celsius(°C) to Fahrenheit(°F) To press the second button for a little long time is to reset the temperature.

wkitty42 commented 8 years ago

oops! that should be the "Piper PA24-250 Comanche" i referenced above... FGADDON/Aircraft/pa24-250... the stick-on is what they have as the OAT in that craft... looks like the code for it is all in Models/oat... it shouldn't be too hard to change "oat" to "iat" everywhere and then tie it with the existing IAT calculation code??

gilbertohasnofb commented 8 years ago

@wlbragg Can you post a screenshot of this thermometer you are recommending?

wlbragg commented 8 years ago

I don't have one in mind. I did a search on the net for one that might be commonly used in aviation and all I found was external, that must be the main focus when it comes to temp. So I don't care what we use except that if it is not standard then it should be an option. Maybe they are not widely used because you can feel the temp with your senses. I though it might be useful in the simulation case because we can't feel the temp and need a reference.

onox commented 8 years ago

The temperature property for the cabin air is /fdm/jsbsim/heat/cabin-air-temp-degc.

gilbertohasnofb commented 8 years ago

@wlbragg I actually meant @wkitty42, my mistake. So @wkitty42 can you post a screenshot of the thermometer you recommended from that Comanche?

wkitty42 commented 8 years ago

Yeah, the craft is in fgaddon, though. But here is the screen shot. As you can see, it is stuck onto the window.

PA24-250 stick-on thermometer

Push the white button to switch to F and off. It also turns off by itself after a few minutes just like a real one you can get at the drug, grocery or auto parts store.

There's an .ac file for it in the previously mentioned directory so it should be easy enough to make it rectangular if desired. My main thing is that a thermometer is available and should be easy enough to put in our craft and tie to the IAT stuffs rather than the OAT stuffs.

wlbragg commented 8 years ago

FWI: I don't think I would stick it to a window though, in RL it would be colder than the internal air temp, I would think.

wkitty42 commented 8 years ago

That's why I said stick it on the dash. The above one is in the PA24-250 Comanche specifically for OAT as there's no such instrument in that craft :wink:

The xml files that come with it appear to have positioning x,y,z coordinates in them. There's also a section or two in another xml file to include it as well as providing some sort of animation. at least, it is listed within animation tags but the only animation I see is pressing the white button and making the LCD characters turn on or off.

wlbragg commented 8 years ago

Sorry, wasn't reading everything.

gilbertohasnofb commented 8 years ago

@wkitty42 Thanks for the screenshot, it looks good to me.

So gang, are we decided about adding it as an option in the aircraft dialog? If so, I volunteer to do that myself (and change the code for the cabin temp).

FWI: I don't think I would stick it to a window though, in RL it would be colder than the internal air temp, I would think.

Where would you stick it then, to the panel itself? If so, what about here?:

fgfs-screen-001

onox commented 8 years ago

Is the checkbutton really necessary? If it's visible as an instrument on that red spot, I don't mind it being always there.

onox commented 8 years ago

Can we reserve the empty spot on the left of it for a future carburetor temperature instrument?

gilbertohasnofb commented 8 years ago

Is the checkbutton really necessary? If it's visible as an instrument on that red spot, I don't mind it being always there.

The thing is this isn't a standard instrument, hence why we have been talking about adding it as an option. In the end it isn't that much of a big deal.

Can we reserve the empty spot on the left of it for a future carburetor temperature instrument?

Sure.

onox commented 8 years ago

But don't we already have too many checkbuttons? It's not like the instrument has to compete with some other instrument for installation/space :stuck_out_tongue_winking_eye:

wkitty42 commented 8 years ago

On 12/15/2015 04:34 PM, wlbragg wrote:

Sorry, wasn't reading everything.

no problem... no need to apologize :wink:

gilbertohasnofb commented 8 years ago

Yeah, I know, we have tons of check buttons, but still... But anyway, I will just add the thermometer there and then we see. I improve its texture and now I am trying to adapt the code from the Comanche to our plane. As soon as I am done I will create a PR so you guys can check it out.

gilbertohasnofb commented 8 years ago

Hmm, I am having some difficulties with this one. The model is already in the right position, the new texture looks good. The Nasal code that controls the switch work fine, but I can't make the digital display work! I will create a PR for it, and I'd be very grateful if someone (@onox, wink, wink) could help me out here :smile:

onox commented 8 years ago

Can we reserve the empty spot on the left of it for a future carburetor temperature instrument?

Sure.

@gilbertohasnofb I now remember that the amphibious already uses that spot :cry:

gilbertohasnofb commented 8 years ago

I now remember that the amphibious already uses that spot :cry:

That's not a big problem, I can move it elsewhere. I will think about it for a second and propose something here.

gilbertohasnofb commented 8 years ago

So which one do you prefer?

fgfs-screen-002

fgfs-screen-001

I think the top one is better because it's visible even if the yoke is on. The second option is awkward and in RL would be a nightmare for the pilot to look at.

onox commented 8 years ago

How about the position above the right yoke? (To the right of the ADF radio)

gilbertohasnofb commented 8 years ago

How about the position above the right yoke? (To the right of the ADF radio)

There is a poster there in the OH-CTL livery added by @tigert, and I think it's a very nice touch that I wouldn't like to be deleted.

onox commented 8 years ago

Argh, we're running out of space :laughing: Hmm, I think neither positions are good. I'm not sure how readable the one on the left side is.

How about putting it above the right cockpit door? (A bit of an odd place though) Or between the trim and handheld mic?

gilbertohasnofb commented 8 years ago

How about putting it above the right cockpit door? (A bit of an odd place though) Or between the trim and handheld mic?

I thought about those, but it looks awkward as hell... :sob:

gilbertohasnofb commented 8 years ago

What about putting it similarly to the top image above, but on the right wall instead of the left?

onox commented 8 years ago

That's a good compromise :+1: :smile:

onox commented 8 years ago

Can you make it a 3D physical object? (Not a flat 2D picture)

gilbertohasnofb commented 8 years ago

Okay, I will do it now, and then go to sleep :sleeping:

gilbertohasnofb commented 8 years ago

Can you make it a 3D physical object? (Not a flat 2D picture)

What do you mean?

gilbertohasnofb commented 8 years ago

It is a 3D model.

onox commented 8 years ago

Okay, it looked like it was flat when you put in its original instrument position (https://github.com/Juanvvc/c172p-detailed/issues/626#issuecomment-164904630).

gilbertohasnofb commented 8 years ago

I mean, the model is really simple, it's just a shallow cylinder with a single button. Not even the "BAT" button is 3D. But I guess it's good enough for what we need, and people can improve it later.

gilbertohasnofb commented 8 years ago

Done and pushed, see: fgfs-screen-001

That's it for me for today, see you all tomorrow :smile:

onox commented 8 years ago

Sweet dreams @gilbertohasnofb :smile:

gilbertohasnofb commented 8 years ago

Thanks! :zzz:

onox commented 8 years ago

We have a branch bug-626 that contains some work already done. The file Models/Interior/Panel/Instruments/thermometer/thermometer.xml contains stuff used by the old 2D panel. Most of the code in that file needs to be deleted since it is useless.

See https://github.com/Juanvvc/c172p-detailed/pull/630#issuecomment-164933430 how to fix this issue.

Once the issue has been fixed, PR #630 can be reopened.

gilbertohasnofb commented 6 years ago

@onox @wlbragg I have just pushed new commits to branch bug-626. I have repositioned the thermometer (it was floating above the copilot's seat), made some improvements to its texture and added a new texture to the thermometer folder with all 10 digits as well as negative, dot and degree signs (which are needed for the temperature), as well as a F and C letters. I also tested that the function mode button was working, so the Nasal aspect is also done.

All that is missing is to add the digit plaques to the ac model and create the logic. Here is how it will end up looking like:

thermometer

Anyone volunteers to take over from here? I am afraid I just don't know Blender enough to carry on from here.

onox commented 6 years ago

@gilbertohasnofb I think you need to split window_base into several objects. (And delete sphere7 which doesn't seem to be visible). Then you can use the textranslate animation for each of the digits.

onox commented 6 years ago

Why don't you give it a try? It's a separate model (not the main mesh) so you cannot really mess things up.

onox commented 6 years ago

You can select window_base and then do subdivide with 6 cuts, then select some edges and press x and choose "Disolve Eges". Then split the objects (select the 4 vertices of a digit, then press p and choose "Selection").

Maybe @wlbragg knows some better techniques.

gilbertohasnofb commented 6 years ago

@onox thanks for all the info, I will give this a shot.

wlbragg commented 6 years ago

Maybe @wlbragg knows some better techniques.

Sounds about right considering I have been doing this exact step repeatedly over the last couple weeks, subdivide repeatedly and then clean up the mess.

I haven't looked at the model itself yet. @gilbertohasnofb if you get stuck let me know and I can help you out with it. Oh, and there is an indoor/outdoor panel thermometer I hooked up in the j3cub you might be able to use for coding reference.

gilbertohasnofb commented 6 years ago

thanks, I will take a look at that!

gilbertohasnofb commented 6 years ago

@onox I believe this will involve not only creating the digit objects, but also UV-mapping. I am sorry but UV-mapping in Blender is beyond what I am capable of, and learning it will take quite a while.

If someone wants to create these objects for the digits, we need 35 of them:

I can then implement the logic of when each is visible.