Skip to content
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

Create FG1000 panel variant #1333

Closed
wlbragg opened this issue Aug 21, 2020 · 110 comments · Fixed by #1366
Closed

Create FG1000 panel variant #1333

wlbragg opened this issue Aug 21, 2020 · 110 comments · Fixed by #1366
Assignees

Comments

@wlbragg
Copy link
Collaborator

wlbragg commented Aug 21, 2020

I hope there isn't already an issue for this. I couldn't figure out how to effectively search through the existing issues.

Because glass is now the future of aircraft, I think we need a glass variant. I did the PA-18 and it really wasn't that difficult to retrofit it. We could do the same thing with our flagship and probably should. I think it would have to be done the same way as I did the PA-18 and it would have to have it's own set file and that would be the only way to access it. Not on the fly like the gear and engine changes. It's too heavy and cause the other PA-18 variants to lag even when in the background.

What I think is needed most for this is just some good cockpit reference material the matches our c172p model as best we can find. This winter when I'm holed up maybe I can start on this with a little help here and there.

maxresdefault

@wlbragg wlbragg added this to the Future features milestone Aug 21, 2020
@wlbragg wlbragg self-assigned this Aug 21, 2020
@legoboyvdlp
Copy link
Member

The Cessna 172S comes from the factory with the Garmin. It has a few minor changes like fuel injection and a 180hp engine. It might be worth investigating the differences to see just what else would need added.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 8, 2020

It's a start!

fgfs-c172p-fg1000

Panel is clean and glass is more or less sized. really not much to this, just move some of the stuff around, add a few small gauges and change the style of some of the switches.
I think it's supposed to be a Fuel Injected 180. @dany93 is there some changes we would need to make to the 180 to better fit the specs?

@dany93
Copy link
Collaborator

dany93 commented Oct 9, 2020

is there some changes we would need to make to the 180 to better fit the specs?

From the FG engine point of view, i think there is no difference. A 180 hp engine is a 180 hp engine.
I don't know what are the differences between the actual performances, of the engine with carburetor and the injected engine (torque vs RPM?) but anyway, the JSBSim engines are simple ones, constant torque if I recall well (if someone can fix me, thanks!).

At my knowledge, an injected engine is much easier to start than a carburetor one. Less capricious. More stable functioning parameters. These are secondary considerations for simulation.

By elsewhere, the engine lack of feeding (fuel starvation) at negative g's will make no sense from the carburetor point of view, but it will still exist from the main tanks point of view. Maybe a longer lag?
The carburetor icing will make no sense. But I don't know what happens for the air input pipes.
[EDIT]
The Pros And Cons Of Carbureted vs. Fuel Injected Engines
Fuel Injected Engines: Different Types Of Ice Hazards

you can get induction icing, or a clogged filter

[/EDIT]

Obviously, no primer. (please see my next message for complement)
(I can forget some, I have no experience of real aircraft engine maintenance and performance)

The constant level (collector, float) tank will have no real meaning at all, but this is only a (painful...) cheating, artifact for the two available engines. Unseen from the user, no effect on the performances.

@dany93
Copy link
Collaborator

dany93 commented Oct 10, 2020

@dany93 wrote

Obviously, no primer.

I wrote it too quickly and too short.
My reasoning (not based on real life knowledge) was that the engine is already an injected one.

But a priming procedure is written in the Cessna 172S N552 SP (Engine Model Number: l0-360-L24) POH:
(p. 4-12, PDF 96/384)

lf engine is warm, omit priming procedure of steps 6, 7 and 8 below.

  1. Auxiliary Fuel Pump Switch -- ON.
  2. Mixture -- SET to FULL RICH (full forward) until stable fuel
    flow is indicated (usually 3 to 5 seconds), then set to IDLE
    CUTOFF (full aft) position.
  3. Auxiliary Fuel Pump Switch -- OFF.
  4. lgnition Switch -- START (release when engine starts).
  5. Mixture -- ADVANCE smoothly to RICH when engine starts.

lf engine floods (engine has been primed too much), turn off
auxiliary fuel pump, place mixture to idle cutoff, open throttle
1/2 lo full, and motor (crank) engine. When engine starts,
set mixture to full rich and close throttle promptly.

(probably excessively complicated, too much to be accurately rendered in simulation)

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 13, 2020

@dany93 thanks for the logical thinking. That gives me a sound starting point.

I've actually had a chance to work on it a bit. I updated the image above to reflect the changes I have made so far.

System wise I temporarily bypassed the primer system if using the glass panel, but I think I will eventually have to create some logic to mimic the fuel pump system.

It looks like the electrical bus is a little different than the current c172p as there is a bus 1 and a bus 2.

@tonghuix
Copy link

To be honest, I prefer C172S instead of P variant.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 15, 2020

@tonghuix pictures and information would help, educate me if you have the time! I honestly didn't know there were different versions. If using the 172p for the base then I would lean toward whichever version fit that best.

One thing I was a bit confused by was the addition of the KAP140. I though the G1000 had an autopilot interface? Also where I put the KAP140 for now is not where it is going to stay if we even use it as it is too far away from the pilot. I have seen it right between the steam gauges and the power and mixture knobs. But i have to rework the panel slightly to do that.

@tonghuix
Copy link

@wlbragg I am training in a C172SP with G1000 variant right now. For the autopilot, it could using either KAP140 or GFC700(which is optional in G1000). If KAP140 is installed, the panel should arrange a place for it; if GFC700 is installed, it would not require dedicate place.

C172 G1000 POH: https://6082a08e-f6ee-43ce-a788-78d22ce0c9ae.filesusr.com/ugd/fe4543_d932b973b08d48519e6e0e69b140adb2.pdf

C172 Training Supplement: https://s3.amazonaws.com/atp-program-docs/supplements/cessna-172-training-supplement.pdf

G1000 Cockpit Ref: https://static.garmincdn.com/pumac/190-00384-12_0A_Web.pdf

G1000 Pilot Guide: https://static.garmincdn.com/pumac/190-00498-07_0A_Web.pdf

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 15, 2020

@tonghuix thank you, the data will really help once I study it.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 16, 2020

To be honest, I prefer C172S instead of P variant.

@tonghuix what is the difference between the two? The Image above of the work I have already done (the work competed that is above the panel that has the ignition and breakers) looks to be the same as in the reference material you provided. So I am wondering why you made the above comment as if I was modeling it after the p and not the s or sp? So far I was just going off a couple pictures I found searching on the web.
https://redcliffeaeroclub.com.au/wp-content/uploads/2015/12/ivw_cockpit_med-1030x687.jpg
https://www.regalair.com/wp-content/uploads/2016/02/N97AT-Panel-1900X1121.jpg
https://upload.wikimedia.org/wikipedia/commons/thumb/7/77/Cessna_172SP_G1000_01.jpg/1600px-Cessna_172SP_G1000_01.jpg
I thought they were of the s or sp. Can you explain this so I understand your concern, why you may have thought I was modeling the p? Is there a 172p with the G1000? Or, what is the "p" your referring to?

@tonghuix
Copy link

tonghuix commented Oct 16, 2020

@wlbragg Well, G1000 is an optional instrument, aircraft owner could install it or not, at least theoretically. However, due to 172P is older one, I do not see a "P" model with G1000. Another difference is yoke, SP's yoke looks like a little bigger than P's. SP's visor is more higher, and left and right portion at same level (P's right side a little lower).

I just agree @legoboyvdlp 's opinion, it is better we start modeling 172SP which is a newer model. And it is also a good chance to solve #1310 , make our 172 perfect.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 16, 2020

Ah, OK, I think I understand, thanks!
Currently I am not sure I have the skill set to do much other than convert our p to an sp, which I gather by your explanation is not completely realistic.
If we could get someone to model the sp, that would be ideal.
I might be able to do some of the changes in #1310 depending on what exactly they entail, I was fairly successful in cleaning up the front air intake, wing tips, rudder to tail connection and a bunch of miscellaneous mesh irregularities of the fuselage. I'll take a closer look at some of this and we'll see!

@legoboyvdlp
Copy link
Member

legoboyvdlp commented Oct 21, 2020

That's really nice @wlbragg :)

I wish the screen could have some anti-aliasing as its very hard to see and the update rate is somewhat low on the engine parameters of the MFD. I guess these are for the upstream FG1000 not the 172 though.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 22, 2020

Here is what it looks like at night, so far. Man, do we have a lot off effects to filter through when making a new variant such as this. I still have a lot of work to do on the panel containing the breakers, Throttle and mixture controls need reposition, others need removed. We need some new style stitches and knobs as well.
Procedural lights for the gauges need moved and turned on, other miscellaneous items.
So technically this is a c172p retrofit to a glass panel, but it is being set up in a way that if we get a new c172sp model it should be easy to add this work to it without a bunch of effort.

fg1000

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 22, 2020

@legoboyvdlp my anti-aliasing is actually shut off for other reasons, this may look better on a FlightGear installation with it turned on.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 24, 2020

