-
Notifications
You must be signed in to change notification settings - Fork 462
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
Create AGL property for contacts #1104
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1104 +/- ##
==========================================
- Coverage 24.94% 24.93% -0.01%
==========================================
Files 170 170
Lines 18235 18239 +4
==========================================
Hits 4548 4548
- Misses 13687 13691 +4 ☔ View full report in Codecov by Sentry. |
9e66b60
to
242650d
Compare
Thanks for the PR. Sorry, I had to rebase the code following the incompatibility with Numpy 2.0 (see PR #1107) as it was preventing your PR to be tested on the MacOSX ARM64 platform. I'm not sure that we should return an AGL for retracted gears, at least for the following reasons:
Regarding the code:
Lines 297 to 301 in c867cc7
|
In terms of ray casting and retracted gear and performance I thought about this at the time when I noticed that the code was only calculating the AGL for the gear when the gear was extended. However this means there is a difference between aircraft with fixed undercarriage, e.g. a C-172 and aircraft like the 737 with retractable undercarriage. There is also generally a ray cast from the CoG for each simulation time step, especially if the aerodynamics section includes a function calculating ground effects. Also remember this is a specialised ray cast, as opposed to a generic ray cast. It's really a DEM lookup, i.e. given a lat, lon return the ground elevation for the particular DEM cell. As opposed to the general ray cast of casting a ray from altitude at some angle towards the ground with potential terrain in-between before the ray hits the ellipse etc. So I'd be surprised if this sort of DEM lookup was very CPU intensive. In terms of retractable gear, yep, we don't have a structural location specified for the retracted state, so in the retracted state we are as you say with a fictitious point. However, one of the reasons I implemented this request over and above the original poster's request is that a while ago I came across some documentation from Boeing with regards to their simulator model for an early generation 737 which had the following in it. In which for calculating ground effects they don't use the AGL of the CoG but rather the AGL of the main gear. The ground effects need to be calculated for a wheels up case as well, i.e. based on the fictitious point of the main gear, so a potential reason to calculate the AGL for the gear even if they're retracted. Although I guess an FDM developer could always make use of the CoG AGL and the relevant angles and offsets as shown in the Boeing snippet to create a function to calculate the main gear's AGL. In terms of the member name, |
Fair enough. If someone complains about an increase of their CPU load after this PR has been committed there is still remaining the option of evaluating the AGL of retracted gears on demand (i.e. only when the property getter is called).
I've been working in the aerospace industry for 25+ years and I can confirm that we have a dedicated passion for acronyms 😄 British, American and French aerospace industry alike (and most likely others as well but I cannot tell from my personal experience regarding them). The highest score I've seen so far is 5 acronyms in a single bullet point (albeit made of several sentences) in a PowerPoint presentation. And the slide was making perfect sense to the attendance, actually I was the only person who noticed that 5 acronyms were packed in a single bullet point 😉 I could be picky and argue that AGL is mostly used for an aircraft as a whole and that the word "height" is used for structural points. For example I've never seen the acronym Also regarding JSBSim I'm not so fond of acronyms because I know from experience that they are daunting for newcomers and we cannot assume that all our users have a solid background in aerospace jargon so I'd say that a comment is the bare minimum. And yes, there are already plenty of occurrences of acronyms in JSBSim code so we can live with one more 😄 That's just my 2 cents. |
And if the property name could mention the unit (i.e. feet) that would be perfect ! |
Will do. In terms of the rebasing that shouldn't affect my branch in terms of updating it to make the changes with regards to the member name, property name etc.? I can as usual for a PR simply go ahead and push another commit to my branch? |
If you had not committed local changes to your branch before Otherwise, you'd need to rename your branch to duplicate the changes, reset the branch used for the PR, pull that branch for rebasing and finally cherry pick the changes from the duplicated branch. At least, that's how I'd proceed. |
Talking of the Boeing acronyms, took me a little while to decode HMGBT to Height Main Gear Bottom of Tire 😉 And HGCG - Height above Ground (?) Center of Gravity? No consistency in using ground? Also realised that this must be a fictitious tire since they multiply by |
I've been told that some of the more cryptic acronyms are the legacy of the older FORTRAN compilers that were limiting the variable names to 7 letters max. There are also some cases where an acronym is starting with the X letter because FORTRAN was forcing variables starting with the letters I to N to be integers. For instance the rotating speed of the N1 spool is noted
I guess this is accounting for the fact that if a wing closer to the ground then the opposite wing must be farther to the ground by the same amount in absolute value: the opposite offsets would be mutually neutralizing and the ground effect could be safely assessed from the centerline height above the ground ? Just a guess, I'm no aerodynamicist. |
Yep, I did notice references to Fortran in the document, so they obviously didn't use JSBSim within Boeing😉 |
@seanmcleod @bcoconni great job! |
@bcoconni it turns out the statement I made above isn't accurate, at least for the Unreal plug-in, I haven't looked at the FlightGear implementation yet. I had assumed that JSBSim hosts like Unreal, FlightGear etc. would simply be performing a DEM lookup as opposed to a general raycast. I realised this wasn't the case for Unreal when I took a look at discussion - #1105. In looking at the code for the Unreal plugin for this discussion I noticed that they are performing a general raycast. Lines 130 to 155 in 2a5985c
Thinking about it, this makes sense particularly if you want to be able to model landing on objects above ground, e.g. an aircraft carrier deck, you need a raycast to detect the aircraft carrier model's deck rather than the ocean below it. Or a helicopter landing on a building etc. So in general I think JSBSim's hosts will make use of general raycasting rather than simple DEM lookups. I also noticed based on the discussion that the F-16 model in JSBSim has 7 structure contacts, so there are 7 raycasts being performed on each timestep even if the landing gear is retracted. |
In response to the request in discussion - #1102