Replies: 8 comments 10 replies
-
In terms of initializing the aircraft in terms of position and attitude here are the relevant initial condition properties you can use. jsbsim/src/initialization/FGInitialCondition.h Lines 181 to 187 in b005a91 jsbsim/src/initialization/FGInitialCondition.h Lines 211 to 214 in b005a91 jsbsim/src/initialization/FGInitialCondition.cpp Lines 1586 to 1593 in b005a91
Yes, that should work.
You didn't finish your question. Do you need a rotation matrix, as opposed to simply making use of the attitude angles Did you write the Colab Jupyter notebook you linked to? Looks useful. |
Beta Was this translation helpful? Give feedback.
-
@yuki-2000 here is a project with Jupyter notebooks where a lot of work has been done to visualize trajectories in various simulation scenarios: WiReS/calc This work was then refined and the results were used for this open access publication: Varriale C., De Marco A., et al., "Flight Load Assessment for Light Aircraft Landing Trajectories in Windy Atmosphere and Near Wind Farms", DOI: 10.3390/aerospace5020042. Here is a concise tutorial on how to handle position: TUTORIAL 02 Here is an example that builds on previous tutorials: Waypoint based, automatic guidance 1 In this folder WiReS/calc/python you'll find the Python sources that implement the low-level functions. Example of function: WiReS/calc/python/geography.py |
Beta Was this translation helpful? Give feedback.
-
I've added some NEU (North East Up) from initial location properties to JSBSim which you could then use instead of Will post a link to the proposed changes once I've done a bit more testing. |
Beta Was this translation helpful? Give feedback.
-
PropertyManager->Tie("attitude/phi-rad", this, ePhi, &FGPropagate::GetEuler);
PropertyManager->Tie("attitude/theta-rad", this, eTht, &FGPropagate::GetEuler);
PropertyManager->Tie("attitude/psi-rad", this, ePsi, &FGPropagate::GetEuler);
PropertyManager->Tie("attitude/phi-deg", this, ePhi, &FGPropagate::GetEulerDeg);
PropertyManager->Tie("attitude/theta-deg", this, eTht, &FGPropagate::GetEulerDeg);
PropertyManager->Tie("attitude/psi-deg", this, ePsi, &FGPropagate::GetEulerDeg); And the documentation. /** Retrieves a vehicle Euler angle component.
Retrieves an Euler angle (Phi, Theta, or Psi) from the quaternion that
stores the vehicle orientation relative to the Local frame. The order of
rotations used is Yaw-Pitch-Roll. The Euler angle with subscript (1) is
Phi. Various convenience enumerators are defined in FGJSBBase. The
relevant enumerators for the Euler angle returned by this call are,
ePhi=1, eTht=2, ePsi=3 (e.g. GetEuler(eTht) returns Theta).
units radians
@return An Euler angle.
*/
double GetEuler(int axis) const { return VState.qAttitudeLocal.GetEuler(axis); } |
Beta Was this translation helpful? Give feedback.
-
This is the exactly the information what I look for !! |
Beta Was this translation helpful? Give feedback.
-
In general, you won't find everything detailed in and documented in the reference manual which is very old by now. So you often need to search through the source code to look at the comments and to look at the source code itself. |
Beta Was this translation helpful? Give feedback.
-
I've pushed a commit to a branch in my JSBSim fork showing what I'm thinking of submitting as a PR to the JSBSim repo. Want to do a bit more testing first. Let me know if you have any comments. In the meantime I'd suggest you continue using |
Beta Was this translation helpful? Give feedback.
-
This is an example of video on Google Colab that I had in mind. (Output of the last cell) Aside from the dirtiness of my code, is there a demand for videos like this in example? @agodemar I used your codes and that was very helpful. Thank you. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello.
I am currently creating a program on Google Colab to visualize the movement of airplanes as videos, because it is easier to intuitively understand the movement of the aircraft than to view the changes in each parameter over time on a graph.
I need position(x,y,z) variables and attitude variables(psi, theta, phi) in orthogonal coordinate system.
I try to search in the document and programs, and I found
'position/distance-from-start-lon-mt', 'position/distance-from-start-lat-mt', 'position/h-sl-meters'
and'attitude/phi-rad', 'attitude/theta-rad', 'attitude/psi-rad'
However, I have never learned how to express position and orientation taking into account the shape of the Earth, and I am confused.
I read the official documentation's Section 3: Formulation Manual, https://jsbsim.sourceforge.net/JSBSimReferenceManual.pdf.
My question is,
'position/distance-from-start-lon-mt', 'position/distance-from-start-lat-mt', 'position/h-sl-meters'
asx,y,z
?To be more specific, this is the kind of program I want to create. (sorry for not English.)
https://colab.research.google.com/drive/1qv5Hll_v4UWcC6YVJDv2KYifhyz7vU5Q?usp=sharing
Videos are made using only python and you can play them in the google colab.
Beta Was this translation helpful? Give feedback.
All reactions