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

use UDP telemetry in NPS sim #1404

Merged
merged 4 commits into from
Nov 16, 2015
Merged

Conversation

flixr
Copy link
Member

@flixr flixr commented Nov 4, 2015

Get rid off all the datalink parsing "hacks" and use the actual parser from the firmware. That includes that the datalink parse functions of modules are run...

This however means that you need to run link with the -udp option to use the NPS sim.

So I guess we should find a nice way to also automatically start link with the simulation session (but only for type NPS).

flixr added 3 commits November 4, 2015 22:21
- get rid off all the datalink parsing "hacks" and use the actual parser from the firmware
- this however means that you need to run link with the -udp option to use the NPS sim
@flixr
Copy link
Member Author

flixr commented Nov 4, 2015

I also added parsing of DL_SETTING messages directly via ivy again, so that you can turn the datalink_enabled setting back on.
What is missing there is a check that only allows you to change that option and none of the others.
@gautierhattenberger do you have a good idea on how to get the settings index for that specifc setting?

@flixr
Copy link
Member Author

flixr commented Nov 4, 2015

Or we create another ground message to set all the NPS options and we can completely get rid of the nps settings "hack"....

@gautierhattenberger
Copy link
Member

we are generating a SETTINGS_NAME macro in settings.h, so can init a table with that and search for the index of the settings you need.

@flixr
Copy link
Member Author

flixr commented Nov 5, 2015

When I have some time I'll look into checking the settings names, but I guess that doesn't have to be the focus now... was working like this so far as well...

Any ideas on how to best also start link for NPS sim sessions? Create a separate NPS session?

@flixr flixr added this to the v5.8 milestone Nov 16, 2015
@flixr
Copy link
Member Author

flixr commented Nov 16, 2015

When starting a simulator session with NPS, link should now be started automatically as well...

@gautierhattenberger @dewagter any comments/objections? Otherwise I would like to merge this.

@dewagter
Copy link
Member

I like the idea that a simulation is as similar to flight as possible: so no problem starting link (and being able to simulate link loss as well).

Probably needs some mention on the mailing list as well.

flixr added a commit that referenced this pull request Nov 16, 2015
use UDP telemetry in NPS sim

When launching a Simulator session from the Paparazzi Center, link should be automatically started as well.
If sitl is started directly, one also needs to start link with the -udp option.
@flixr flixr merged commit f30d131 into paparazzi:master Nov 16, 2015
@flixr flixr deleted the nps_udp_telemetry branch November 16, 2015 23:22
flixr added a commit that referenced this pull request Nov 18, 2015
and use it in NPS sim session.

Should fix #1404 with multiple vehicles:
When simulating multiple vehicles with NPS (which now uses UDP), link needs to send the messages via broadcast so that every sim agent gets the messages.
@flixr
Copy link
Member Author

flixr commented Nov 18, 2015

So you need the added -udp_broadcast option as well if you simulate multiple aircrafts. Then it work on Linux...
For OSX you also need 5458834 to be able to listen on the same address/port
Tried to set the default broadcast address for OSX to 224.255.255.255 (just like for Ivy) with fc910c9 but that doesn't seem to do the trick.
However using the broadcast address of your actual interface seems to work...

@hooperfly
Copy link
Contributor

For Mac OS X, the -udp_broadcast_addr argument is needed for multiple aircraft simulation. Reference the wiki for details:
https://wiki.paparazziuav.org/wiki/NPS#Simulating_Multiple_Aircraft

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants