-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
SITL: fix json airspeed #27476
SITL: fix json airspeed #27476
Conversation
@tridge, Could you please take a look at this? My Gazebo simulation is not working anymore, and I think I've figured out why. |
c0420d5
to
5093f4e
Compare
Thanks for the suggestions @IamPete1. I think you are right about the changes. Could you add bug and DevCall labels to this, since Gazebo sim is broken right now? |
Airspeed calculation for JSON was not quite working because velocity_air_ef was not updated in SIM_JSON.cpp Update libraries/SITL/SIM_JSON.cpp Co-authored-by: Peter Hall <[email protected]> Update libraries/SITL/SIM_JSON.cpp Co-authored-by: Peter Hall <[email protected]> comment changes remove redundant airspeed calculation
|
||
// airspeed | ||
airspeed = velocity_air_bf.length(); |
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.
I see other backends still updating these; why do we no longer need to do that here?
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.
The calculation is already done inside update_eas_airspeed(). If left as it is, the variable airspeed will be
rewritten anyway. I figure it's better to remove the line to avoid confusion.
@IamPete1 are you OK with this now? |
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.
LGTM, thanks.
@peterbarker Yeah, I think its good to merge.
Merged, thanks! |
Thanks! |
Airspeed calculation for JSON was not quite working because velocity_air_ef was not updated in SIM_JSON.cpp