Board index FlightGear Development Add-ons

Aerotow Everywhere

FlightGear has support for add-ons, to further extend the simulator's core functionality.

Re: Aerotow Everywhere

Postby wlbragg » Mon Aug 15, 2022 9:17 pm

It took awhile to get the hang of it, but when you finally get into the lift and can stay in it for a minute, it's really fun.

Look at the VSI. I may have cheated and made a thermal extra strong. But in my defense I was trying to learn how they were laid out. Not knowing their makeup I also stacked some on top of each other. Up to 10000 MSL.

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

Re: Aerotow Everywhere

Postby wlbragg » Mon Aug 15, 2022 10:05 pm

@PlayeRom

If you want to add this most simplified start to generating a thermal into the addon, this is what I did to give me the basic functionality. Obviously you can modify this in a kazillion ways.

I don't know why the input/keyboard has to be outside the addons space, but in order for the event to be seen, it does as far as I can tell. I think there is a nasal equivalent, but off the top of my head I don't remember it.

addon-main.nas

Code: Select all
   setlistener("/addons/by-id/org.flightgear.addons.Aerotow/addon-devel/command/drop-thermal", func {
      if(getprop("/addons/by-id/org.flightgear.addons.Aerotow/addon-devel/command/drop-thermal")){
         var position = geo.aircraft_position();
         var course = getprop("/orientation/heading-deg");
         position.apply_course_distance(course,300);
         fgcommand("add-aiobject", props.Node.new({
            "type": "thermal",
            "model":"Models/Geometry/thermalcap.xml",
            #"model-lowres":"Models/Buildings/silo.ac",
            "latitude": position.lat(),
            "longitude": position.lon(),
            "strength-fps":8.33,
            "diameter-ft":4000,
            "height-msl":9500,
            "search-order": "DATA_ONLY"
         }));
         setprop("/addons/by-id/org.flightgear.addons.Aerotow/addon-devel/command/drop-thermal", 0);
      }else{
         setprop("/addons/by-id/org.flightgear.addons.Aerotow/addon-devel/command/drop-thermal", 0);
      }
   });


addon-config.xml

Code: Select all
<addons>
    <by-id>
         <org.flightgear.addons.Aerotow>
             <addon-devel>
                 <command>
                     <drop-thermal type="bool">false</drop-thermal>
                  </command>
              </addon-devel>
         </org.flightgear.addons.Aerotow>
     </by-id>
</addons>
<input>
   <keyboard>
      <key n="100">
         <name>d</name>
         <desc>Drop Thermal</desc>
         <binding>
            <command>nasal</command>
            <script>
               setprop("/addons/by-id/org.flightgear.addons.Aerotow/addon-devel/command/drop-thermal", 1);
            </script>
         </binding>
      </key>
   </keyboard>
</input>
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 6530
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Aerotow Everywhere

Postby wlbragg » Mon Aug 15, 2022 10:25 pm

@PlayeRom

Look in the ASK 21 menu under Aerotow Configuration for another idea for an addition to the addon.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 6530
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Aerotow Everywhere

Postby PlayeRom » Tue Aug 16, 2022 1:28 am

I have released a new version 1.1.0

Changes:

    1. Fix AI aircraft going underground during take-off due to uneven runway elevations.
    2. Possibility to add thermal with configuration of its parameters (thanks for the proposal and the solution :)).
My SP-ROM YT channel
PlayeRom
 
Posts: 39
Joined: Tue Oct 20, 2020 12:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Aerotow Everywhere

Postby wlbragg » Tue Aug 16, 2022 3:31 am

Very cool, thank you!
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 6530
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Aerotow Everywhere

Postby miguel » Tue Aug 16, 2022 1:42 pm

Good afternoon. PlayRon
I suggest you to see in the hangar of Herbyw, the plane (Perlan2).
It has a lot of surprises and several of what you suggest.


https://github.com/HerbyW?tab=repositories
Regards Miguel
miguel

Posts: 177
Joined: Wed Aug 19, 2015 4:05 pm
miguel
 
Posts: 188
Joined: Wed Aug 19, 2015 4:05 pm

Re: Aerotow Everywhere

Postby TheEagle » Tue Aug 16, 2022 2:20 pm

uh, miguel, what's going on - why are you reposting your reply for the second time now ???
You won't believe how many issues dissolved into thin air after reinstalling !

Cessna 210 (GitHub | Wiki)
Find a list of the other aircraft I'm developing or enhancing in my wiki profile !
Addons: Landing challenge (GitHub)
Other: FGTools (GitHub)
User avatar
TheEagle
 
Posts: 2660
Joined: Sat May 01, 2021 2:27 pm
Location: France
Callsign: F-EAGLE
IRC name: none
Version: 2020.4.0
OS: Ubuntu Studio 20.04

Re: Aerotow Everywhere

Postby miguel » Tue Aug 16, 2022 5:33 pm

uffff... that's bad.



it's not possible, sorry
miguel
 
Posts: 188
Joined: Wed Aug 19, 2015 4:05 pm

Re: Aerotow Everywhere

Postby TheEagle » Tue Aug 16, 2022 6:08 pm

Well, you can look for yourself - two times the exact same post ! :?
viewtopic.php?f=89&t=40742#p403902
viewtopic.php?f=89&t=40742&start=30#p403824
(you need to Sort by date and Ascending order to see the correct posts)
It was there a third time but that one got removed due to a flag I raised.
You won't believe how many issues dissolved into thin air after reinstalling !

Cessna 210 (GitHub | Wiki)
Find a list of the other aircraft I'm developing or enhancing in my wiki profile !
Addons: Landing challenge (GitHub)
Other: FGTools (GitHub)
User avatar
TheEagle
 
Posts: 2660
Joined: Sat May 01, 2021 2:27 pm
Location: France
Callsign: F-EAGLE
IRC name: none
Version: 2020.4.0
OS: Ubuntu Studio 20.04

Re: Aerotow Everywhere

Postby PlayeRom » Tue Aug 16, 2022 11:53 pm

I have released a new version 1.2.0

Changes:

1. Add possibility to change the flight plan of AI tow plane.
My SP-ROM YT channel
PlayeRom
 
Posts: 39
Joined: Tue Oct 20, 2020 12:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Aerotow Everywhere

Postby PlayeRom » Wed Aug 17, 2022 12:48 am

miguel wrote in Sun Aug 14, 2022 1:23 pm:Good afternoon.
I suggest you to see in the hangar of Herbyw, the plane (Perlan2).
It has a lot of surprises and several of what you suggest.


https://github.com/HerbyW?tab=repositories
Regards Miguel


Thanks for the bearings on the amazing glider. However, did you manage to get the tow plane started there? From the source code I can see that there is a Cessna 177, and it has a fixed mapped route at the airport "Carlafate, Patagonia" as the author writes, that is how I guess El Calafate (SAWC). I positioned myself on runway 25 (east side) but somehow the Cessna does not appear. Is it working for you?
My SP-ROM YT channel
PlayeRom
 
Posts: 39
Joined: Tue Oct 20, 2020 12:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Aerotow Everywhere

Postby wlbragg » Wed Aug 17, 2022 4:10 am

Version 1.2.0, yay, once again, outstanding! This is a really cool addon!
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 6530
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Aerotow Everywhere

Postby wlbragg » Wed Aug 17, 2022 4:25 am

@PlayeRom

I'm serious about getting this in fg-addons, it truly belongs there. It is as good as any in there and is a really useful addon. I can keep it updated for you or you can check on getting access for yourself.

It really no problem if you want me to push it to the repository.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i5 3570K AMDRX480
User avatar
wlbragg
 
Posts: 6530
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/AMDRX480

Re: Aerotow Everywhere

Postby PlayeRom » Wed Aug 17, 2022 12:03 pm

wlbragg wrote in Wed Aug 17, 2022 4:25 am:@PlayeRom

I'm serious about getting this in fg-addons, it truly belongs there. It is as good as any in there and is a really useful addon. I can keep it updated for you or you can check on getting access for yourself.

It really no problem if you want me to push it to the repository.


I have questions about FGAddon
1. I understand that it involves creating a repository on SourceForge, does it have to be SVN?
2. I understand that adding the aircraft to FGAddon makes possibility to search/download/update/uninstall from the launcher, but what are the benefits of adding the add-on there?
My SP-ROM YT channel
PlayeRom
 
Posts: 39
Joined: Tue Oct 20, 2020 12:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Aerotow Everywhere

Postby PlayeRom » Wed Aug 17, 2022 12:20 pm

I added an engine sound to AI tow airplanes and it's cool. However, there is a problem with turning off the engine sound. When I call fgcommand with "unload-scenario" the engine sound is still playing - this is annoying, especially when I run several AI aircraft, then the engine sounds are duplicated.

To the <fx> tag I tried adding a condition:

Code: Select all
<PropertyList>
    <fx>
        <engine>
            <name>engine</name>
            <mode>looped</mode>
            <path>wasp.wav</path>
            <property>velocities/true-airspeed-kt</property>
            <volume>
                <offset>-0.80</offset>
            </volume>
            <pitch>
                <property>velocities/true-airspeed-kt</property>
                <factor>0.012</factor>
                <offset>0.3</offset>
                <min>0.3</min>
                <max>1.0</max>
            </pitch>
            <reference-dist>150.0</reference-dist>
            <max-dist>5000.0</max-dist>
            <condition> <!-- <---------------------------------- my extra condition here -->
                <property>/addons/by-id/org.flightgear.addons.Aerotow/addon-devel/sound/enable</property>
            </condition>
        </engine>
    </fx>
  </PropertyList>


I set the property correctly to true when I call the aircraft, and to false when I disable the scenario, but the condition only works for turning the sound on, not for turning it off. Does anyone know a solution to disable the sound of the AI model when it started playing?
My SP-ROM YT channel
PlayeRom
 
Posts: 39
Joined: Tue Oct 20, 2020 12:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

PreviousNext

Return to Add-ons

Who is online

Users browsing this forum: No registered users and 1 guest