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

Is this a bug? I think there should be an assignment sentence. #27

Open
zhudelong opened this issue Jun 30, 2016 · 0 comments
Open

Is this a bug? I think there should be an assignment sentence. #27

zhudelong opened this issue Jun 30, 2016 · 0 comments

Comments

@zhudelong
Copy link

zhudelong commented Jun 30, 2016

Hi Guidance Team,
In the source code, Guidance-SDK/demo/obstacle_bypass/discontinuity-balance_strategy/src/dji_sdk/src/dji_sdk_node.cpp, from line 279 to 283. The variable neighbor_count was defined and initialized as zero but never used before line 282. However, it act as a Denominator in line 282. Is this a bug? I think we should add else {neighbor_count++ } after 279, am I right? Looking forward to your confirmation.

279    if(1.0 - (a_x*b_x + a_y*b_y)/(pow(b_x, 2) + pow(b_y, 2)) > OF_MARGIN) neighbor_diff++;
280                                 }
281                             }
282 if((double)neighbor_diff/(double)neighbor_count > DISC_MARGIN)
283  {
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

No branches or pull requests

1 participant