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

New Data Type (Riegl) #36

Open
AlexanderPoone opened this issue Jul 17, 2020 · 2 comments
Open

New Data Type (Riegl) #36

AlexanderPoone opened this issue Jul 17, 2020 · 2 comments

Comments

@AlexanderPoone
Copy link

Are you sure it's

    camPitch = math.degrees(math.acos(dv3))

and not

    camPitch = 180 - math.degrees(math.acos(dv3))

CamPitch = 90 means the camera is viewing toward the horizon. 0 indicates straight down.

@AlexanderPoone
Copy link
Author

AlexanderPoone commented Jul 17, 2020

I can see you set the roll to 0. But the roll is given in the csv, row[11]. It is correct as-is.

For the heading,

def calulateEquirectangularHPR(dv1,dv2,dv3):
    dv1 = 0.596300721
    dv2 = -0.802622733
    dv3 = 0.014901141

    rootOfSqrs = math.sqrt(math.pow(dv1,2) + math.pow(dv2,2) + math.pow(dv3,2))
    nv1 = -1 * (dv1/rootOfSqrs)
    nv2 = -1 * (dv2/rootOfSqrs)
    nv3 = -1 * (dv3/rootOfSqrs)

    camHead = math.degrees(math.atan2(-nv1,-nv2))
    
    ...

is correct. But if you want to be more accurate,
use:

(90-row[13]) if (row[13]<90) else (450-row[13])

For the pitch, for accuracy use:

90-row[12]

@AlexanderPoone
Copy link
Author

Here are some sample data:

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