Distance to ground at various contact points #1102
Replies: 12 comments 2 replies
-
Here is a quick prototype, only done some minimal testing so far. |
Beta Was this translation helpful? Give feedback.
-
There's no rush, but thanks
It needs to be the structure
<contact type="STRUCTURE" name="ROTOR_FRONT">
<contact type="STRUCTURE" name="ROTOR_REAR">
<contact type="STRUCTURE" name="ROTOR_LS">
<contact type="STRUCTURE" name="ROTOR_RS">
If it could be made available in the next update, I'd appreciate it.
thanks again
|
Beta Was this translation helpful? Give feedback.
-
The changes I made make the AGL property available for both gear contacts and structure contacts. |
Beta Was this translation helpful? Give feedback.
-
Some additional testing. I added two structure contact points to the 737 model, it currently only has 3 gear contacts. <ground_reactions>
<contact name="Nose Gear" type="BOGEY">
<location unit="IN">
<x> 158 </x>
<y> 0 </y>
<z> -84 </z>
</location>
<static_friction> 0.80 </static_friction>
<dynamic_friction> 0.50 </dynamic_friction>
<rolling_friction> 0.02 </rolling_friction>
<spring_coeff unit="LBS/FT"> 90000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 4000 </damping_coeff>
<damping_coeff_rebound unit="LBS/FT/SEC">8000</damping_coeff_rebound>
<max_steer unit="DEG"> 35 </max_steer>
<brake_group> NONE </brake_group>
<retractable>1</retractable>
</contact>
<contact name="Left Main Gear" type="BOGEY">
<location unit="IN">
<x> 648 </x>
<y> -100 </y>
<z> -84 </z>
</location>
<static_friction> 0.80 </static_friction>
<dynamic_friction> 0.50 </dynamic_friction>
<rolling_friction> 0.02 </rolling_friction>
<spring_coeff unit="LBS/FT"> 120000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 10000 </damping_coeff>
<damping_coeff_rebound unit="LBS/FT/SEC">20000</damping_coeff_rebound>
<max_steer unit="DEG"> 0.0 </max_steer>
<brake_group> LEFT </brake_group>
<retractable>1</retractable>
</contact>
<contact name="Right Main Gear" type="BOGEY">
<location unit="IN">
<x> 648 </x>
<y> 100 </y>
<z> -84 </z>
</location>
<static_friction> 0.80 </static_friction>
<dynamic_friction> 0.50 </dynamic_friction>
<rolling_friction> 0.02 </rolling_friction>
<spring_coeff unit="LBS/FT"> 120000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 10000 </damping_coeff>
<damping_coeff_rebound unit="LBS/FT/SEC">20000</damping_coeff_rebound>
<max_steer unit="DEG"> 0.0 </max_steer>
<brake_group> RIGHT </brake_group>
<retractable>1</retractable>
</contact>
<contact type="STRUCTURE" name="nose">
<location unit="IN">
<x> 0 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<static_friction> 0.2 </static_friction>
<dynamic_friction> 0.2 </dynamic_friction>
<rolling_friction> 0.2 </rolling_friction>
<spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 2000 </damping_coeff>
</contact>
<contact type="STRUCTURE" name="tail">
<location unit="IN">
<x> 1000 </x>
<y> 0 </y>
<z> 0 </z>
</location>
<static_friction> 0.2 </static_friction>
<dynamic_friction> 0.2 </dynamic_friction>
<rolling_friction> 0.2 </rolling_friction>
<spring_coeff unit="LBS/FT"> 10000 </spring_coeff>
<damping_coeff unit="LBS/FT/SEC"> 2000 </damping_coeff>
</contact>
</ground_reactions> And added references to all of the gear and structure contacts in <property>gear/unit[0]/AGL</property>
<property>gear/unit[1]/AGL</property>
<property>gear/unit[2]/AGL</property>
<property>contact/unit[3]/AGL</property>
<property>contact/unit[4]/AGL</property> Note that the With the following output. gear/unit[0]/AGL = 30074.2
gear/unit[1]/AGL = 30072.5
gear/unit[2]/AGL = 30072.5
contact/unit[3]/AGL = 30081.7
contact/unit[4]/AGL = 30078.3 |
Beta Was this translation helpful? Give feedback.
-
I've created a pull request - #1104 |
Beta Was this translation helpful? Give feedback.
-
Wow much appreciated.
Can I indulge you further ?
I've an XML auto pilot for my helicopters that amongst other things has a
ground following element. It's major lacking is that it's always behind, by
this mean as it's looking and reacting to the ground below it's solely
reactive.
Now if based on current velocity it could be made to change it's downward
looking angle to one which is instead 45degs in front and even dare I say
it outwards to the right and left. I could create an auto pilot that could
fly through a canyon.
Would you see this as an interesting addition. ?
|
Beta Was this translation helpful? Give feedback.
-
Yeh, but what if I also work on another game engine ?
|
Beta Was this translation helpful? Give feedback.
-
JSBSim does aerodynamics. It doesn’t “understand” a mountain up ahead. The other game engine might.
…--Adam
|
Beta Was this translation helpful? Give feedback.
-
Yet JSBsim knows where the ground is perpendicular to the plane..... But
not anywhere else.
Just saying
…On Thu, 27 Jun 2024, 23:30 gallonmate, ***@***.***> wrote:
Any game engine allows you to ray cast and get the terrain or object
information. I assume flight gear can also ray cast (or similar).
—
Reply to this email directly, view it on GitHub
<#1102 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHXNQRGTCNMSHNXC3XY6HVTZJSG7DAVCNFSM6AAAAABJ3PEELSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TQOJYHE2TC>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
JSBSim and it's XML scripting is limited. If you're using Unreal Engine, I'm confused why you aren't coding your systems in unreal. You'll have much more freedom in the design and ability of your game systems. If you need some tips on making your systems work in unreal engine, I can give a basic overview to get you started. |
Beta Was this translation helpful? Give feedback.
-
JSBSim's only requirement for knowledge of the terrain is in order to perform ground contacts of the gear and structure elements. Therefore it has no built-in knowledge or tools for handling DEMs/terrain meshes. Rather it provides a ground callback interface implemented by the 'host' system in order to get the AGL value for each contact (gear and structure). This is a very simple ground callback interface, which given the location of the contact (gear or structure) based on the aircraft's CoG and it's attitude the ground callback returns the AGL under that position. In the default implementation of the ground callback which is used by JSBSim stand-alone or when the host system doesn't provide one it defaults to assuming a terrain elevation of 0, therefore the AGL value is always the altitude of the contact above the WGS84 ellipse. Typically host systems like FlightGear, Unreal etc. provide support for DEMs/terrain meshes and implementations of ray casting with the terrain. |
Beta Was this translation helpful? Give feedback.
-
Thanks for taking the time to explain, I really appreciate it.
I thought that'd be the case, but didn't see any harm in asking.
Regards
Simon.
…On Sat, 29 Jun 2024, 16:48 Sean McLeod, ***@***.***> wrote:
JSBSim does aerodynamics. It doesn’t “understand” a mountain up ahead. The
other game engine might.
Yet JSBsim knows where the ground is perpendicular to the plane..... But
not anywhere else.
JSBSim's only requirement for knowledge of the terrain is in order to
perform ground contacts of the gear and structure elements. Therefore it
has no built-in knowledge or tools for handling DEMs/terrain meshes. Rather
it provides a ground callback interface implemented by the 'host' system in
order to get the AGL value for each contact (gear and structure). This is a
very simple ground callback interface, which given the location of the
contact (gear or structure) based on the aircraft's CoG and it's attitude
the ground callback returns the AGL under that position.
In the default implementation of the ground callback which is used by
JSBSim stand-alone or when the host system doesn't provide one it defaults
to assuming a terrain elevation of 0, therefore the AGL value is always the
altitude of the contact above the WGS84 ellipse.
Typically host systems like FlightGear, Unreal etc. provide support for
DEMs/terrain meshes and implementations of ray casting with the terrain.
—
Reply to this email directly, view it on GitHub
<#1102 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHXNQRENDDLROMSMOWMKDQDZJ3JOPAVCNFSM6AAAAABJ3PEELSVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4TSMJSGY3TQ>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Could it be possible in the future to provide the distance to ground as a readable property for 'structure' contact points ?
It's a helicopter thing.
Beta Was this translation helpful? Give feedback.
All reactions