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

Output values of sample apps apply bad scaling #129

Open
ss32 opened this issue Mar 29, 2024 · 0 comments
Open

Output values of sample apps apply bad scaling #129

ss32 opened this issue Mar 29, 2024 · 0 comments

Comments

@ss32
Copy link

ss32 commented Mar 29, 2024

Plotting the raw values coming out of simple_grabber produces an inaccurate result. Put another way: Theta as reported by the app is not degrees.

image

If instead the raw angle value is divided by 2^16 and multiplied by 2*Pi sensible values are produced

            for (int pos = 0; pos < (int)count ; ++pos) {
				printf("%03.2f,%08.2f \n", 
                    (nodes[pos].flag & SL_LIDAR_RESP_HQ_FLAG_SYNCBIT) ?"S ":"  ", 
                    (nodes[pos].angle_z_q14  / 65536.f * 2 * 3.14159265359),
                    nodes[pos].dist_mm_q2/4.0f);
            }
        }

image

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