Cleaned off more of the lower panel.

fgfs-20201024224515

@gilbertohasnofb
Copy link
Member

Wow this is looking really good! Amazing job 👏

Just a minor thing I seem to notice in this screen shot: the white avionics switch seems to be rotating on a strange axis, look how the left one does not match the one on the right neither at the top nor at the centre of the switches.

@tonghuix
Copy link

Cleaned off more of the lower panel.

fgfs-20201024224515

No Audio Panel? It is essential! And you need four nobs to adjust cockpit lights (PFD, MFD, avionics, standby instruments) . Move outside light switches to lefthand under Master and AV switches. 12V port should lower near shut-off valve.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 25, 2020

The audio panel is the thin strip between the MFD's?

@tonghuix
Copy link

The audio panel is the thin strip between the MFD's?

Yep! Here is a link https://www.faa.gov/training_testing/training/fits/guidance/media/G1000.pdf, it is better have a look at the graph at Pg2, it explain lots of things.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 26, 2020

A little more work done on the panel.
Still to do...
Activate all the light switches and knobs.
Fuel Pump System.
Hook up audio panel.
Batt test system.
Other misc.

fgfs-20201028002246

fgfs-20201028002344

fgfs-20201028002608

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 28, 2020

@tonghuix
I didn't research what interior lighting goes with what dial or knob. Also, the green light and the Batt Test system, I assume it is the replacement for the Low Voltage light?
If you get a chance to research those systems and feel like taking the time to lay it out for me, I would certainly appreciate it. It might keep me from having to do a bunch of reading and searching for the information.
Also I need to find the bus 1 ans 2 layouts eventually.
Is SW/CB panels the MFD's?

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 28, 2020

I'm thinking of giving the choice of using either the KAP140 or the GFC700 when using the FG1000 variant.
I need to see if I can easily hook up the GFC700 and if it is tuned .at all for the c172

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 29, 2020

fgfs-20201106062055

fgfs-20201106082640

Well, I'm really close to finished with the additional graphics needed for the variant. It's time to add systems and edit systems. The electrical system is probably the biggest issue. Lots of new breakers to tie in.

@tonghuix
Copy link

tonghuix commented Oct 29, 2020

Here is a graph for electrical system of C172S: https://solarflyer.files.wordpress.com/2020/01/fuel-elec.pdf
And a electrical system simulator http://avitmedia.aero.und.edu/c172sElectrical/index.html

For the green light, it is only a indicator of STBY BATT, when I turn the switch to TEST position (will spring back to OFF position if no press), it will light up. And any time STBY BATT kicks in, the green light will on as well. For Low Voltage, there should be LOW VOLT annunciation in G1000.

For MFD, Avionic switches will control it.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Oct 29, 2020

@stuartbuchanan
I tried adding in the FG1000/GFC700.xml and I am getting a considerable amount of oscillation in the heading axis. Any guide to tuning this would be of great help.

I really like having the option of using the GFC700 built in auto pilot. I do want to keep the ability to choose between the two but that may have to be a variant option instead of a GUI option. I haven't really researched how or if we could do this on the fly.

@tonghuix
Copy link

@stuartbuchanan
I tried adding in the FG1000/GFC700.xml and I am getting a considerable amount of oscillation in the heading axis. Any guide to tuning this would be of great help.

I really like having the option of using the GFC700 built in auto pilot. I do want to keep the ability to choose between the two but that may have to be a variant option instead of a GUI option. I haven't really researched how or if we could do this on the fly.

Just an info, our school do own some C172Ss equipped with KAP140 autopilot. But most of them are buggy, and not very reliable, mechanics are removing them. A lot of my flight experience with such autopilot are really not good feeling, such us disengage button not work, banking too much, cannot maintain altitude, or twist yoke super sluggishly.

@NewoIsTaken
Copy link

Also, it seems like when I arm the standby battery, the PFD doesn't turn on.

@hbeni
Copy link
Contributor

hbeni commented Dec 17, 2020

Sadly, I never doing off normal behavior of this system. But for cold weather, my experience is the engine will not easily start when the oil temperature below 10C, so need some warm before start. For hot weather or just restart engine very short priod after shutdown (oil temperature above 150F), due to vapor lock in induction system pipes, it is easily flood the engine, so prime 3 sec is enough, and add throttle 1/2 inch in or half of the full range.

Hi @wlbragg,
I'm not sure if you already looked at my injection simulation at the c182s/t, but the temperature sensitive start (and also warm start without priming needs) is already simulated there. I did plenty of research for the numbers, but didn't found anything concrete; so i tried to model it by gut feeling i got from lots of articles and videos. i think it is relatively good. At about 0° it gets notably harder to prime correctly and it will get really hard to prime when going to about -10°C or lower, and impossible at -25°C (technically, but for humans this is not possible to achieve). You definitely should use the preheater in those conditions (< -6°C the POH says its a must).
The code for all that is mostly in fuel.xml.

For the EIS display, i already have tried to get that working, but i really think there is something missing in the FG1000 core (or i just lack the knowledge to interpret the nasal):

@wlbragg
Copy link
Collaborator Author

wlbragg commented Dec 17, 2020

@hbeni I did look at it and my first reaction was one of intimidation. But I will get back to it and I think it is the way I want to go, I am also intimidated about making my own so I think in the long run adopting yours would definitely be the way to go. It's just a bit more complicated than I was expecting, nothing about what you did, only my own comfort in my abilities to adopt and implement it.

@wlbragg wlbragg closed this as completed Dec 17, 2020
@wlbragg
Copy link
Collaborator Author

wlbragg commented Dec 17, 2020

@D-ECHO
I can't reproduce the autostart nasal error, was that maybe after a restart or something else?

@NewoIsTaken
Also I can't reproduce this, If I have everything off and throw that switch the left glass panel comes on as per POH.
Ah, just noticed you said "arm" I'll read the docs again and see if I understand your issue, thanks.

@wlbragg wlbragg reopened this Dec 17, 2020
@wlbragg
Copy link
Collaborator Author

wlbragg commented Dec 17, 2020

Wow, don't know how that happened, accidentally closed the issue there for a time?

@tigert
Copy link
Contributor

tigert commented Dec 17, 2020

I'm thinking of giving the choice of using either the KAP140 or the GFC700 when using the FG1000 variant.
I need to see if I can easily hook up the GFC700 and if it is tuned .at all for the c172

Ugh, the KAP140 exists in early G1000 C172P's only because the GFC700 was not yet certified at the time. The integration is horrible, the Garmin only drives it left-right and you need to set altitude, baro, vertical speed etc modes in the KAP140. There is actually a single turn&bank gauge behind the right screen (MFD) of the G1000 that is the attitude / heading reference for the KAP140, the G1000 just says "turn left, now turn right, now straight". Ugh,

The G1000 has all that functionality but it cannot be used (and like the alt selector "works" in the G1000 but it does absolutely nothing apart from being a "postit note" so you can remember the number if you dial it in.) - that was the only option they had when they wanted to get the G1000 in the plane if they wanted an autopilot.

I mean, by all means, give a choice but I don't understand who would be such a masochist to choose it if GFC700 is an alternative... :-)

@stuartbuchanan
Copy link

stuartbuchanan commented Dec 17, 2020 via email

@wlbragg
Copy link
Collaborator Author

wlbragg commented Dec 17, 2020

Just an info, our school do own some C172Ss equipped with KAP140 autopilot. But most of them are buggy, and not very reliable, mechanics are removing them

That is why I choose to leave the choice. Because of statements like "our school do own some C172Ss equipped with KAP140 autopilot". I think of it the same I do about any upgrades done to any aircraft. We are always improving on systems and technology in the real world, but that doesn't erase the history of what used to be, I really think it is important to retain that history when possible and practical. If I hadn't evolved this variant in the steps I took, which was using the KAP140 first, then adopting the GFC700, just like the timeline in real life, I may not have given this choice. But once the work is done, I see no need to remove it. It is a reality that actually existed and I guess I leave it mostly for nostalgia.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Dec 17, 2020

RE: KAP140 - I suspect you'd struggle to get accurate integration between
the KAP140 and the FG1000.

@stuartbuchanan
I think @tigert is referring to the implementation of the GFC700 in the "real world" G1000 equipped aircraft. And yes the integration with the fg1000 is about the same, so I leave it alone. It is a stand alone variant and has no connection anymore with the fg1000/GFC700 variant, no more work to be done. It's a done deal.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Dec 17, 2020

I'll take a look at the CHT......
. The problem is almost certainly that the wrong properties are being referenced in the EFIS.nas

@stuartbuchanan
I think it is more than that, I think you may not have ever implemented the "Fuel Calc" portion.
See #1333 (comment)

@hbeni
Copy link
Contributor

hbeni commented Dec 17, 2020

What i don't really understand - why does the G1000 do its own calculations on fuel, if it could just use the output of the tanks sensors?

@stuartbuchanan
Copy link

stuartbuchanan commented Dec 17, 2020 via email

