Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
JT8D-17 opened this issue Mar 25, 2024 · 8 comments
Open

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

JT8D-17 opened this issue Mar 25, 2024 · 8 comments
Assignees
Labels
enhancement requested reschedule Assign to one of the milestones

Comments

@JT8D-17
Copy link

JT8D-17 commented Mar 25, 2024

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):

  • Reading the path to the user aircraft can be done with XPLMGetNthAircraftModel, with "inIndex" = 0. "outPath" returns the path to the ACF file.

  • LittleXPConnect would read the path at every aircraft reload or flight start event and then either:

    • iterate through all ".lnmperf" files to find a matching path
      or
    • access a database file that contains the path to an ACF file and its associated .lnmperf file (to avoid iterating through files).
  • Upon finding a matching lnmperf file, said file would be loaded. No match naturally would of course not do anything.

  • This would be done at LNM startup or aircraft reloads (changes) triggered in X-Plane.

  • Adding a path would be done in the aircraft performance editor by clicking an "Add Path" button or filling in the text field manually.

  • Supporting multiple paths per performance files would also be possible so that different ACF files for the same aircraft (e.g. passenger and cargo variants) can access the same data.

@albar965 albar965 self-assigned this Mar 26, 2024
@albar965 albar965 added enhancement requested reschedule Assign to one of the milestones labels Mar 26, 2024
@albar965
Copy link
Owner

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
Copy link
Author

JT8D-17 commented Mar 26, 2024

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
Copy link
Owner

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
Copy link
Author

JT8D-17 commented Mar 27, 2024

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
Copy link
Owner

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
Copy link
Author

JT8D-17 commented Mar 28, 2024

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

@albar965
Copy link
Owner

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
Copy link
Author

JT8D-17 commented Mar 28, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement requested reschedule Assign to one of the milestones
Projects
None yet
Development

No branches or pull requests

2 participants