HHS81 / c182s

Cessna C182S (1996 model) for FlightGear
GNU General Public License v2.0
26 stars 9 forks source link

Idea/ Concept: place chocks/ safetycones/ fuel-trucks etc. via model-manager #55

Closed HHS81 closed 8 years ago

HHS81 commented 8 years ago

Place the chocks/ safetycones via model-manager like the walker

Advantage:

Challenge: nasal script and making the objects remove from scenery when not needed

Basic Idea: Walker

HHS81 commented 8 years ago

Update: took the code from the walker - and it works!! :smile: The wooden-chocks.ac holds the aircraft at its place - even with full thrust! The wooden-chocks keeps their position- even if the aircraft is moving. No flying trucks.... :yum:

nobrakes

Push soon

HHS81 commented 8 years ago

Known Issue: the point of the ground reaction is exactly at the middle bottom of the wheel - that's explain the offset to the chocks in the picture.

Guess the later makes more sense, the first one is more realistic but might be problematic on the normal ground....

HHS81 commented 8 years ago

Known current Issue as well:

gilbertohasnofb commented 8 years ago

I'd say the yellow chocks would fit better, the idea of the wooden one is to look "improvised", just like one can expect to find in a bush plane in the middle of Alaska for instance :smile:

As for the fuel-trucks, I don't think it's common to refuel these single engine planes with trucks, but rather using a gas pump in the airport, though I may be mistaken here.

HHS81 commented 8 years ago

Hi,

yep, the yellow chocks are indeed better. The truck was just mentioned as an example. The whole thing is easy to implement, there is no bad interaction with the walker and no fps-impact. Maybe something for the c172p...

I found that today: http://www.aircraftspruce.eu/images/products/Airplane_Ready_to_Refuel_Small.jpg Maybe?

The Cessna 182 allows external power supply, so at least a small ground power unit will be implemented, like I did for the EC 135 P2.

gilbertohasnofb commented 8 years ago

Sounds all good, but about the small refuel unit, how much fuel does that carry? Can you really fill two tanks with it?!

HHS81 commented 8 years ago

Probably not much enough....but there are even bigger ones, pulled by cars.

Anyway, I think with the chocks we have already a nice feature. This feature is maybe more interesting for bigger aircraft like dhc6 or airliners. Imagine stairs placed via model-manager, and you can enter the aircraft with the walker via the stairs....

HHS81 commented 8 years ago

Had some troubles with the gui.....but solved after hours.

Just a ladder is missing, so Waldo can check Fuel Quantity and Fuel Filler Caps ....

nobrakes2

gilbertohasnofb commented 8 years ago

If you need any help with the chocks//tie-downs/pitot tube cover logic and GUI, let me know (I did quite a lot of the work on them on the c172p). And by the way, your shots are incredible as always, that first shot is really beautiful!

HHS81 commented 8 years ago

Thanks :smiley: The problem was, that dialog-apply in combination with a setlistener applies the value to all sub-objects in the GUI. Took me a a lot of time to find out and how to solve this.

Now, a property is simply toggled via the GUI. This triggers a nasal-script who gets the position, orientation and altitude of the aircraft and places a model with this values applied in the scenery. The model is recognized as scenery-object by the aircraft, so there is a collision-detection (without crash). The model can be removed from scenery, and even be moved in runtime.

So actually at least for the chocks there is no complex logic needed.

For the tiew downs I will need some help. As now, I understand that a external force is used. But the whole logic behind looks rather complex to me- yesterday I failed to implement this.

I will update today the missing ladder, and finally give the GUI a shape, so I would be happy if you then can give me help to the tie-downs.

gilbertohasnofb commented 8 years ago

Great!

So actually at least for the chocks there is no complex logic needed.

I think two of the reasons for the logic used in the c172p's chocks are: 1) there are two types of chocks used for different models, but more importantly 2) the chocks can be added both via the GUI menu but also by clicking on them. Is this still possible in your implementation?

For the tiew downs I will need some help. As now, I understand that a external force is used. But the whole logic behind looks rather complex to me

Yes, to me as well, that part was done by onox, and I unfortunately don't have knowledge on how these external forces work :cry:

gilbertohasnofb commented 8 years ago

I had first implemented the tie-downs as static objects, but the problem was that when the aeroplane accelerates, it lowers the nose even if tied down (which is what is expected), and that code onox wrote is used partially to make the tie-downs "elastic" on a given point in the pavement.

