element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Personal Blogs
  • Community Hub
  • More
Personal Blogs
NexGen Flight Simuator Flight Simulator 101 or back to college - part 1: Frames of Reference
  • Blog
  • Documents
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
  • Share
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: phoenixcomm
  • Date Created: 23 Dec 2012 2:10 AM Date Created
  • Views 1570 views
  • Likes 4 likes
  • Comments 8 comments
  • cortex™-m4
  • flight_simulation
  • stellaris_arm®
  • feature_tutorial
  • linux
Related
Recommended

Flight Simulator 101 or back to college - part 1: Frames of Reference

phoenixcomm
phoenixcomm
23 Dec 2012

Well I will start not with the aircraft model but rather the state, or art of flight simulation:

 

Flight Dynamics Model This box does calculations on:

  • The Aircrafts Frame of Reference
    which is a 3-D Cartesian (orthogonal right-handed) coordinate system (x, y, z),image

       which is centered (origin) at the rear of the aircraft. Where:

    • ROLL-axis passes through the propeller and tail. (Positive to the nose)
    • PITCH-axis passes though wing tip to wing tip. (Positive to right wing)
    • YAW-axis is a vertical axis, and is perpendicular to both the ROLL-axis, and PITCH-axis. (positive is down)
  • which contains a hierarchical model of the aircraft. In this way parameter data inputs can drive individual parts, such as control surfaces. Also parts may be attached to other parts in such a way that movement of one part will cause movement in an other.

 

 

  • The Local Frame of Reference which is
    a 3-D Cartesian (orthogonal right-handed) coordinate system (x, y, z), whose origin is defined to be the origin of the Aircraft’s Frame of Refence
    • North-axis
    • East-axis
    • Down-axis
  • all so factors such as wind, baro, temp,
    rain, lift, drag, thrust, control surfaces, etc. will factor
    into this module.
  • When the aircraft is flying North (0 roll, 0 pitch, 0 yaw) both Reference Frames will line up.
  • To transform points in the aircraft (AFR) to the LFR you must use matrix math.
  • To find out what attitude the aircraft is in you need to to perform integration on PITCH, ROLL, YAW
  • THIS MODULE Will run @ 100/fps
    • velocity += acceleration * Dt
    • value += velocity * Dt

 

  • Navigation Model This box does calculations on:
  • Earth Frame of Reference, which is a 3-D Cartesian (orthogonal right-handed) coordinate system (x, y, z), and whose origin is defined to be the center of the Earth. The Earth Frame of Reference is encluded here for referance only and only is used when you are off world or in space. So we will skip this step and convert directly to Geocentric (Spherical) Frame of Referance from
    the LFR.
    image
    • Axis of Rotation (x) passes through the North Pole, Center of the Earth, South Pole. (Positive is North)
    • Axis of Prime Meridian (z) passes through the Prime Meridian at the equator and pass out the other side. (Positive is Prime Meridian)
    • Axis of (y) passes 90 deg from the Prime Meridian at the equator and passes out the other side. (Positive is East)
  • Tangential Plane, which is a 3-D Cartesian (orthogonal right-handed) coordinate system (x, y, z), parallel to the LRF and is tangent to the surface of the earth.

 

  • Geocentric Frame of Reference which is a spherical coordinate system, who’s origin is at the center of the earth.
    • Distance from Center of Earth to Aircraft: Ρ = √(x2+y2+z2)
    • Latitude of Aircraft on Earth: arcsin(x/Ρ)
    • Longitude of Aircraft on Earth: arcsin(z/√(y2+z2))

 

  • Geodetic Frame of Reference
    which is a ellipsoid model of the earth, World Geodetic System (WGS84).
  • this box does caululations Dead Reckoning Nav Model this box does calculations on
    • lat-new = (cos(heading)*Dt*V) + lat-cur
    • lon-new = ((sin(heading)*Dt*V)/cos(lat-cur)) + lon-cur

 

Navigation Management / Displays needs the following information when starting (maybe more)

  • Lat, Lon, Alt (from the Flight Dynamics and Nav Models
  • Temp
  • Barometer
  • Time (Zulu) most likely a time stamp, UNIX time would be good..
    The time should be derived from an NTP Server(Network Time Protocol). This would sync all boxes in the world to the same time.
  • Navigation can use ellipsoid models such as WGS84, or others.
  • Navigation can be both entered or displayed in both LAT/LONG or MILL-GRID.
  • Outputs to ADI, HSI, etc.

 

Out The Window(s) Sub-System or The Display Frame of Referance is a 3-D Cartesian (orthogonal right-handed) corrdinate system ( x, y, z ), and whose origin is defined as the pilot’s eye which is a vector in the Aircraft Frame of Rreferance.

  • Up (x) is defined as Up and Down or in the Aircrafts Yaw Axis (positive up)
  • Right (y) is defined in the Aricrafts Pitch Axis (right wing positive )
  • In (z) is defined along the Aircrafts Roll Axis ( Forward is positive )

 

 

image keep tuned in more to come

Cris H.

 

Index to NexGen Blog

Flight Simulator 101 or back to college ( part 1 Frames of Reference )

  • Sign in to reply

Top Comments

  • phoenixcomm
    phoenixcomm over 12 years ago in reply to rhydian98 +1
    1.That is a good question: But the answer is simple. Which version? XP, 7, or now 8, its a forever moving target. On the other hand Unix/Linux has been stable for decades. It has well understood, interfaces…
  • rhydian98
    rhydian98 over 12 years ago

    Thanks Cris

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • phoenixcomm
    phoenixcomm over 12 years ago in reply to rhydian98

    http://www.opengl.org/

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • rhydian98
    rhydian98 over 12 years ago

    Thanks Cristiana. Is opengl open software or do you need to pay for the software to use its full potential. Could you give me a link to the download page.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • phoenixcomm
    phoenixcomm over 12 years ago in reply to rhydian98

    1.That is a good question: But the answer is simple. Which version? XP, 7, or now 8, its a forever moving target. On the other hand Unix/Linux has been stable for decades. It has well understood, interfaces, and libraries. The tools are much better ( GCC, Eclipse). The Microsoft C compiler is buggy and bites you in the rear. And by staying with /Unix/Linux I can stay away from licensing problems, if I take this simulator commercial.

    2a. pick one there are plenty of 3D packages to use OpenGL comes to mind and you should rembmer that we dont just use one head some of us have multipule projectors. The aircraft should be standard wireframes so they will work with Xplane, etc.

    2b. We are not drawing the simulator... We are building cockpits with instuments, radios, etc. Yes if we have a glass cockpit then we draw instruments but thats not very important.

    enjoy

    Cris H.

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 12 years ago

    Very good intro to three space coordinates.

     

    I would point out that this will work until you get to either the north or south poles. 

     

    Back in the 1980's I implemented the above calculations in an 8085 processor using assembly language and a AMD9511 math chip.

    I was able to get the aircraft position and attitude changes from an onboard doppler radar unit.  I then mapped the aircraft information back to cartesian coordinates so that I could then drive a IR camera along the flight vector axis.

     

    I was able to keep the camera pointing correctly in real time for search and rescue helicopters.

    Given the speed of modern MCU's, you should easily be able to do similar transformations faster today.

     

    I will keep an eye on your postings.  They bring a twinge of nostalgia for my younger days and it is a good math refresher.

     

    Thanks for posting,

    DAB

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
>
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube