-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Conversation
nice! Can you plz also add the |
nps_flightgear_send(); | ||
if (nps_main.fg_host) { | ||
if (nps_main.fg_fdm) { | ||
nps_flightgear_send_fdm(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
intentation....
There was a problem hiding this comment.
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
Just curious, do you know why native-fdm needs to have the struct in network order and native-gui not?? |
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", |
There was a problem hiding this comment.
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...
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... |
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