HHS81 commented 8 years ago

I think two of the reasons for the logic used in the c172p's chocks are: 1) there are two types of chocks used for different models, but more importantly 2) the chocks can be added both via the GUI menu but also by clicking on them.

The reason on the c172p is, that the chocks-models are not recocgnized as collision-objects, and tied to the aircraft-model. So there is a workaround with use of the parking-brake, which explains the rather complex logic.

My solution just simply adds a model in the scenery, which physically acts like in real life. It is easy to implement, and another feature X-Plane don't have ! :bowtie:

Is this still possible in your implementation?

In the moment it can be only added via the gui, but I will add a click-spot, so it can be added and removed per click at the walk-around.

You wanna maybe try the branch StaticElements to see how it works. But it is still WIP- the GUI has not the format I prefer, and the StaticElements can be triggered in flight. Also the logic for the external-power needs changes in the electrical.nas. Will be fixed later today.

HHS81 commented 8 years ago

I had first implemented the tie-downs as static objects, but the problem was that when the aeroplane accelerates, it lowers the nose even if tied down (which is what is expected), and that code onox wrote is used partially to make the tie-downs "elastic" on a given point in the pavement.

Yep, that's pretty cool how it works, really realistic! I just don't understand how to implement it.

HHS81 commented 8 years ago

and I forgot:

Issues: dialog-apply removes walker and other objects loaded by model-manager. Don't use it!

Still WIP, I'll try again on the tie-downs...

fgfs-screen-002

HHS81 commented 8 years ago

@gilbertohasnofb Finally added tie-downs - so ready for review!

HHS81 commented 8 years ago

Another Promo-pic: fgfs-screen-005 (yes, the ladder is already moved in the PR....)

gilbertohasnofb commented 8 years ago

Great pic! I will review the PR

gilbertohasnofb commented 8 years ago

Heiko, people are asking in the forum if you are tweaking those shots in the README.md file or not (adding blur, correcting colours and light, etc.). If so, personally I'd rather keep them untouched as to show what FG is really capable of.

HHS81 commented 8 years ago

yep, the exterior shots had been tweaked. The interior shot uses the AO Map, which needs some improvements though

gilbertohasnofb commented 8 years ago

If you are up for it, let's avoid tweaking these promo shots then. I think in the right conditions the shots from FG hardly need any adjustments!

HHS81 commented 8 years ago

o.k, the pic above is untweaked btw.... But I agree to someguy, that in some conditions a tweaking can improve the image

gilbertohasnofb commented 8 years ago

But I agree to someguy, that in some conditions a tweaking can improve the image

Surely it does improve, which is exactly the problem! A tweaked image feels like "cheating" to me because you can't achieve that in the sim. I don't see much point in developing for a 3D application/game and then tweaking the "advertisement" screenshots (or to be frank, any screenshots for that matter).

gilbertohasnofb commented 8 years ago

o.k, the pic above is untweaked btw

:+1:

gilbertohasnofb commented 8 years ago

Heiko, I know I spoke against the fuel trucks, but it seems I was wrong, they are indeed used for refuelling this type of aircraft. See:

Also see: https://github.com/Juanvvc/c172p-detailed/issues/717#issuecomment-184181806

gilbertohasnofb commented 8 years ago

@HHS81 Also in that link from the c172p repository, onox is proposing some interesting things, please check it out when you have time

HHS81 commented 8 years ago

yep, but not a small fiel in britisch columbia.... :smile:

I thought more about something like that: We have already a photorealistic model in the scenery model page, and can be visited in EDAU.

At some point immersive realism is getting very difficult to create in flight simulator...

gilbertohasnofb commented 8 years ago

At some point immersive realism is getting very difficult to create in flight simulator...

I agree with you, but both options are fine with me: I don't mind a truck in a small field as much as I don't mind a small portable tank being able to fill two full tanks. But that said, I think the truck solution is still better, though I will leave this up to you.

gilbertohasnofb commented 8 years ago

It's always possible to bring a truck to virtually any airfield in the world, but the same can't be said about a tiny tank fitting so much fuel

HHS81 commented 8 years ago

The portable fuel tanks can be much bigger, the biggest one can hold 1000 gal, the smalles one 280 gal:http://www.fuel-togo.com/trailers.html

gilbertohasnofb commented 8 years ago

Oh, in that case no problems at all!

onox commented 8 years ago

