Board index FlightGear Development New features

Cargo Towing Addon

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

Cargo Towing Addon

Postby wlbragg » Fri Jan 24, 2020 7:37 am

I decided to make the Cargo towing capability into the form of an addon so it can be used on any aircraft quickly and easily.

Development repository
https://github.com/wlbragg/Cargo-Towing-Addon

This video demonstrates how amazing and useful the FlightGear addon methodology is.

The UH-1 is the stock aircraft in the fgaddon folder, there were no changes made to any of its files. This video shows how easy and how quickly you can now add cargo towing capability to any helicopter or really any aircraft if so inclined.

Last edited by wlbragg on Sat Jan 25, 2020 10:30 pm, edited 1 time in total.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Cargo Towing Addon

Postby StuartC » Fri Jan 24, 2020 8:32 am

Nice.
On my experiments with it previously, It didnt assign the cargo weight correctly. It was adding weight at the time you selected the cargo and placed it rather than when the chopper actually connects with it.
StuartC
 
Posts: 2761
Joined: Fri Jun 18, 2010 8:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: Cargo Towing Addon

Postby wlbragg » Fri Jan 24, 2020 9:54 am

I'm pretty sure it's correct now, but you may have to configure a couple places in the code to have the weight added to the correct pointmass and configure it for either JSBSim or YASim. Eventually I can make it easier to find where those changes need to be made. The weight doesn't get assigned until the cargo is actually lifted off the ground. The AI cargo can have a pre-defined weight as of right now, but not on an individual basis.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Cargo Towing Addon

Postby wlbragg » Sat Jan 25, 2020 10:32 pm

Repository in first post.

Lots of things on the TODO list.

Most items are going to be GUI helpers to position rope correctly on a per aircraft basis. Also the ability to position it on the fly with sliders.
Other items as well see: README
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Cargo Towing Addon

Postby wlbragg » Mon Jan 27, 2020 6:55 am

Is it possible to create a pointmass (JSBSim)
Code: Select all
<pointmass name="Pilot">
            <weight unit="LBS"> 180 </weight>
            <location name="POINTMASS" unit="IN">
                <x> 36 </x>
                <y> -14 </y>
                <z> 24 </z>
            </location>
        </pointmass>

or a weight entry (YASim)
Code: Select all
<weight x="-1.0" y=".33"  z="1" mass-prop="/sim/weight[0]/weight-lb"/>
<weight n="0">
   <name>Pilot</name>
   <weight-lb>180</weight-lb>
   <max-lb>300</max-lb>
</weight>

dynamically using nasal?
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Cargo Towing Addon

Postby Thorsten » Mon Jan 27, 2020 7:50 am

I don't think you can create it, but you can create as many placeholders in JSBSim as you like and set their parameters dynamically (which we do for Shuttle payloads).
Thorsten
 
Posts: 11375
Joined: Mon Nov 02, 2009 8:33 am

Re: Cargo Towing Addon

Postby wlbragg » Mon Jan 27, 2020 7:57 pm

@ Thorsten
Thanks, that's what I figured.

New milestone so to speak.

Image

Rope scaling
Starting presets for fgaddon aircraft
Manual rope positioning by slider

The only user configuration needed at this point would be to add an FDM weight pointmass to any aircraft that don't have them.
I am slowly doing just that but there are lots of them and then I will have to get permission to push any additions to fgaddon.
In the meantime, I may add an alternative when available.
The alternative being, most of the aircraft involved have an existing pointmass for one thing or another. The problem is the position of that point not necessarily being the position of the load on the rope. Some are really close, close, or non-existent. The really close ones would be an interior load pointmass that happens to be really close to where the rope connection point would logically be. The close ones would be a pilot, copilot, passenger, or interior load (patient) close to where the rope load might be positioned. Non-existing ones would be no pointmass at all.
There are some aircraft that typically use a swing arm or slide arm to extend the lift outside the side door. If there is no corresponding pointmass at that position then the simulation will be off.
Another TODO will be to add a generic swing/slide arm model that can be positioned for those aircraft with side doors but no arm.

This project is a lot of fun to build and I think quite useful too.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Cargo Towing Addon

Postby wlbragg » Tue Jan 28, 2020 7:45 am

To anyone following...

The cargo towing logic is coming along nicely. For aircraft that I have added to the list it automatically configures the rope setting for the "large" diameter rope and defaults to the first weight point (YASim only). I haven't configured JSBSim logic yet. Any aircraft that are not in the list, or if you change rope diameter on the ones that are on the list, can still be configured manually with the sliders. You can select which weight point you want to assign the weight to now through the GUI (on the fly). It defaults to the first one in the array as of now. I think maybe I should try to default it to the fist one in the array that has no value set at startup. If they all have a value, then default to the first entry. I guess it really doesn't matter because eventually I want the correct weight points configured and made available.

The GUI allows you to take care of all aspects of the cargo tow configuration. Still, keep in mind the weight points available are only the ones already programmed into the aircraft. I still want to push a "default" load point for every aircraft that could potentially use the cargo tow.

There is still some stuff to work out, such as if you have the pilot weight point assigned and then switch to a different point, the pilot point doesn't revert to the original weight. When I am finished it will.

As soon as I get the JSBSim portion finished this addon will be "fully functional", then it's a matter of polishing.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Cargo Towing Addon

Postby wlbragg » Wed Jan 29, 2020 8:55 am

Existing weights already assigned to any of the load points are now retained and added to the cargo weight if using a point that has a pre- assigned weight.
All but 2 heli's are added to the default configuration list.
I have a couple JSBSim aircraft I still have to add.
Smaller aircraft have smaller ropes by default.
I added "locally" a "longline" load point to every helicopter in fgaddon so I could assign loads to the best possible or most logical locations. Also those load points are configured with 0 weight and max of 50000lbs so you can really have fun pushing aircraft far beyond their limits.

When done we will be able to use a blimp to haul cargo as well.

One thing I haven't looked at at all is the "hard docked" portion. I doubt if many of the aircraft will work with it. I need to make some kind of a decision on what to to to that side of it. It makes sense for the aircrane but not too many other aircraft.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Cargo Towing Addon

Postby StuartC » Wed Jan 29, 2020 11:42 am

What this needs I the ability to see the rope and payload over multiplayer. Hours of fun with the pilot taking instruction from the crewman to pick up and place the cargo accurately.
The problem I see with the mass point is some choppers already have a payload system and the available payload number may not be what is available in your code.
StuartC
 
Posts: 2761
Joined: Fri Jun 18, 2010 8:18 pm
Location: Arse end of the Universe
Callsign: WF01
Version: 2019.1
OS: W10 64 bit

Re: Cargo Towing Addon

Postby LesterBoffo » Wed Jan 29, 2020 3:34 pm

Is this as simple as adding the towing module to an fgaddon folder in User and selecting it in the FG opening page? How does one add extra aircraft? Do you need 2019.X.X? Does it save the GUI configured aircraft to some permanent text file for later use?
User avatar
LesterBoffo
 
Posts: 2129
Joined: Sun Oct 02, 2011 4:02 pm
Location: Oregon, USA
Callsign: LesBof
Version: 2018.3.2
OS: Win10 Pro

Re: Cargo Towing Addon

Postby wlbragg » Wed Jan 29, 2020 6:07 pm

@Stuart
It polls the existing "weight" entries that are defined in the aircraft and adds then to a selectable list in the GUI so you can choose whichever load point you want. I'm pretty sure if finds them all. Or you can add another to the aircraft (which I did to all heli's locally because I wanted the load point at a certain position. I did notice that many aircraft had a "cargo" load point. You can select that point to use in the GUI. Problem with those is some of them place a [1] limit on how much weight you allowed to add or already have some [2] weight added initially.

