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 TheEagle » Wed Aug 17, 2022 2:30 pm

I don't know why the condition won't switch off the sound, but following code should work:
Code: Select all
<PropertyList>
    <fx>
        <engine>
            <name>engine</name>
            <mode>looped</mode>
            <path>wasp.wav</path>
            <property>/addons/by-id/org.flightgear.addons.Aerotow/addon-devel/sound/enable</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>
        </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?[/quote]
Cessna 210 (Wiki)
My other aircraft: my wiki profile !
Other: FGTools (GitHub)
World tour: View on SkyVector
Please consider donating $1 / €1 to help me finance a new camera !
User avatar
TheEagle
 
Posts: 3433
Joined: Sat May 01, 2021 3:27 pm
Location: France
Pronouns: You, he
Callsign: F-EAGLE
IRC name: none
Version: Git next
OS: Ubuntu Studio 22.04

Re: Aerotow Everywhere

Postby miguel » Wed Aug 17, 2022 2:56 pm

hello playeRon:
affirmative works very well, besides, it has a circuit, where you can get very high altitudes, my record is 65,000 feet.
greetings: miguel
miguel
 
Posts: 227
Joined: Wed Aug 19, 2015 5:05 pm

Re: Aerotow Everywhere

Postby wlbragg » Wed Aug 17, 2022 3:24 pm

1. I understand that it involves creating a repository on SourceForge, does it have to be SVN?


As far as I know, yes. Although, the Shuttle is git to svn I think. I push using git to sourceforge, but I think it is still svn on sourceforge. I'm not sure about that so don't quote me on it.

This is how I have my addons on my local drive.

Image

Of these addons, two are not currently in fgaddons, yours and the FG-HEMSGen. So when I use an SVN GUI I see those two addons as "unversioned".
Image
I have access to all of them, to edit and push to the repository if I choose. Of course I don't mess with other maintainers addon's unless asked or possibly fixing a bug.
But because the vast majority of them are in fgaddons, it is easy to update. And for my own, it is just as convenient a location to use the fgaddon svn repository as a workspace as github. There is some contention between git users and svn, but in the end they do enough of the same things to make either one acceptable to work from.

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?


Not quite. What you do is point to your local addon source files and then they show up in the launcher and then are selectable. You can turn them on or off. My registered addons look like this below.
Image
As you can see, I have Red Griffin ATC off at the moment, so it doesn't show up on the FlightGear menu when FlightGear loads.

I am not aware of any way from the launcher interface to download/update an addon, only to add it from a location and turn it on and off easily and of course have a list of installed available at startup.

The real benefits as I see them are...

The ease of having all addons in one location.
As addons grow, they will become lost, this insures they don't.
As addons grow, they will become harder to update if they are scattered all over the place using different development platforms. This will keep managing a users addons much easier.
Your addon is forever saved, for all to use, in the proper location with the project. The same reason you add your aircrafts to fgaddon.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Aerotow Everywhere

Postby miguel » Wed Aug 17, 2022 3:33 pm

readme.txt
The Perlan-II stratospheric Glider in FlightGear is ready to bring you up to 90000 ft.


Copy the files and folder in AI to: FG-data/AI
Copy the files in Model-Geometry to FG-data/Models/Geometry

Adjusting the performancedb.xml in the AI/Aircraft folder:
Open the performancedb.xml file and search for this block:

<!-- catch all for various light aicraft in the traffic DB -->
<alias>
<match>CNA</match> <!-- generic Cessna apparently -->
<match>c172</match>
<match>c177</match>
<match>c182</match>
<match>pa28</match>
<match>Cub</match>
<alias>light</alias>
</alias>

You have to add the line with the "c177" and safe the file. Now the c177 has a FDM. Cool ha!

################################################################################################

This will give you 2 new AI-scenarios: "wavelift" and "SAWC-Carlafate towing"

- with the wavelift clouds, up- and down winds
- and a AI Aircraft whitch brings you to 10000 ft with 60 waypoints!

Located in Patagonia near Carlafate (Code SAWC):
Open your internal map, the you see the wave clouds as traffic objects.


x4...............................................32.5nm




.......x1........................................26.5nm

.......................................................................x Carlafate Airfeeld
..x2.............................................30nm




.....x3..........................................27.9nm


################################################################################################

For realistic Weather go to Weather Conditions: Fair weather -- Detailed Weather -- Advanced Settings
Tile Selection Mode: realistic
Terrain Effects and Terrain Presampling: on
Wind Model: aloft interpolated

Check your wind configuration:
FL0 260 12
FL50 262 16
FL100 264 20
FL180 265 28
FL240 269 39
FL300 273 47
FL340 278 54
FL390 271 59
FL450 275 68

#################################################################################################

The towing will start a Cessna 177 with sound at the apron,
it then will go to the startpoint for towing on the east side of the runway.
Use the speedbrakes to compensate for the elastic rope at start-up.

##################################################################################################

Have fun!

For more infos:

http://www.perlanproject.org/


The original 3D model is from Carlos Reynoso.

PlayeRon: Installation Instructions
miguel
 
Posts: 227
Joined: Wed Aug 19, 2015 5:05 pm

Re: Aerotow Everywhere

Postby wlbragg » Wed Aug 17, 2022 3:33 pm

Unless it has been fixed, the FX method to use sound in an addon conflicts with aircraft sounds.. If I tried using that method, my aircraft sounds no longer worked. So I used fgcommand instead.

Basically this...

Code: Select all
var sound_alert = {file:"[addon=org.flightgear.addons.missiongenerator]Sounds/alarm.wav", volume: 1.0};

var audio_timer = maketimer(1, func{
   fgcommand("play-audio-sample", props.Node.new(sound_alert));
});


Unfortunately addon sound is broken on next so I can't test that portion at the moment. Although I can if I switch computers. I'll try to check it out in a bit.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Aerotow Everywhere

Postby wlbragg » Wed Aug 17, 2022 5:47 pm

@PlayeRom, you haven't pushed any of the sound additions to the repository?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Aerotow Everywhere

Postby wlbragg » Wed Aug 17, 2022 5:56 pm

How did you load the soundfx.xml file in the addon?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Aerotow Everywhere

Postby wlbragg » Wed Aug 17, 2022 6:59 pm

@PlayeRom, FYI: the fgcommand sound method is broken in next, but the VX sound like you are using is not. But again, I emphasize, your method appears to conflict with aircraft sounds. Try using your addon with the sound on an aircraft that has engine sound and see if both your addon sound and the engine sound work at the same time. Unless maybe your loading the sound effects file different that I do.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Aerotow Everywhere

Postby PlayeRom » Wed Aug 17, 2022 8:05 pm

I have no collision with aircraft sound, I tested with default c172.

The sound it's not yet committed to the repo because I'm not satisfied.

What I'm doing:

1. In add-on folder I'm creating new folder structure, e.g: "FGData/AI/Aircraft/Aerotow/Cub/Models" where I'm copy all files from "FG_ROOT/AI/Aircraft/Cub/Models"
2. I'm changing my "FGData/AI/Aircraft/Aerotow/Cub/Models/Cub-ai.xml" as following:

Code: Select all
<?xml version="1.0"?>

<PropertyList include="AI/Aircraft/Cub/Models/Cub-ai.xml">
    <sound>
        <path>AI/Aircraft/Aerotow/Sound/sound.xml</path>
    </sound>
</PropertyList>


So I'm adding "sound/path" and rest is included from original Cub ("AI/Aircraft/Cub/Models/Cub-ai.xml")

2. In add-on folder I'm creating new folder structure, e.g: "FGData/AI/Aircraft/Aerotow/Sound" where I put wasp.wav file and sound.xml like this:

Code: Select all
<?xml version="1.0"?>
<PropertyList>
    <fx>
        <engine>
            <name>engine</name>
            <mode>looped</mode>
            <path>wasp.wav</path>
            <property>/addons/by-id/org.flightgear.addons.Aerotow/addon-devel/sound/enable</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>
        </engine>
    </fx>
</PropertyList>


3. For scenario I'm using a model from my path "Aircraft/Aerotow/Cub/Models/Cub-ai.xml"
4. Property "/addons/by-id/org.flightgear.addons.Aerotow/addon-devel/sound/enable" is set to true when I call for a Cub, and set to false when I disable AI scenario.

When I call for a Cub, the engine sound is start playing, but as I wrote it cannot stop when I disable my AI scenario.


EDIT

In documentation I found maybe something which can help, but I nothing understand from it, where and how the type "raise" should be supplied?

Code (README.xmlsound): Select all
The types "raise" and "fall" will stop the playback of the sample
regardless of any other event. This means that when the type "raise"
is supplied, sample playback will stop when the event turns false.
Using the type "fall" will stop playback when the event turns true.
My SP-ROM YT channel
PlayeRom
 
Posts: 97
Joined: Tue Oct 20, 2020 1:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Aerotow Everywhere

Postby wlbragg » Wed Aug 17, 2022 9:13 pm

Ok, I see, your loading the sound with the ai aircraft. That must be why yours is working without conflict. I was calling the sound effects file from the add-on config xml. In essence it superceded the aircraft sound. I'm not at my computer at the moment, I'll see if I can help later on this afternoon.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Aerotow Everywhere

Postby wlbragg » Thu Aug 18, 2022 7:19 am

I'm pretty sure I copied your development structure to the letter, but I am getting no sound. It may be fgaddon sound in next is broken. But I also tried it on my other computer with next of several months ago and I got a ton of openGL errors. So I can't reproduce sound effects at all, unfortunately.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Aerotow Everywhere

Postby PlayeRom » Thu Aug 18, 2022 10:34 am

I've added a "sound" branch that contains these changes.
My SP-ROM YT channel
PlayeRom
 
Posts: 97
Joined: Tue Oct 20, 2020 1:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Aerotow Everywhere

Postby PlayeRom » Thu Aug 18, 2022 6:25 pm

I have managed the sound. The problem was that when I set my property to false, which is the condition to disable the sound, for some reason the FG takes a bit of time to disable the sound, and I was disabling the scenario too quickly for him. So now I turn off the sound by setting my property, wait 1 second and now turn off the scenario. Strange but it works.

I have therefore released a new version 1.3.0.

Changes:

1. Add engine sound for AI aircraft
My SP-ROM YT channel
PlayeRom
 
Posts: 97
Joined: Tue Oct 20, 2020 1:22 pm
Location: Poland
Callsign: SP-ROM
OS: Linux, Windows

Re: Aerotow Everywhere

Postby wlbragg » Thu Aug 18, 2022 6:56 pm

Cool, I verified the sound branch sound worked for me. Let me test the new release.

When should the engine sound shut off? When the AI Cub disappears or something else?

I don't know if you corrected it yet, but there is a typo in the "Aerotow in the way" line. I think you meant it to read "Aerotow on the way", on VS in.

Also, can I push another AI aircraft to the addon? I have a WW2 C-47 used to tow the Airspeed Horsa gliders on D-day and the Airspeed Horsa is in FGADDON Aircraft. So it would be another appropriate tow plane glider combination.

I can push it to your repos however you want?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Aerotow Everywhere

Postby wlbragg » Thu Aug 18, 2022 7:04 pm

Outstanding work @PlayeRom. This is so wonderfully well done and the perfect addon implementation. Sound is perfect! Thermal code is perfect, I even like the cloud top representation you chose. Thank you so much for doing this!
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7609
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

PreviousNext

Return to Add-ons

Who is online

Users browsing this forum: No registered users and 1 guest