Board index FlightGear Development Aircraft

JSBSim Piper J-3 Cub  Topic is solved

Questions and discussion about creating aircraft. Flight dynamics, 3d models, cockpits, systems, animation, textures.

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Sat Aug 17, 2019 5:57 am

It's actually closer than that, the large gauges maybe 90%, the smaller gauges are even closer.
I'm not sure it's worth the effort?

Image
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: JSBSim Piper J-3 Cub

Postby Octal450 » Sat Aug 17, 2019 4:09 pm

Yeah you are right maybe 90%.

I do. I think it would make it look more better.

It isn't hard you can add a scale animation to each xml don't need to adjust 3d or animations.

Kind Regards,
Josh
Skillset: JSBsim Flight Dynamics, Systems, Canvas, Autoflight/Control, Instrumentation, Animations
Aircraft: A320-family, MD-11, MD-80, Contribs in a few others

Octal450's GitHub|Launcher Catalog
|Airbus Dev Discord|Octal450 Hangar Dev Discord
User avatar
Octal450
 
Posts: 5583
Joined: Tue Oct 06, 2015 1:51 pm
Location: Huntsville, AL
Callsign: WTF411
Version: next
OS: Windows 11

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Sat Aug 17, 2019 8:18 pm

Scale isn't going to work. The biggest hurdle is it appears to be messing with the lighting effects framework. It also exposes some AO effects on the panel which would require new mapping of that. It changes some of the boundaries of some of the gauge animations such as the AI. I actually think it would be easier to scale the gauges in blender and then do the panel lightmaps and AO map again.

I'll think about it, I do want it correctly dimensioned. Even the panel shape in not exactly the same as the reference images, slope of the edges for example, I don't think.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: JSBSim Piper J-3 Cub

Postby legoboyvdlp » Sat Aug 17, 2019 8:23 pm

One thing I noticed is that our cockpit is a lot darker. Maybe it's just backlighting from camera flash but is that something that can be addressed? Actually often I find that it's very difficult to see any texture detail (particularly in outside views as the reflections look so grey) - that's more the reflection shader though probably. Anyway, the other thing I noticed was the AI is brown and not black which helps it stand out better against the black panel. Maybe it's possible to change the AI colour?
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Sat Aug 17, 2019 9:37 pm

Part of that is the sun position I think

Image
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Sat Aug 17, 2019 11:12 pm

I notice some inconsistencies with the texture lighting on the some of the gauges,. I can't tell if it's texture difference or part of the effects. I thought I had the effects all worked out to where they were all under the same effects definitions at the end of the chain. So it might just be textures.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: JSBSim Piper J-3 Cub

Postby legoboyvdlp » Sun Aug 18, 2019 8:59 am

Ah, ok - that looks much better :)
User avatar
legoboyvdlp
 
Posts: 7981
Joined: Sat Jul 26, 2014 2:28 am
Location: Northern Ireland
Callsign: G-LEGO
Version: next
OS: Windows 10 HP

Re: JSBSim Piper J-3 Cub

Postby Alant » Tue Aug 27, 2019 10:42 pm

A quick progress report.
I now have OpenFoam CFD giving similar results to my Datcom and OpenVSP predictions. The CFD is taking about 1 hour per data point, which is faster than setting up a wind tunnel. I need to do a fair amount of checking and investigation into the differences. Once the results are validated my next step is to set up some automated scheme to run the CFD overnight or in the background.
Assuming all goes well a wiki article may be forthcoming giving a cook-book to set up this system.
Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Wed Aug 28, 2019 4:51 am

I'm really excited to upgrade the Cub FDM to go along with all the other work being done to it. I'm really only waiting for a point where the Datacom version is considered superior in all aspects. That will obviously be for others to determine as it is out of my bailiwick. I am ready to start comparing the JSBSim FDM against the Datacom now that I have made some progress towards the look of the Cub and the Super Cub.

Speaking of "other work done", I just pushed some changes I have been wanting to make including a save/resume GUI feature with 5 save slots. I wanted top be able to land anywhere and save the session so I could pick up where I left off at a later time or date. There is a few restrictions as to when you can save, you have to have engines off and be on mostly level ground or on the water.

Also reworked the Cub panel gauges and replaced the slip ball device with one custom made for the Cub that better matches the stock Cub photograph linked to in the Wiki. Fixed a couple bugs, the Cub amphibious gear electrical was broken and the mooring anchor availability was also broken.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Wed Aug 28, 2019 6:32 pm

Reworked the mesh at the top edge of the cowling that you can see from the interior view. It was squared and had some undesirable lighting or shading effects. It looks much better. Something that bugged me for a long time.

Added dynamic interior glass window reflections. The SuperCub gauges, dome and avionics now change the reflection strength.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: JSBSim Piper J-3 Cub

Postby Alant » Sat Aug 31, 2019 10:22 pm

I have a list of bugs which may need attention.
1. On start-up I see
Nasal runtime error: nil used in numeric context
at D:/Flightgear/fgaddon/Aircraft/J3Cub/Nasal/j3cub.nas, line 409

This is easily fixed by adding "or 32.0" to the getprop call:
var log_cabin_temp = func {
if (getprop("/sim/model/j3cub/enable-fog-frost")) {
var temp_degc = getprop("/fdm/jsbsim/heat/cabin-air-temp-degc") or 32.0;

2. JSBSim had a bug, now fixed, in calculating yaw gyro effects due to pitch rate for the propeller.
A version number should be added to the propeller files.e.g.
<propeller name="variable-Pitch 75-inch Two-Blade Propeller" version="1.1">
See https://github.com/JSBSim-Team/jsbsim/wiki/Moments-applied-by-a-propeller-to-an-aircraft.

3. In-air-reset does not work - the simulation hangs. Is this related to the view-manager having problems going from an internal to an external view?

4. The aircraft yaws to the right on take off. With a clockwise rotating prop It should go to the left. I am investigating this.

5. A couple of error messages at stat-up
osgDB ac3d reader: could not find texture "iat.png"
Could not find at least one of the following objects for animation: 'PANDown'

6. The main gear wheels are running below the runway, especially when the throttle is opened and the left wing goes down due to the prop torque. The left wheel is then buried as far as its axle.

7. USB Joystick throttle does not work.

On a positive note my CFD and Datcom predictions are coming closer together.

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Sat Aug 31, 2019 11:45 pm

Alan, is this the Datacom branch or No-YASim branch, both on your git repo?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: JSBSim Piper J-3 Cub

Postby Alant » Sun Sep 01, 2019 12:04 am

No, this is with FGaddon.
I have the bugs same on my Datcom version.
The C172 has bug 7. I seem to remember that it has bug 3 also, but have not checked recently.

I have a new set of Datcom results, with the wing incidence (rigging angle) changed to reflect my latest understanding of the Piper drawings. I am using these numbers for my CFD and OPenVSP comparisons. As yet this has not found its way into my Datcom Flightgear FDM.

Alan
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

Re: JSBSim Piper J-3 Cub

Postby wlbragg » Sun Sep 01, 2019 4:57 pm

Nasal runtime error: nil used in numeric context
at D:/Flightgear/fgaddon/Aircraft/J3Cub/Nasal/j3cub.nas, line 409

I've had that intermittently, never tracked it down. Done

A version number should be added to the propeller files.e.g.

Done

In-air-reset does not work

I can't duplicate, can you give me steps including GUI choice?

osgDB ac3d reader: could not find texture "iat.png"

That's a miss assigned material I've been trying to track down.

Could not find at least one of the following objects for animation: 'PANDown'

Related to FG1000 code and not sure if it is because I have FG1000 implemented (even though not active) or if that is fgdata?

The main gear wheels are running below the runway,

Can't reproduce?

USB Joystick throttle does not work.

???, can you change bindings? My USB JS works but I may have assigned a non-default binding. You need to use /controls/engines/throttle-all.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7586
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: JSBSim Piper J-3 Cub

Postby Alant » Sun Sep 01, 2019 5:46 pm

I will reply in several emails.
iat.png is in three .ac files:

C:\FlightGear\fgaddon\Aircraft\J3Cub\Models\Interior\dome-light\dome-light.ac (2 hits)
Line 12141: texture "iat.png"
Line 12400: texture "iat.png"
C:\FlightGear\fgaddon\Aircraft\J3Cub\Models\Interior\temp\iat.ac (8 hits)
Line 17: texture "iat.png"
Line 166: texture "iat.png"
Line 496: texture "iat.png"
Line 1082: texture "iat.png"
Line 1469: texture "iat.png"
Line 1592: texture "iat.png"
Line 1622: texture "iat.png"
Line 4070: texture "iat.png"
C:\FlightGear\fgaddon\Aircraft\J3Cub\Models\Interior\temp\iat_pa18.ac (9 hits)
Line 13: texture "iat.png"
Line 343: texture "iat.png"
Line 929: texture "iat.png"
Line 1241: texture "iat.png"
Line 1364: texture "iat.png"
Line 1394: texture "iat.png"
Line 1526: texture "iat.png"
Line 2260: texture "iat.png"
Line 2519: texture "iat.png"
The main gear animation is fine with FGAddon. I had made some changes with my repo. Sorry for the noise on this one.

The throttle moves when I change the binding to engines/throttle-all from engine[0]/throttle .
Unfortunately with this change the calibration /offset is all wrong. Also my joystick is configured fro twin engine use. If necessary I can put some conditional code in my Joystick file,
Other single aircraft that I have tried all seem OK.
The joystick wiki uses this:-
<axis n="2">
<desc>Throttle</desc>
<binding>
<command>nasal</command>
<script>controls.throttleAxis()</script>
</binding>
</axis>

At the moment I am deep into JSBSim C++ to see why the aircraft pulls right instead of left on take-off. It appears the problem appears to be in the JSBSim undercarriage code.
Alant
 
Posts: 1219
Joined: Wed Jun 23, 2010 6:58 am
Location: Portugal
Callsign: Tarnish99
Version: latest Git
OS: Windows 10/11

PreviousNext

Return to Aircraft

Who is online

Users browsing this forum: No registered users and 22 guests