Skip to content
New issue

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

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

Already on GitHub? # to your account

Aircraft's Systems sub-directories are missing in the wheel packages. #687

Closed
bcoconni opened this issue Jul 27, 2022 Discussed in #683 · 6 comments
Closed

Aircraft's Systems sub-directories are missing in the wheel packages. #687

bcoconni opened this issue Jul 27, 2022 Discussed in #683 · 6 comments
Assignees
Labels

Comments

@bcoconni
Copy link
Member

Discussed in #683

Originally posted by cjdupuis1 July 21, 2022
I have been having trouble with a lot of the example scripts that come with the download. For example, the Short-S23 is missing the Short_S23-hydrodynamics system file. The ah1s helicopter model is missing files. It seems like only about half of the example scripts run without errors. I can provide more examples if necessary.

Are all of the example scripts supposed to run?

@seanmcleod
Copy link
Member

@bcoconni in addition to aircraft specific Systems sub-directories some aircraft also include an Engines sub-directory, e.g. the ah1s that I checked when I looked into this issue.

@bcoconni
Copy link
Member Author

Oups ! You're absolutely right @seanmcleod. Thanks for the heads up 👍

@seanmcleod
Copy link
Member

The other thing I noticed last night when looking into this and finding the relevant code in setup.py.in was whether os.path.exists() etc. are case sensitive or not across Windows and Unix.

For example we have aircraft\MB339\systems, i.e. all lower case for systems whereas other aircraft have \Systems etc.

So I didn't submit a pull request last night to fix the missing sub-directories for aircraft since I wanted to double-check the case sensitivity issue. But you then pushed a commit, so I'll let you double-check 😉

In general Windows has a case preserving but case insensitive file system, but in general Unix file systems are case preserving and case sensitive.

@dpculp
Copy link
Collaborator

dpculp commented Jul 27, 2022 via email

@bcoconni
Copy link
Member Author

The other thing I noticed last night when looking into this and finding the relevant code in setup.py.in was whether os.path.exists() etc. are case sensitive or not across Windows and Unix.

Regarding the case sensitivity topic, I'd say we are in a mixed situation since the default systems folder is all lower case:

jsbsim/src/FGFDMExec.cpp

Lines 99 to 101 in 16bb270

AircraftPath = "aircraft";
EnginePath = "engine";
SystemsPath = "systems";

while the Systems folder under the aircraft has a capital letter :

jsbsim/src/models/FGFCS.cpp

Lines 611 to 620 in 16bb270

SGPath FGFCS::FindFullPathName(const SGPath& path) const
{
SGPath name = FGModel::FindFullPathName(path);
if (systype != stSystem || !name.isNull()) return name;
name = CheckPathName(FDMExec->GetFullAircraftPath()/string("Systems"), path);
if (!name.isNull()) return name;
return CheckPathName(FDMExec->GetSystemsPath(), path);
}

The same issue applies to engines vs Engines, by the way:

SGPath FGPropulsion::FindFullPathName(const SGPath& path) const
{
if (!ReadingEngine) return FGModel::FindFullPathName(path);
SGPath name = CheckPathName(FDMExec->GetFullAircraftPath()/string("Engines"),
path);
if (!name.isNull()) return name;
return CheckPathName(FDMExec->GetEnginePath(), path);
}

So strictly speaking the code that has been committed to master (commits 3016b7c and 16bb270) is correct 😄. However we might want to allow both systems and Systems as aircraft subdirectories (as well as engines and Engines) ?

For example we have aircraft\MB339\systems, i.e. all lower case for systems whereas other aircraft have \Systems etc.

I can't find any MB339 aircraft in JSBSim, are you referring to an aircraft from FlightGear ?

So I didn't submit a pull request last night to fix the missing sub-directories for aircraft since I wanted to double-check the case sensitivity issue. But you then pushed a commit, so I'll let you double-check 😉

Yes, sorry. I was so eager to fix my error that I pushed a fix as soon as I could.

@seanmcleod
Copy link
Member

Yes, sorry.

Definitely no problem 😉.

I can't find any MB339 aircraft in JSBSim, are you referring to an aircraft from FlightGear ?

Hmm, just double-checked via git status and I see that MB339 is something I added locally at some stage. Can't remember when or from where. So, good chance it could be from FlightGear.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants