Changeset 6:db83d19666dc
- Timestamp:
- 01/31/12 18:06:30 (13 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
src/const.py
r4 r6 3 3 #------------------------------------------------------------------------------- 4 4 5 # The ratio between lbs and kg 6 LBSTOKG=0.4536 7 8 # The ratio between feet and metre 9 FEETTOMETRES=0.3048 10 11 #------------------------------------------------------------------------------- 12 5 13 # Flight simulator type: MS Flight Simulator 2004 6 TYPE_MSFS9 = 114 SIM_MSFS9 = 1 7 15 8 16 # Flight simulator type: MS Flight Simulator X 9 TYPE_MSFSX = 217 SIM_MSFSX = 2 10 18 11 19 # Flight simulator type: X-Plane 9 12 TYPE_XPLANE9 = 320 SIM_XPLANE9 = 3 13 21 14 22 # Flight simulator type: X-Plane 10 15 TYPE_XPLANE10 = 423 SIM_XPLANE10 = 4 16 24 17 25 #------------------------------------------------------------------------------- -
src/fs.py
r5 r6 32 32 FIXME: add info 33 33 """ 34 assert type==const. TYPE_MSFS9, "Only MS Flight Simulator 2004 is supported"34 assert type==const.SIM_MSFS9, "Only MS Flight Simulator 2004 is supported" 35 35 import fsuipc 36 36 return fsuipc.Simulator(connectionListener, aircraft) -
src/fsuipc.py
r5 r6 254 254 pyuipc.fs_version) 255 255 Handler._callSafe(lambda: 256 self._connectionListener.connected(const. TYPE_MSFS9,256 self._connectionListener.connected(const.SIM_MSFS9, 257 257 description)) 258 258 return True … … 578 578 state.onTheGround = data[self._monidx_onTheGround]!=0 579 579 580 state.grossWeight = data[self._monidx_grossWeight] * util.LBSTOKG580 state.grossWeight = data[self._monidx_grossWeight] * const.LBSTOKG 581 581 582 582 state.heading = data[self._monidx_heading]*360.0/65536.0/65536.0 … … 588 588 state.ias = data[self._monidx_ias]/128.0 589 589 state.groundSpeed = data[self._monidx_groundSpeed]* 3600.0/65536.0/1852.0 590 state.vs = data[self._monidx_vs]*60.0 *3.28984/256.0591 592 state.altitude = data[self._monidx_altitude] *3.28084/65536.0/65536.0590 state.vs = data[self._monidx_vs]*60.0/const.FEETTOMETRES/256.0 591 592 state.altitude = data[self._monidx_altitude]/const.FEETTOMETRES/65536.0/65536.0 593 593 594 594 state.gLoad = data[self._monidx_gLoad] / 625.0 -
src/test.py
r5 r6 10 10 11 11 def main(): 12 simulator = fs.createSimulator(const. TYPE_MSFS9, fs.ConnectionListener(),12 simulator = fs.createSimulator(const.SIM_MSFS9, fs.ConnectionListener(), 13 13 acft.Aircraft(const.AIRCRAFT_B737)) 14 14 simulator.connect() -
src/util.py
r4 r6 1 1 # Various utilities 2 2 3 # The ratio between lbs and kg4 LBSTOKG=0.4536
Note:
See TracChangeset
for help on using the changeset viewer.