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

Add OSD item to show heading correction to go home #3411

Merged
merged 1 commit into from Jun 22, 2018

Conversation

Projects
None yet
2 participants
@shellixyz
Copy link
Collaborator

commented Jun 21, 2018

Closes #3091

{
buff[0] = SYM_HOME;
buff[1] = SYM_HEADING;
int16_t h = wrap_18000(DEGREES_TO_CENTIDEGREES((int32_t)GPS_directionToHome) - DECIDEGREES_TO_CENTIDEGREES((int32_t)osdGetHeading()));

This comment has been minimized.

Copy link
@fiam

fiam Jun 21, 2018

Member

Why is this in 0.1deg? Isn't 1deg precise enough? MWOSD seems to be displayed full degrees https://github.com/ShikOfTheRa/scarab-osd/blob/2f2311363a95ad797dbb92621330b6c2ffab8e79/MW_OSD/Screen.ino#L1191

This comment has been minimized.

Copy link
@shellixyz

shellixyz Jun 21, 2018

Author Collaborator

I made this very quickly without checking I will update it soon. I'm converting to centidegrees to be able to use wrap_18000 but it needs to be converted back to degrees. Would be so much better if everything was in degrees inside floats...

This comment has been minimized.

Copy link
@fiam

fiam Jun 21, 2018

Member

Wouldn't osdGetHeadingAngle() work for the wrapping?

This comment has been minimized.

Copy link
@fiam

fiam Jun 21, 2018

Member

Ah, scratch that. I got it, you want CCW to be negative. Makes sense that way.

@shellixyz shellixyz force-pushed the shellixyz:osd_home_heading_error branch 2 times, most recently from 576cd86 to 8993283 Jun 21, 2018

@shellixyz shellixyz force-pushed the shellixyz:osd_home_heading_error branch from 8993283 to b94e1f2 Jun 22, 2018

@fiam fiam merged commit e62c438 into iNavFlight:development Jun 22, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@fiam fiam added this to the 2.0 milestone Jun 22, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.