Changeset 243:1a42c5aa468b for src/mlx


Ignore:
Timestamp:
06/10/12 12:50:30 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added the logging of the CoG value

Location:
src/mlx
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/acft.py

    r241 r243  
    300300        self.logger.message(self._aircraftState.timestamp,
    301301                            "Touchdown heading: %03.0f degrees" % (heading,))
     302        self.logger.message(self._aircraftState.timestamp,
     303                           "Centre of gravity:  %.03f" % \
     304                            (self._aircraftState.cog,))
    302305
    303306    def cancelFlare(self):
  • src/mlx/checks.py

    r241 r243  
    142142            logger.message(state.timestamp,
    143143                           "Takeoff pitch: %.1f degrees" % (state.pitch,))
     144            logger.message(state.timestamp,
     145                           "Centre of gravity:  %.03f" % (state.cog,))
    144146            self._onTheGround = False
    145147
  • src/mlx/fs.py

    r209 r243  
    214214    - windDirection: the direction of the wind at the aircraft in degrees (float)
    215215    - visibility: the visibility in metres (float)
     216    - cog: the centre of gravity
    216217
    217218    FIXME: needed when taxiing only:
  • src/mlx/fsuipc.py

    r240 r243  
    11621162                      ("windSpeed", 0x0e90, "H"),
    11631163                      ("windDirection", 0x0e92, "H"),
    1164                       ("visibility", 0x0e8a, "H")]
    1165 
     1164                      ("visibility", 0x0e8a, "H"),
     1165                      ("cog", 0x2ef8, "f")]
    11661166
    11671167    specialModels = []
     
    13381338
    13391339        state.visibility = data[self._monidx_visibility]*1609.344/100.0
     1340       
     1341        state.cog = data[self._monidx_cog]
    13401342       
    13411343        return state
  • src/mlx/pyuipc_sim.py

    r213 r243  
    261261        for i in range(0, Values.HOTKEY_SIZE):
    262262            self.hotkeyTable.append([0, 0, 0, 0])
     263
     264        self.cog = 0.27
    263265
    264266        self.pmdg_737ng_switches = 0
     
    438440        elif offset==0x2200:       # Engine #3 N1
    439441            return self.n1[self.ENGINE_3]
     442        elif offset==0x2ef8:       # Centre of Gravity
     443            return self.cog
    440444        elif offset==0x30c0:       # Gross weight
    441445            return (self.zfw + sum(self.fuelWeights)) * const.KGSTOLB
     
    659663        elif offset==0x2200:       # Engine #3 N1
    660664            self.n1[self.ENGINE_3] = value
     665        elif offset==0x2ef8:       # Centre of Gravity
     666            self.cog = value
    661667        elif offset==0x30c0:       # Gross weight
    662668            raise FSUIPCException(ERR_DATA)
     
    12531259                                                      lambda word: long(word, 16))
    12541260
     1261        self._valueHandlers["cog"] = (0x2ef8, "f", lambda value: value,
     1262                                       lambda word: float(word))
     1263
    12551264        self._valueHandlers["pmdg_737ng_switches"] = (0x6202, "b",
    12561265                                                      lambda value: value,
Note: See TracChangeset for help on using the changeset viewer.