Board index FlightGear Support Flying

Save radio settings?  Topic is solved

Controlling your aircraft, using the autopilot etc.

Save radio settings?

Postby pb321 » Sat Sep 28, 2019 4:33 pm

Is it possible to save radio settings so they don't have to be re-entered when starting at the same airport/runway with the same destination as a previous startup?
pb321
 
Posts: 140
Joined: Sun Nov 27, 2016 4:08 pm
Version: 2019.2.1
OS: Windows 10 Pro

Re: Save radio settings?

Postby Thorsten » Sat Sep 28, 2019 4:35 pm

In principle yes - in practice they would probably be managed by the airplane definitions, so this needs to be done on a case by case basis.
Thorsten
 
Posts: 11135
Joined: Mon Nov 02, 2009 8:33 am

Re: Save radio settings?

Postby pb321 » Sat Sep 28, 2019 5:34 pm

Ah, OK. Thanks, @Thorsten. Should the C-172 radio settings permit saving between sessions? If so, is this automatic or is it saved under "Cessna-172", "Save/Resume" or somewhere else?
pb321
 
Posts: 140
Joined: Sun Nov 27, 2016 4:08 pm
Version: 2019.2.1
OS: Windows 10 Pro

Re: Save radio settings?

Postby Thorsten » Sat Sep 28, 2019 5:39 pm

The C-172 I believe has a custom option to save the state, but I don't know what that includes - maybe a member of the C-172p team would be better suited to answer that question.
Thorsten
 
Posts: 11135
Joined: Mon Nov 02, 2009 8:33 am

Re: Save radio settings?

Postby wlbragg » Sat Sep 28, 2019 5:47 pm

"Save state of aircraft between sessions" should save the radio settings as far as I remember.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Save radio settings?

Postby pb321 » Sat Sep 28, 2019 7:45 pm

Thank you again, @Thorsten and @wlbragg. I've located and enabled the suggested setting, but haven't been successful after three times setting the radios, starting the C-172, flying a little, then quitting. Restart still shows the "unsaved" (default?) radio settings and requires re-entering the frequencies. So I searched the C-172 forum topic. One post indicates that you can save switches and toggles, but mentions nothing about frequencies. I haven't gotten it to save them as yet. Any suggestions?
pb321
 
Posts: 140
Joined: Sun Nov 27, 2016 4:08 pm
Version: 2019.2.1
OS: Windows 10 Pro

Re: Save radio settings?

Postby WoodSTokk » Sat Sep 28, 2019 10:43 pm

I have it tested now and my C172p saves the frequencies from all COM and NAV radios (activ and standby frequencies).
On FG 2019.2.0 (self compiled).
WoodSTokk
 
Posts: 309
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2018.3.1
OS: Debian Buster/Sid

Re: Save radio settings?

Postby wlbragg » Sat Sep 28, 2019 10:53 pm

I'm was surprise the radio settings aren't part of the save switch settings, I will look at the code as soon as I am at my computer.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Save radio settings?

Postby WoodSTokk » Sat Sep 28, 2019 11:05 pm

I double checked that and i have it definitely in the file ~/.fgfs/aircraft-data/c172p.xml.
All frequencies for COM, NAV and ADF, also transponder code and DME settings.
WoodSTokk
 
Posts: 309
Joined: Tue Oct 17, 2017 2:30 pm
Location: Milky Way/Sol/Earth/Europe
Callsign: OE-WST
IRC name: WoodSTokk
Version: 2018.3.1
OS: Debian Buster/Sid

Re: Save radio settings?

Postby pb321 » Sat Sep 28, 2019 11:23 pm

Thank you both for checking. I will try it on a different machine and see what happens.
pb321
 
Posts: 140
Joined: Sun Nov 27, 2016 4:08 pm
Version: 2019.2.1
OS: Windows 10 Pro

Re: Save radio settings?

Postby Johan G » Sat Sep 28, 2019 11:41 pm

pb321 wrote in Sat Sep 28, 2019 7:45 pm:[...] haven't been successful after three times setting the radios, starting the C-172, flying a little, then quitting. Restart still shows the "unsaved" (default?) radio settings and requires re-entering the frequencies. [...] I haven't gotten it to save them as yet. Any suggestions?

Looking at the default C172 in FGData radio settings does not seem to be saved.[1] There are more than one way to define what settings should be saved,[2] so this might be inconclusive.

If you are impatient I guess you could find the relevant properties by watching the property browser[3] while you are handling the radio. You could then add those properties to the list of properties to be saved between sessions.

The various -set.xml files in the c127p directory loads properties into FlightGear's property tree, with the c172p-set.xml being the base for the other ones, that include it with the attribute include="c172p-set.xml". In this case the subtree /sim/aircraft-data is of interests, in essence the parameters declared where the long comment is below:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>

<!-- ... -->

<PropertyList include="Aircraft/Generic/Human/Include/walker-include.xml">

    <sim include="c172p-views.xml">
        <aircraft-data>

            <!-- The paths listed here are declaring properties to be saved in between sessions in the c172p. -->

        </aircraft-data>
    </sim>

    <!-- ... --->

</PropertyList>

____
[1] See Aircraft/c172p/c172p-set.xml.
[2] For details, see the FlightGear wiki article Properties persistent between sessions (permalink)
[3] If you are not familiar with it, see the FlightGear wiki article Property browser (permalink). It can be a very handy tool at times.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5535
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: Save radio settings?

Postby pb321 » Sun Sep 29, 2019 3:21 am

Thank you for all the information, @JohanG. I will try to absorb it all, then give it a try.
I tried setting the radios for the C-172 on another Windows machine (laptop) with an early build of 2019.2.0. I quit FG, then re-loaded it. The settings were as I had set them. I quit FG again, then re-loaded it as before. The settings (no surprise) were still there. Then I realized I hadn't enabled the "Save state of aircraft between sessions" before either the first or the second re-start! I checked the Aircraft Options and it was not checked, yet it saved the settings!
pb321
 
Posts: 140
Joined: Sun Nov 27, 2016 4:08 pm
Version: 2019.2.1
OS: Windows 10 Pro

Re: Save radio settings?

Postby wlbragg » Sun Sep 29, 2019 7:41 am

That's correct. I refreshed my memory by reviewing the code. The radio settings are saved regardless of settings. They are also not over written if the "Save state of aircraft between sessions" in not checked.

These are the properties that are reset if "Save state of aircraft between sessions" in not checked.
Code: Select all
setprop("/controls/engines/engine[0]/primer", 0);
        setprop("/controls/engines/engine[0]/primer-lever", 0);
        setprop("/controls/engines/engine[0]/use-primer", 0);
        setprop("/controls/engines/current-engine/throttle", 0.0);
        setprop("/controls/engines/current-engine/mixture", 0.0);
        setprop("/controls/circuit-breakers/aircond", 1);
        setprop("/controls/circuit-breakers/autopilot", 1);
        setprop("/controls/circuit-breakers/bcnlt", 1);
        setprop("/controls/circuit-breakers/flaps", 1);
        setprop("/controls/circuit-breakers/instr", 1);
        setprop("/controls/circuit-breakers/intlt", 1);
        setprop("/controls/circuit-breakers/landing", 1);
        setprop("/controls/circuit-breakers/master", 1);
        setprop("/controls/circuit-breakers/navlt", 1);
        setprop("/controls/circuit-breakers/pitot-heat", 1);
        setprop("/controls/circuit-breakers/radio1", 1);
        setprop("/controls/circuit-breakers/radio2", 1);
        setprop("/controls/circuit-breakers/radio3", 1);
        setprop("/controls/circuit-breakers/radio4", 1);
        setprop("/controls/circuit-breakers/radio5", 1);
        setprop("/controls/circuit-breakers/strobe", 1);
        setprop("/controls/circuit-breakers/turn-coordinator", 1);
        setprop("/controls/switches/master-avionics", 0);
        setprop("/controls/switches/starter", 0);
        setprop("/controls/switches/master-alt", 0);
        setprop("/controls/switches/master-bat", 0);
        setprop("/controls/switches/magnetos", 0);
        setprop("/controls/switches/dome-white", 0);
        setprop("/controls/switches/dome-red", 0);
        setprop("/controls/lighting/nav-lights", 0);
        setprop("/controls/lighting/beacon", 0);
        setprop("/controls/lighting/strobe", 0);
        setprop("/controls/lighting/taxi-light", 0);
        setprop("/controls/lighting/landing-lights", 0);
        setprop("/controls/lighting/instruments-norm", 0.0);
        setprop("/controls/lighting/radio-norm", 0.0);
        setprop("/controls/lighting/dome-white-norm", 1.0);
        setprop("/controls/lighting/dome-norm", 0.0);
        setprop("/controls/lighting/gps-norm", 0.0);
        setprop("/controls/lighting/gearled", 0);
        setprop("/controls/gear/water-rudder", 0);
        setprop("/controls/gear/water-rudder-down", 0);
        setprop("/sim/model/c172p/brake-parking", 1);
        setprop("/controls/flight/flaps", 0.0);
        setprop("/surface-positions/flap-pos-norm", 0.0);
        setprop("/controls/flight/elevator-trim", 0.0);
        setprop("/controls/anti-ice/engine[0]/carb-heat", 0);
        setprop("/controls/anti-ice/engine[1]/carb-heat", 0);
        setprop("/controls/anti-ice/pitot-heat", 0);
        setprop("/environment/aircraft-effects/cabin-heat-set", 0.0);
        setprop("/environment/aircraft-effects/cabin-air-set", 0.0);
        setprop("/consumables/fuel/tank[0]/selected", 1);
        setprop("/consumables/fuel/tank[1]/selected", 1);
        setprop("/controls/flight/rudder-trim-knob", 0.0);



These are the settings that are saved on every session regardless of any setting.
Code: Select all
aircraft.data.add(
    "instrumentation/kma20/test",
    "instrumentation/kma20/auto",
    "instrumentation/kma20/com1",
    "instrumentation/kma20/com2",
    "instrumentation/kma20/nav1",
    "instrumentation/kma20/nav2",
    "instrumentation/kma20/adf",
    "instrumentation/kma20/dme",
    "instrumentation/kma20/mkr",
    "instrumentation/kma20/sens",
    "instrumentation/kma20/knob"
);

# NAV/COMM1 (according to its documentation)
aircraft.data.add(
    "instrumentation/comm[0]/power-btn",
    "instrumentation/comm[0]/volume-selected",
    "instrumentation/comm[0]/frequencies/selected-mhz",
    "instrumentation/comm[0]/frequencies/standby-mhz",
    "instrumentation/comm[0]/frequencies/dial-khz",
    "instrumentation/comm[0]/frequencies/dial-mhz",
    "instrumentation/comm[0]/test-btn",
    "instrumentation/comm[0]/channel-mode-selector",
    "instrumentation/nav[0]/ident-audible",
    "instrumentation/nav[0]/power-btn",
    "instrumentation/nav[0]/volume",
    "instrumentation/nav[0]/frequencies/selected-mhz",
    "instrumentation/nav[0]/frequencies/standby-mhz",
    "instrumentation/nav[0]/frequencies/dial-khz",
    "instrumentation/nav[0]/frequencies/dial-mhz",
    "instrumentation/nav[0]/radials/selected-deg",
);

# NAV/COMM2 (according to its documentation)
aircraft.data.add(
    "instrumentation/comm[1]/power-btn",
    "instrumentation/comm[1]/volume-selected",
    "instrumentation/comm[1]/frequencies/selected-mhz",
    "instrumentation/comm[1]/frequencies/standby-mhz",
    "instrumentation/comm[1]/frequencies/dial-khz",
    "instrumentation/comm[1]/frequencies/dial-mhz",
    "instrumentation/comm[1]/test-btn",
    "instrumentation/comm[0]/channel-mode-selector",
    "instrumentation/nav[1]/ident-audible",
    "instrumentation/nav[1]/power-btn",
    "instrumentation/nav[1]/volume",
    "instrumentation/nav[1]/frequencies/selected-mhz",
    "instrumentation/nav[1]/frequencies/standby-mhz",
    "instrumentation/nav[1]/frequencies/dial-khz",
    "instrumentation/nav[1]/frequencies/dial-mhz",
    "instrumentation/nav[1]/radials/selected-deg",
);

aircraft.data.add(
    "instrumentation/dme/switch-position",
    "instrumentation/dme/frequencies/source",
    "instrumentation/dme/frequencies/selected-mhz",
);

# Instruments
aircraft.data.add(
    "instrumentation/altimeter/setting-inhg",
    "instrumentation/attitude-indicator/horizon-offset-deg",
    "autopilot/settings/heading-bug-deg",
    "instrumentation/heading-indicator/offset-deg",
    "instrumentation/adf[0]/rotation-deg",
    "instrumentation/adf[0]/frequencies/dial-1-khz",
    "instrumentation/adf[0]/frequencies/dial-100-khz",
    "autopilot/KAP140/settings/dial-10-ft",
    "autopilot/KAP140/settings/dial-100-ft",
);

# DME saves power-btn in ki266.nas
# ADF saves its properties in ki87.nas
# TRANSPONDER (KT76A)
aircraft.data.add(
    "instrumentation/transponder/inputs/knob-mode",
    "instrumentation/transponder/inputs/ident-btn",
    "instrumentation/transponder/inputs/digit[0]",
    "instrumentation/transponder/inputs/digit[1]",
    "instrumentation/transponder/inputs/digit[2]",
    "instrumentation/transponder/inputs/digit[3]",
    "instrumentation/transponder/inputs/dimming-norm",
);

# Hobbs meter is saved in Nasal/engine.nas
# Save switches
aircraft.data.add(
    "/controls/lighting/beacon",
    "/controls/lighting/landing-lights",
    "/controls/lighting/nav-lights",
    "/controls/lighting/strobe",
    "/controls/lighting/taxi-light",
    "/controls/switches/magnetos",
    "/controls/switches/master-bat",
    "/controls/switches/master-alt",
    "/controls/switches/master-avionics",
    "/controls/switches/dome-red",
    "/controls/switches/dome-white",
    "/controls/lighting/gearled",
    "/controls/lighting/instruments-norm",
    "/controls/lighting/radio-norm",
    "/controls/lighting/dome-white-norm",
);

# Other controls
aircraft.data.add(
    "/controls/anti-ice/engine/carb-heat",
    "/controls/anti-ice/pitot-heat",
    "/consumables/fuel/tank/selected",
    "/consumables/fuel/tank[1]/selected",
    "/sim/model/c172p/brake-parking",
    "/controls/flight/flaps",
    "/controls/flight/elevator-trim",
    "/controls/engines/current-engine/throttle",
    "/controls/engines/current-engine/mixture",
    "/controls/engines/engine[0]/primer-lever",
);

# Circuit breakers
aircraft.data.add(
    "/controls/circuit-breakers/aircond",
    "/controls/circuit-breakers/autopilot",
    "/controls/circuit-breakers/bcnlt",
    "/controls/circuit-breakers/flaps",
    "/controls/circuit-breakers/instr",
    "/controls/circuit-breakers/intlt",
    "/controls/circuit-breakers/landing",
    "/controls/circuit-breakers/master",
    "/controls/circuit-breakers/navlt",
    "/controls/circuit-breakers/pitot-heat",
    "/controls/circuit-breakers/radio1",
    "/controls/circuit-breakers/radio2",
    "/controls/circuit-breakers/radio3",
    "/controls/circuit-breakers/radio4",
    "/controls/circuit-breakers/radio5",
    "/controls/circuit-breakers/strobe",
    "/controls/circuit-breakers/turn-coordinator",
    "/controls/circuit-breakers/cabin",
    "/controls/circuit-breakers/gear-select",
    "/controls/circuit-breakers/gear-advisory",;
    "/controls/circuit-breakers/hydraulic-pump",
);


So a current version of the c172p should always be saving the radio settings as far as I could tell.
Kansas(2-27-15)/Ohio/Midwest scenery development.
KEQA (2-27-15), 3AU, KRCP Airport Layout
User avatar
wlbragg
 
Posts: 4927
Joined: Sat Aug 25, 2012 11:31 pm
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Debain/nVGT640

Re: Save radio settings?

Postby wkitty42 » Sun Sep 29, 2019 2:07 pm

possibly the aircraft-data/c172p.xml file needs to be deleted on the problematic machine and let the system recreate it...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 5717
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Save radio settings?

Postby pb321 » Sun Sep 29, 2019 6:00 pm

Thank you, @wlbragg and @wkitty42!
Before seeing @wkitty42's suggestion, I deleted the navdata_2019.1.cache to see if that might have an effect. It didn't. Then I deleted the new cache file, restored the deleted cache file, deleted the flightgear.org/aircraft-data/c172p.xml file, restarted FG, set the radios, quit, restarted, then checked the radios. No success.

I noticed there was a c172pSave folder with a file "save1.xml" in it. I renamed that folder and again deleted /aircraft-data/c172p.xml and repeated the above process. No success.

I noticed also that there is a c172p.xml file in L:\FlightGear 2019.1.2\data\Aircraft\c172p (FG is installed on my L: drive). Should that be deleted, too?
Should I uninstall and reinstall FG?

One thing that I should mention but may have no relevance to this problem: I still have three navdata_yyyy_v.cache files from previous FG installations in flightgear.org. Should they be deleted? Could that be a related problem?
pb321
 
Posts: 140
Joined: Sun Nov 27, 2016 4:08 pm
Version: 2019.2.1
OS: Windows 10 Pro

Next

Return to Flying

Who is online

Users browsing this forum: No registered users and 1 guest