I have a patch here which fixes a problem with the right tie-down. It also defines three booleans to prevent them having an unspecified type. Changed the name in the license block of Systems/c182s-ground-effects.xml because the code it contains was written by me, not wlbragg.

Using the StaticElements branch, do git am -s 0001-Fix-location-of-right-tie-down-in-FDM.txt to apply the patch.

0001-Fix-location-of-right-tie-down-in-FDM.txt

HHS81 commented 8 years ago

@onox Great, Thanks! :smiley:

HHS81 commented 8 years ago

I have added a fueltanktrailer, and changed the code to use geo.put_model(), but does not save all too much lines..... :disappointed: I need now to seperate each objects of the cones, ladder, and chocks - but it will still look like that: fgfs-screen-010

gilbertohasnofb commented 8 years ago

Really fantastic screenshot :smile:

onox commented 8 years ago

@gilbertohasnofb Do you want to add those cones, ladder, fuel tank to our project as well? Does the c172p has a need for that external power unit? If you add the models, you might want to add it to Models/generic/ to indicate they can be re-used by other aircraft. (Ideally generic stuff should be added to fgdata, but the core devs are too slow and bureaucratic, and we can't easily modify the objects if they are in fgdata)

gilbertohasnofb commented 8 years ago

@onox I will open an issue for it, but I am afraid I can't do it right now, I am really busy with RL which is why I am a bit away from FG lately :cry:

gilbertohasnofb commented 8 years ago

Ideally generic stuff should be added to fgdata, but the core devs are too slow and bureaucratic, and we can't easily modify the objects if they are in fgdata

Yes, that's the problem with adding things to FGDATA: it's a pain to modify anything.

tigert commented 8 years ago

Cool work.

I'd say one ladder that you move from wing to wing, there rarely are two. There is rarely a ground power unit used/needed for small planes like a C172. And our airport also has a small fuel truck like that for avgas, and a larger one for JET A-1, that we use on our diesel engined aircraft at the club.

A nice pic from a few years back. It's very nice to see the Cessna take its shape so well in Flightgear :-) Here we're putting the sticker on the tail of CTL. ladder

gilbertohasnofb commented 8 years ago

Very nice picture, @tigert, I love this livery :smile:

HHS81 commented 8 years ago

I'd say one ladder that you move from wing to wing, there rarely are two.

Unfortunately very difficult to solve. The object is "hard", so if it collide with the aircraft, the aircraft will crash. Moving around isn't easily possible with the method now used, and as object animation it will interfer with the ground. The only solution I see is to lift the ladder above the aircraft on the other side. I will try this though it isn't realistic.

gilbertohasnofb commented 8 years ago

What about hiding a ladder from one side when the other is activated? So then as far as the user is concerned, he can only have one ladder at a time, making him/her think it's the same ladder moving.

HHS81 commented 8 years ago

one ladder, only left or right. It isn't technically possible to remove the "enable"-checkbox ladder

tigert commented 8 years ago

How about two checkboxes if it is hard to do a radio button?

(X) ladder on left wing ( ) ladder on right wing

gilbertohasnofb commented 8 years ago

@tigert I think two checkboxes is a better solution, because you can have neither of them checked (as opposed to two radio buttons, in which one options is always checked). So with two checkboxes, we can have:

Would that work, Heiko?

HHS81 commented 8 years ago

@gilbertohasnofb @tigert

there is no real difference between checkboxed and radio buttons. Beside the style at least there is no one to my knowledge.

I had gilbertos idea as my goal, but I'm not sure yet if I'm able to do it.

HHS81 commented 8 years ago

@gilbertohasnofb @tigert O.k. I was able to do it - again kudos for the complete c172p-team for their work, as it was very helpful again! :smiley: :+1: No I only have to seperate the chocks models and the cones-models and make them clickable....

gilbertohasnofb commented 8 years ago

@HHS81 Great to hear that, Heiko! :smile:

Well, but it still need the enable-checkbox, so maybe some nasal-magic will help here... Task for the next days. Otherwise we have now two radio-buttons, each for left/ right ladder, and you can only have one of the ladders.

HHS81 commented 8 years ago

if both are set to false, then stairs are removed if one is set to true, force the other to false and add a star to that respective side Would that work, Heiko?

After some thinking, I'm sure that wouldn't work since we can not set both to false with this method. Well I think keep my method this now as it is.

gilbertohasnofb commented 8 years ago

Sure, let's keep your method, but why wouldn't setting two checkboxes to false work? It's a simple condition to detect that AFAIK.