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

[rotorcraft] heading integration protection in RC-event #1174

Merged
merged 1 commit into from
Jun 11, 2015

Conversation

flixr
Copy link
Member

@flixr flixr commented May 4, 2015

The PSI += .... was highly depending on the RC-frame rate.
With most RC this is not a problem but with variable message rates (e.g. rc_datalink dropping messages or joysticks sending too many frames) this line becomes dangerous.

So measure the time between to calls to read_rc_setpoint function instead of using a fixed RC_UPDATE_FREQ.
To prevent really weird things from happening, bound dt to 0.5s.

Don't partuculariliy like that this pulls in the sys_time dependency here,
but couldn't think of something better...

should close #452

The PSI += .... was highly depending on the RC-frame rate.
With most RC this is not a problem but with variable message rates (e.g. rc_datalink dropping messages or joysticks sending too many frames) this line becomes dangerous.

So measure the time between to calls to read_rc_setpoint function instead of using a fixed RC_UPDATE_FREQ.
To prevent really weird things from happening, bound dt to 0.5s.

Don't partuculariliy like that this pulls in the sys_time dependency here,
but couldn't think of something better...

should close #452
@OpenUAS
Copy link
Contributor

OpenUAS commented May 12, 2015

Ah, great so much welcomed, thx!

@OpenUAS OpenUAS added this to the v5.6 milestone May 12, 2015
@flixr
Copy link
Member Author

flixr commented Jun 8, 2015

@gautierhattenberger what do you think?

@gautierhattenberger
Copy link
Member

The only addition I can see is to keep the possibility of a fixed dt, in case your very confident and want to avoid jitter (can this really happen ?)

@flixr
Copy link
Member Author

flixr commented Jun 8, 2015

Keeping possibility for fixed DT could be done, but I would say we add this only if someone actually needs it....

flixr added a commit that referenced this pull request Jun 11, 2015
…tion

[rotorcraft] heading integration protection in RC-event

The PSI += .... was highly depending on the RC-frame rate.
With most RC this is not a problem but with variable message rates (e.g. rc_datalink dropping messages or joysticks sending too many frames) this line becomes dangerous.

So measure the time between to calls to read_rc_setpoint function instead of using a fixed RC_UPDATE_FREQ.
To prevent really weird things from happening, bound dt to 0.5s.

fixes #452
@flixr flixr merged commit fe4b1f8 into master Jun 11, 2015
@flixr flixr deleted the rc_heading_integration_protection branch June 11, 2015 16:49
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.

heading integration protection in RC-event
3 participants