@NewoIsTaken
Copy link

@wlbragg This is what is happening: video.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Dec 18, 2020

@NewoIsTaken @D-ECHO
I haven't had much time to take a real close look at this but I will soon. However, are you sure you are using the most current version on the repository. Because I so far cannot reproduce this. I switch to ARM and the PFD lights up. Also, I vaguely remember actually seeing that nasal error in the past and I thought I got rid of it. But I also don't remember if it had to do with a reset or something like switching airports or seaports on the fly?

@NewoIsTaken
Copy link

@wlbragg No problem, just tell us if you uncover something!

@D-ECHO
Copy link

D-ECHO commented Jan 2, 2021

Unfortunately, this still happens with newest FG and c172

@wlbragg
Copy link
Collaborator Author

wlbragg commented Jan 3, 2021

@D-ECHO @NewoIsTaken I just pushed a small change to the interface controller code via a patch from Stuart. Please pull a fresh copy, make sure you clear your aircraft data, and see if your current issue is fixed. If not, make sure you send me the exact error. Because I am getting no errors and the backup bat logic is working correctly for me.

@NewoIsTaken
Copy link

@wlbragg, PFD comes on right as I hit the standby battery on switch now!

@wlbragg
Copy link
Collaborator Author

wlbragg commented Jan 3, 2021

@NewoIsTaken Thanks!

@wlbragg
Copy link
Collaborator Author

wlbragg commented Jun 25, 2021

@NewoIsTaken @D-ECHO

I pushed some new interior lighting logic for the panel knobs. All that is left for the interior lighting is the Pedestal light which will be a new lightmap.
Also I may still add some low spec rendering lighting controllable with the knobs
The audio panel legend should be lit up as well, controllable with the Avionics knob, but isn't working, a bug I haven't tracked down yet.

I'm, not sure how much the electrical has changed from my last push, only that I am pretty happy with it at this point.

@NewoIsTaken
Copy link

@NewoIsTaken @D-ECHO

I pushed some new interior lighting logic for the panel knobs. All that is left for the interior lighting is the Pedestal light which will be a new lightmap.
Also I may still add some low spec rendering lighting controllable with the knobs
The audio panel legend should be lit up as well, controllable with the Avionics knob, but isn't working, a bug I haven't tracked down yet.

I'm, not sure how much the electrical has changed from my last push, only that I am pretty happy with it at this point.

Great! Thanks!

@wlbragg
Copy link
Collaborator Author

wlbragg commented Jun 27, 2021

Notes:
add glass panel instruments to aircraft data

Why are all instruments now inheriting c172p-interior-radiance -> c172p-interior
Verify going straight to c172p-interior as c172p-interior-radiance has no params anymore and c172p-interior has the residual-ambience and ra-irradiance now. I think the change was because of the removal of the shadow cube.

@NewoIsTaken
Copy link

@wlbragg I will try to test out the FG1000 today or sometime soon.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Jul 21, 2021

Notes to myself:
save/load
flight recorder
tutorials
add breakers to avionics?
more c172p / fg1000 isolation...
new isolated .ac for c172p interior.

check hobbs logic

@wlbragg
Copy link
Collaborator Author

wlbragg commented Jul 25, 2021

OK, I pushed a major refactoring of the c172sp electrical. I think it is in really good shape. It includes stby amp and volt readings for the EIC display once I get the changes pushed to fgdata. Using the formula amps * bus volts for each power supply circuit and then converting the total watts back to amps using watts / bus volts corrects the electrical power usage in electrical.nas and electrical-fg1000.nas. So it is easy to assign the actual draw per instrument. If anyone has the time to really look at the numbers there are some debug properties that can be un-commented out in order to watch what's going on in real time.
I think I am to the point of finishing up a few miscellaneous items such as save/load parameter, flight recorder updates and maybe some fg1000 tutorials. Please check it out and test where you can, everyone.

@wlbragg
Copy link
Collaborator Author

wlbragg commented Aug 2, 2021

Another major refactoring pushed. Also cleaned up flight recorder, MP, hot spot text. The major refactoring was to isolate c172p exclusive content from c172sp exclusive content. It should lighten the load slightly for all variants and helps group things in a more understandable fashion.
I think we are really close to being able to make a 2020.4 version tag and see if we can get @stuartbuchanan to put it in fgdata next so we can get some serious testing.
So @legoboyvdlp and @dany93 and any others that can make some time to test this latest refactoring, it would be greatly appreciated. Barring any major issues, I think maybe in a week or two I will ask for a merge and then create a new post compositor release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants