Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flight Gear visualisation with native fdm #1290

Closed
wants to merge 2 commits into from

Conversation

podhrmic
Copy link
Member

@podhrmic podhrmic commented Aug 6, 2015

Allows using NPS with Flight Gear's Native FDM. As a result, it is possible to show moving control surfaces (flaps, ailerons etc) and spinning propeller.

Simulator has to be started with --fg_fdm 1 option, and flight gear with --native-fdm option (instead of --native_gui).

For example NPS launch command:
./sw/simulator/pprzsim-launch -a Bixler -t nps --js_dev 0 --fg_host 127.0.01 --fg_fdm 1

And Flight Gear launch command:
fgfs --fdm=null --native-gui=socket,in,30,,5501,udp --prop:/sim/model/path=Models/Aircraft/paparazzi/easystar.xml

More about Native FDM for Flight Gear here: http://wiki.flightgear.org/index.php/Property_Tree/Sockets

@flixr
Copy link
Member

flixr commented Aug 6, 2015

nice! Can you plz also add the --fg_fdm option to the help/usage

nps_flightgear_send();
if (nps_main.fg_host) {
if (nps_main.fg_fdm) {
nps_flightgear_send_fdm();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

intentation....

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed with fix_code_style.sh

@flixr
Copy link
Member

flixr commented Aug 6, 2015

Just curious, do you know why native-fdm needs to have the struct in network order and native-gui not??

@podhrmic
Copy link
Member Author

podhrmic commented Aug 6, 2015

I think it was either sheer luck (native-gui just happened to work with the same byte order), or FlightGear internally treats the native-gui differently than native-fdm...

@@ -78,6 +78,8 @@ def main():
help="Number of RC script to use")
nps_opts.add_option("--time_factor", type="float", action="store", metavar="factor",
help="Time factor (default 1.0)")
nps_opts.add_option("--fg_fdm", action="store_true", metavar="factor",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

metavar doesn't make any sense for an option without arguments anymore...

@flixr
Copy link
Member

flixr commented Aug 6, 2015

Also please if you reformat a whole file (that has not conformed before), it is much nicer to separate the functional changes and the pure reformatting in separate commits...
Then you can later easily see what the actual changes where when going through the log...

@flixr flixr closed this in 47ce133 Aug 6, 2015
@podhrmic podhrmic deleted the fg_visual branch August 10, 2015 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants