Jump to content
Sign in to follow this  
luks7n

Flyinheight above sea level

Recommended Posts

Hey, so we are almost reaching 2016 and I would like to know if there is a solution for the AI stable flight issue.

 

We all know that "Flyinheight" command uses ground as reference... so there is any trick or solution so far, so the AI can fly stable ?

 

Thanks !

Share this post


Link to post
Share on other sites

Afaik flyinheight works on sea level, not terrain level when flying over water.

Share this post


Link to post
Share on other sites

Sure, but the problem is when you try to set a unit to fly over the terrain.

 

I don't know if is necessary a script to keeps getting ASL data continuously in a loop, anyone have a clue ?

Share this post


Link to post
Share on other sites

Hey, so we are almost reaching 2016 and I would like to know if there is a solution for the AI stable flight issue.

 

We all know that "Flyinheight" command uses ground as reference... so there is any trick or solution so far, so the AI can fly stable ?

 

Thanks !

 

As I said, AI can not fly stable because this command use as reference ground level. So is there anyway to work around this ? Any script, trick, or something to make the command assume sea level as reference while flying above the terrain ?

Share this post


Link to post
Share on other sites

And with stability I guess you refer to the stuttering during flight? I guess that is the loop running while calculating AGL. 

 

BIS_fnc_setHeight can be used to set altitude ASL. But the 'unstable' effect remains as you'll need to run calculations on each frame which makes it also quite expensive. Same goes for a while loop where you calculate position and take in consideration the velocity before/after setting the ASL pos.

Share this post


Link to post
Share on other sites

Thank for your help whiztler.

 

What I refer to stability problem is the aircraft swing that keeps going up and down while passing over mountains and cliffs respectively.

So can I set the altitudeASL of an aircraft with BIS_fnc_setHeight in the waypoint's init ? If so how it would look like ?

Share this post


Link to post
Share on other sites

And about creating a range of waypoints to simulate a takeoff like waypoint 1 (taxi to runway) >>waypoint 2(take off)>>waypoint 3 (gain altitudeASL). Have any idea ?

Share this post


Link to post
Share on other sites

Put a plane on the Altis airport add waypoints. You'll see that all you asked for is already available. Airports have predefined taxi routes, arri/dept flight paths, etc. The only thing you need to add is cruise altitude. Remember that ARMA3 is not Prepar3D/FSX. 

Share this post


Link to post
Share on other sites

Already did that but with flyinheight in wp init which uses AGL data and the problem described above appears. So how a takeoff waypoint's init would look like with an ASL command ? 

 

I guess this only applies to an aircraft spawned in flight.

 

Spawning the aircraft at a certain altitude should keep it at that altitude unless you order it do do otherwise. See: https://community.bistudio.com/wiki/setPosASL.

 

Maybe this, but how ?

And with stability I guess you refer to the stuttering during flight? I guess that is the loop running while calculating AGL. 

 

BIS_fnc_setHeight can be used to set altitude ASL. But the 'unstable' effect remains as you'll need to run calculations on each frame which makes it also quite expensive. Same goes for a while loop where you calculate position and take in consideration the velocity before/after setting the ASL pos.

Share this post


Link to post
Share on other sites

Don't use the flyinheight as it uses AGL which you don't want. You could write a climb out function that simulates the angel of attack after v1 rotate. The quick 'n' dirty alternative is to set cruise altitude at the first (or second) waypoint (setPosATL or setPosASL).

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×