[1] I never actually verified what happens if you use that point and try to lift something heavier. I guess in that event I should override the limit and change it to at least the limit + whatever you are caring's weight is. Currently it's unaccounted for, it may not like it, I'll have to check that.
[2] Already accounted for, just adds the two together, new and existing weight, and puts it back to default, existing weight, when removed. Could do the same for [1] change limit and put it back when finished.

@LesterBoffo

Is this as simple as adding the towing module to an fgaddon folder in User and selecting it in the FG opening page

Yes, you can put the addon folder anywhere and call it anything. Then just add the path to the Add-on/Add-on Module folders.

How does one add extra aircraft?

It has a list of pre-configured rope settings for almost every helicopter in fgaddon. Any (only 2, I'll add them as well soon) that are not in the list you can manually adjust sliders to configure the rope. I think it will work on most any FG version.

Does it save the GUI configured aircraft to some permanent text file for later use?

There is already a permanent text file with the configuration settings that is included with the addon.

Just add it to addons, I made it stupid simple for users. Its completely automated for aircraft in the list with the exception that it defaults to the first load point and you should (for now) select the most appropriate on in the list of available.

Any suggestions or feedback is most welcome.

Just this last exchange made me notice the existing point weight limits could be an issue and need to be accounted for.
Last edited by wlbragg on Wed Jan 29, 2020 7:46 pm, edited 3 times in total.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Cargo Towing Addon

Postby wlbragg » Wed Jan 29, 2020 6:23 pm

For awhile. I'd pull a fresh copy or check for changes very use. I'm polishing it constantly as I test it so you will want the most current state. I just now pushed a change that shows you any load point pre-imposed limit. For now it would be best to avoid those points unless your staying within the limits.
Example, I just tried the Mosquito XE. it has like a 300 lb limit or something. I don't introduce any cargo with a weight that would be within that limit.
That's another ongoing upgrade, and one I want to really concentrate on at some point. That is to add more cargo models of all kinds of cargo of all different weights.
Dang, just gave me the inspiration to set up a user GUI interface that allows one to make a model and "easily" add it to the cargo list. It can be done and needs to be, because right now it's not the most intuitive thing to add a new cargo.

Speaking of new cargo- You can easily add a "new cargo" right now if you do it in the form of an AI scenario model. Not an AI model but a scenario. It will then show up in the list and be tow-able.
That portion of the towing is not clean though. The rope animation is not extended to those type of cargo's yet. I plan to in the future. There is also no load assigned in those cases, yet, I plan to do that as well. Ideally we will be allowed to add a weight field to the existing XML AI scenario model interface and then that would be solved. Or I can add it to the GUI and attach it to a corresponding AI scenario model, which is what I planned on doing. Then the user can assign a weight to any AI scenario model to be used in the cargo hauling code.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Cargo Towing Addon

Postby wlbragg » Wed Jan 29, 2020 6:30 pm

Current stat of the GUI's

Note: I need to change the 1) description on the Rope Settings and Placement dialog. It's simply not necessary anymore as all the aircraft on that list will be configured automatically if merely using the addon. You don't need to select it anymore, but you can if so desired.

EDIT:
I need to have the GUI pre-select from the lists by default (actually show what item is selected at opening of the dialog). I know it can be do, something like "selected=" or some such nonsense. On the polishing TODO list.

Image
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Cargo Towing Addon

Postby wlbragg » Thu Jan 30, 2020 7:56 pm

Good time to pull for a fairly stable version.

I added two global properties for use in aircraft gauges if needed.
sim/cargo/rope/length
sim/cargo/load/weight

Converted most property calls to props.globals.getNode method

Next priority additions...

Attach a height and weight field to AI scenario models for user input.
Add rope animations to AI scenario models
Fix bug in AI scenario model sync with rope length
Select pre-selections in the lists in the rope configuration GUI
User select-able winch arm model
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 5194
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Next

Return to New features

Who is online

Users browsing this forum: No registered users and 1 guest