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

scanRegistration issue #44

Open
huhu965 opened this issue Aug 2, 2021 · 3 comments
Open

scanRegistration issue #44

huhu965 opened this issue Aug 2, 2021 · 3 comments

Comments

@huhu965
Copy link

huhu965 commented Aug 2, 2021

    if (!halfPassed)
    {   //确保-pi/2 < ori - startOri < 3*pi/2
        if (ori < startOri - M_PI / 2)
        {
            ori += 2 * M_PI;
        }
        else if (ori > startOri + M_PI * 3 / 2)
        {
            ori -= 2 * M_PI;
        }

        if (ori - startOri > M_PI)
        {
            halfPassed = true;
        }
    }
    else
    {   //确保-3*pi/2 < ori - endOri < pi/2
        ori += 2 * M_PI;
        if (ori < endOri - M_PI * 3 / 2)
        {
            ori += 2 * M_PI;
        }
        else if (ori > endOri + M_PI / 2)
        {
            ori -= 2 * M_PI;
        }
    }

    float relTime = (ori - startOri) / (endOri - startOri); 

您好,我想问一下关于这块的公式是正确的吗?M_PI < endOri - startOri < 3 * M_PI,-pi/2 < ori - startOri < 3*pi/2
我发现计算出的结果是错误的,我不知道是不是我的理解有问题,能帮吗解答一下吗?在我理解中,应该将ori按照endori的方式,加2π,然后再分类讨论,才能得出正确的时间结果。

@Irrman
Copy link

Irrman commented Sep 13, 2021

我也有相同的 疑问

@Aviana-Zheng
Copy link

我也有相同的疑问

@Liao-gl
Copy link

Liao-gl commented Jun 22, 2023

我也有疑问,请问理解了吗

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

4 participants