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

Artificial Horizon #158

Open
Matyooo opened this issue Dec 18, 2015 · 5 comments
Open

Artificial Horizon #158

Matyooo opened this issue Dec 18, 2015 · 5 comments

Comments

@Matyooo
Copy link

Matyooo commented Dec 18, 2015

Is there an easy way to calculate the exact position of the horizon line, knowing the Planet and the Camera?

@machanguillo
Copy link
Contributor

Hi @Matyooo: do you mean the position on the screen (in pixels)? And I suppose you are not assuming elevations on the terrain, just the geometry of the planet.

@Matyooo
Copy link
Author

Matyooo commented Dec 21, 2015

Yes, that is exactly what we would like to calculate, although we realized in the meantime that real life artificial horizons never show the actual position of the horizon, but it would be nice to know anyhow....

@machanguillo
Copy link
Contributor

OK. We could think and write a method that returns the projection of the horizon in pixels. In the case of flat planet, or when camera is not too high, this projection looks like a straight line on the screen. In the rest of cases, the problem is a little bit more complex

@akosmaroy
Copy link
Contributor

this would be great

we're aware that this is a bit complex in the case when the altitude is not close to MSL. in that case, we're interested in where 'level' would look like in the distance. that is, we're not interested in where the horizon line would be, but we're interested in where the middle line of the screen would be if the camera is 'level' (parallel to the surface)

@machanguillo
Copy link
Contributor

Hi @akosmaroy. I don't understand your question: "where the middle line of the screen would be...". I have drawn some figures (see attached pdf). The first slide is the first question from @Matyooo. We can add a method to compute that: where in the screen is the horizon line. The second slide is about your question, for the case of a flat planet: if camera pitch is zero, horizon line is always in the middle of the screen. The third slide is your same question, for the case of a spherical planet. What do you expect as result? where do you think the middle line of the screen is located?
Horizon line.pdf

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

3 participants