Sim/flightmodel/position/local x

From X-Plane SDK
Jump to: navigation, search

local_x double 660+ yes meters The location of the plane in OpenGL coordinates

Open question, hopefully soon to be answered by me: What are the "OpenGL coordinates" that this is specified in?

Some text I found at XPLMGraphics.pas

  Graphics routines for X-Plane and OpenGL. 
  A few notes on coordinate systems: 
  X-Plane uses three kinds of coordinates.  Global coordinates are specified 
  as latitude, longitude and elevation.  This coordinate system never changes 
  but is not very precise.   
  OpenGL (or 'local') coordinates are cartesian and shift with the plane.  
  They offer more precision and are used for 3-d OpenGL drawing.  The X axis 
  is aligned east-west with positive X meaning east.  The Y axis is aligned 
  straight up and down at the point 0,0,0 (but since the earth is round it is 
  not truly straight up and down at other points).  The Z axis is aligned 
  north-south at 0, 0, 0 with positive Z pointing south (but since the earth 
  is round it isn't exactly north-south as you move east or west of 0, 0, 0). 
  One unit is one meter and the point 0,0,0 is on the surface of the  earth 
  at sea level for some latitude and longitude picked by the sim such that 
  the  user's aircraft is reasonably nearby. 
  Cockpit coordinates are 2d, with the X axis horizontal and the Y axis 
  vertical. The point 0,0 is the bottom left and 1024,768 is the upper right 
  of the screen. This is true no matter what resolution the user's monitor is 
  in; when running in higher resolution, graphics will be scaled. 
  Use X-Plane's routines to convert between global and local coordinates.  Do 
  not attempt to do this conversion yourself; the precise 'roundness' of 
  X-Plane's  physics model may not match your own, and (to make things 
  weirder) the user can potentially customize the physics of the current