albar965 / littlenavmap

Little Navmap is a free flight planner, navigation tool, moving map, airport search and airport information system for Flight Simulator X, Microsoft Flight Simulator 2020, Prepar3D and X-Plane.
https://albar965.github.io/littlenavmap.html
GNU General Public License v3.0
1.23k stars 161 forks source link

Suggestion: Auto-load aircraft performance profile based on path #1113

Open JT8D-17 opened 3 months ago

JT8D-17 commented 3 months ago

It would be a minor quality of life improvement if LittleNavMap stored paths to aircraft in its aircraft performance profiles and automatically loaded them if the associated aircraft in was loaded in the simulator.

Here's a suggested design outline for such a feature for X-Plane (I'm sure there's similar methods in other simulators):

albar965 commented 3 months ago

Already on the list.

The aircraft model (ICAO model) is already read from .acf or aircraft.cfg files as well as the model path. The latter one is not needed since the ICAO model is enough.

I'd rather scan through a path defined by the user or all files in the history. Also do this on demand and in background since it would delay the startup.

JT8D-17 commented 3 months ago

Didn't some old release of LNM auto-load the profile or am I misremembering something? I think shortly after the introduction of this feature.

ICAO is bit of a weak identifier as, for example on the A320 and 747 families, it does not discriminate between engine types which all have different fuel consumption characteristics. "A320" is for both CFM and IAE engines, while "B742" is for RR, GE and PW engines. Hence the request to use a complete path.

In any case, good to know it's already on the list. Thanks.

albar965 commented 3 months ago

Nope. LNM did never auto-load the profiles.

Thinking of this, it does not make much sense IMO since normally one creates a plan before sitting in the cockpit at the departure. There is no ICAO aircraft type transferred to LNM before.

Taking into account engine differences is not possible at all, as LNM cannot detect them in any simulator.

I think the better solution is to load it manually.

JT8D-17 commented 3 months ago

Thinking of this, it does not make much sense IMO since normally one creates a plan before sitting in the cockpit at the departure. There is no ICAO aircraft type transferred to LNM before.

Not necessarily. I mostly let the flight load at the departure airport and only then decide where to go.

Taking into account engine differences is not possible at all, as LNM cannot detect them in any simulator.

In X-Plane, you most definitely can by reading the path down to the ACF file. Here's why: Unless the aircraft uses some plugin magic to alter engine parameters (thrust, RPMs, fuel flow, etc.) to cover different engine variants, the only other way is to use different ACF files (e.g. 747-400_PW.acf, 747-400_RR.acf, etc.) with specific engine parameters, but which are stored in the exact same folder because they use (almost) the exact same art assets. (FSX behaving exactly the same, IIRC.)

The alternative of altering the ICAO code to some fantasy one to represent a certain engine variant in order to autoload a suitable performance file in LNM would mess up other simulator elements like ATC.

albar965 commented 3 months ago

acf does not contain engine variants and there is no way I'll read the filesnames (which is unreliable anway) to get the variants. Not worth the effort and added complexity.

JT8D-17 commented 3 months ago

I'm using "XPLMGetNthAircraftModel" to get the path in a few projects of mine and it works absolutely reliably each and every time.

albar965 commented 3 months ago

I already do the same since not all parameters are available as datarefs but I'm not going to scan the filename for engine types.

JT8D-17 commented 3 months ago

I already do the same since not all parameters are available as datarefs but I'm not going to scan the filename for engine types.

I think we have a grave misunderstanding here. "Engine variants" was just a use case to justify using the path to an ACF or aircraft.cfg file as a definite association for a performance profile.