Giter Site home page Giter Site logo

julianneswinoga / flightgear-python Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 6.0 174 KB

Interface package to the FlightGear flight simulation software aimed at simplicity

License: MIT License

Shell 5.79% Python 93.45% Handlebars 0.76%
flight-simulation flightgear interface python

flightgear-python's People

Contributors

juhannc avatar julianneswinoga avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

flightgear-python's Issues

Auto-detect native protocol version

For the native protocols (FDM, Ctrls, Gui) we force the user to manually enter the protocol version, and we bail out if the version number in the message doesn't match.
However the version number is the first couple bytes of every message. We could dynamically parse this and then decide how to parse the rest of the message.
This would require restructuring how we represent the native interface structures (I think?) which would be annoying, but overall the benefit would be fantastic for usability ๐Ÿ‘

FDM not working on Windows

I try to run a basic FDM example, but I get an error:

Traceback (most recent call last):
  File "C:\Users\Grishin\PycharmProjects\pythonProject1\FDM_TEST.py", line 25, in <module>
    fdm_conn.start()  # Start the FDM RX/TX loop
  File "C:\Users\Grishin\PycharmProjects\pythonProject1\venv\lib\site-packages\flightgear_python\fg_if.py", line 118, in start
    self.rx_proc.start()
  File "C:\Users\Grishin\AppData\Local\Programs\Python\Python38\lib\multiprocessing\process.py", line 121, in start
    self._popen = self._Popen(self)
  File "C:\Users\Grishin\AppData\Local\Programs\Python\Python38\lib\multiprocessing\context.py", line 224, in _Popen
    return _default_context.get_context().Process._Popen(process_obj)
  File "C:\Users\Grishin\AppData\Local\Programs\Python\Python38\lib\multiprocessing\context.py", line 327, in _Popen
    return Popen(process_obj)
  File "C:\Users\Grishin\AppData\Local\Programs\Python\Python38\lib\multiprocessing\popen_spawn_win32.py", line 93, in __init__
    reduction.dump(process_obj, to_child)
  File "C:\Users\Grishin\AppData\Local\Programs\Python\Python38\lib\multiprocessing\reduction.py", line 60, in dump
    ForkingPickler(file, protocol).dump(obj)
_pickle.PicklingError: Can't pickle <class 'construct.core.Pass'>: it's not the same object as construct.core.Pass

Process finished with exit code 1

What can I do to fix it?

python version: 3.8 (I also tested on 3.11.2 but nothing changed)
my start options: --fdm=null --max-fps=30 --native-fdm=socket,out,30,,5501,udp --native-fdm=socket,in,30,,5502,udp
When I work via telnet everything is fine

Refactor `PropsConnection` and `HTTPConnection`

They both interface with FlightGear's property tree so there is a lot of shared code. This will probably involve renaming PropsConnection to something like TelnetConnection and creating a shared base class (named something like PropertyConnectionBase)

Examples giving errors

Thank you for this project. Seems very interesting.

I'm trying out the examples. Simple_fdm.py seems to work as expected.

However, if I run simple_gui.py I receive an error:

line 2728, in _parse raise ConstError(f"parsing expected {repr(self.value)} but parsed {repr(obj)}", path=path) construct.core.ConstError: Error in path (parsing) -> version parsing expected 8 but parsed 402653184

And if I run simple_ctrls.py I get an error:
line 2728, in _parse raise ConstError(f"parsing expected {repr(self.value)} but parsed {repr(obj)}", path=path) construct.core.ConstError: Error in path (parsing) -> version parsing expected 27 but parsed 24

These errors don't really explain what is wrong, or what to do about it.
Any additional guidance would be appreciated.

Thanks,

CircleCI for PRs

As shown in #9 CircleCI did not trigger a build. For easier community contributions this is required.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.