Skip to content

Conversation

@nealkruis
Copy link
Contributor

No description provided.

@nealkruis nealkruis requested a review from chipbarnaby May 9, 2020 04:15
@nealkruis nealkruis self-assigned this May 9, 2020
float azm_delta = azm - pv_azm;

// normalize azm_delta between -Pi and Pi
if (azm_delta >= kPi)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normalization test s/b > not >=. if azm_delta == kPi, the code would subtract k2Pi, yielding -kPi, then add k2Pi, yielding kPi. Not wrong, but ... . Should also use else.
if ( d > kPi)
d-= k2Pi
else if (d < -kPi)
d+=k2Pi

Copy link
Contributor

@chipbarnaby chipbarnaby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments.

It would seem that some of the angle normalization stuff could be extracted to utility functions, lots of similar code. Someday.

@nealkruis nealkruis merged commit e03611c into master May 11, 2020
@nealkruis nealkruis deleted the single-axis-tracker branch May 11, 2020 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants