Board index FlightGear Support Flying

How to change orientation of aircraft

Controlling your aircraft, using the autopilot etc.

How to change orientation of aircraft

Postby Xmaksasx » Thu Jun 13, 2019 9:18 am

Hello Guys,
how can I change orientation of aircraft in air? position of aircraft i can change easy, i must change following propertyes

    /position/longitude-deg
    /position/latitude-deg
    /position/altitude-ft
I tried to change following properties for change orientation

    /orientation/roll-deg
    /orientation/pitch-deg
    /orientation/heading-deg

but I can not, my actions is next I set a pause, change the properties of the orientation (visually the aircraft changes its orientation ) but after I turn off the pause it changes the orientation back
Xmaksasx
 
Posts: 6
Joined: Wed Jun 12, 2019 8:18 am

Re: How to change orientation of aircraft

Postby Gijs » Thu Jun 13, 2019 9:35 am

Hi and welcome!

Your adjustments are most likely overwritten by the flight dynamics model (FDM) on every frame. If you are only after using FlightGear for visualising your aircraft's position/attitude, you may be interested in running it with the following command line option:
Code: Select all
--fdm=null

Please give us some more info on what you're trying to achieve if that's not what you're looking for.

Cheers,
Gijs
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9363
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: How to change orientation of aircraft

Postby Xmaksasx » Thu Jun 13, 2019 9:55 am

Thanks for the reply.
I'm using a FlightGear with an EC-135 model helicopter. FlightGear is not just for visualization. I'll try to explain.
I'm doing research on how a pilot copes with a difficult situation, i change the orientation of the aircraft, and a pilot has to return the aircraft to correct horizontal position.
Xmaksasx
 
Posts: 6
Joined: Wed Jun 12, 2019 8:18 am

Re: How to change orientation of aircraft

Postby Gijs » Thu Jun 13, 2019 10:31 am

Sounds like an interesting project! YASim (the FDM that's used by the ec135) does not accept live attitude changes for helicopters, like you've already noticed. One of the problems is that you cannot just initialize the heli at a certain attitude and expect everything to work fine. I'm not a heli expert, but you probably want to have the heli trimmed at the new attitude for example. Else it will try to return to whatever state it was in before you changed the attitude. Depending on the difference between the states, this can be really violent and prevent your pilot from controlling the heli at all.

Hopefully someone with more YASim and/or heli experience can chime in and give you some better advice on how to proceed.
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400
User avatar
Gijs
Moderator
 
Posts: 9363
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 10

Re: How to change orientation of aircraft

Postby legoboyvdlp » Thu Jun 13, 2019 10:40 am

Positioning the aircraft in the air using the menu under "location" allows you to specify position and orientation - if you check the code for that dialog (somewhere under gui/ in FGDATA) that may help you solve the problem?
User avatar
legoboyvdlp
 
Posts: 6928
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: How to change orientation of aircraft

Postby Xmaksasx » Fri Jun 14, 2019 9:01 am

I looked at the source code https://github.com/FlightGear/flightgear/blob/next/src/GUI/LocationWidget.cxx , but I did not find there information on how to set the orientation, only setting the heading, but no roll and pitch
Xmaksasx
 
Posts: 6
Joined: Wed Jun 12, 2019 8:18 am

Re: How to change orientation of aircraft

Postby Johan G » Fri Jun 14, 2019 11:03 am


Umm, the official repository does not have that file: https://sourceforge.net/p/flightgear/fl ... e/src/GUI/

Also, I would guess that the dialog you are looking for would be this one https://sourceforge.net/p/flightgear/fg ... in-air.xml but unfortunately it does not seem to set the orientation, only the position. I would have liked to have a look at that history of that dialog to see if you could do that in the past but later was removed for some reason, but unfortunately SourceForge throws an error when I try that.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Johan G
Moderator
 
Posts: 5480
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: How to change orientation of aircraft

Postby legoboyvdlp » Fri Jun 14, 2019 12:58 pm

That GitHub mirror is outdated and I would not reccomend using it. It also may have additional changes not in official FlightGear as the FGMEMBERS fork do not have any review procedures for contributions but just accept every change. So it may be broken as well.


Check FGDATA (the /data/ folder) - there will be a .xml file there as well. There will probably also be some source code in sourceforge as well.
User avatar
legoboyvdlp
 
Posts: 6928
Joined: Sat Jul 26, 2014 1:28 am
Callsign: YV-LEGO
Version: 2018.3.1
OS: Windows 10 HP

Re: How to change orientation of aircraft

Postby Thorsten » Sun Jun 16, 2019 7:49 am

I'm doing research on how a pilot copes with a difficult situation, i change the orientation of the aircraft, and a pilot has to return the aircraft to correct horizontal position.


I'm not 100% sure, but YaSim might just not be up to the job of doing this, there is this possibility.

I know that in JSBSim you can reset the whole set of position, velocity and attitude - so how dependent is your research on the EC-135? The Alouette-III for instance is a JSBSim-driven helicopter and might be more responsive to your attempts to set it into a difficult attitude.
Thorsten
 
Posts: 10820
Joined: Mon Nov 02, 2009 8:33 am

Re: How to change orientation of aircraft

Postby Xmaksasx » Mon Jun 17, 2019 2:44 pm

Thanks to everyone for the help.
Now I have two options for solving my problem.
- the first option is Alouette-III ( but Alouette-III stabilizes in a horizontal position, I will try it again, I think that when changing the roll or pitch, I have to change and angular velocity).
- the second option I wrote an application in C#. The application in a loop sends the values
    /position/altitude-ft
    /position/latitude-deg
    /position/longitude-deg
    /controls/flight/aileron
    /controls/flight/elevator
thereby simulating a difficult position, after that, I turn off the sending data and the pilot gets control of the aircraft in difficult position.
If you have other options, please tell me. I will write about the final version that I will use :)
Xmaksasx
 
Posts: 6
Joined: Wed Jun 12, 2019 8:18 am


Return to Flying

Who is online

Users browsing this forum: No registered users and 2 guests