{"action":"closed","issue":{"url":"https://api.github.com/repos/OSVR/OSVR-Core/issues/294","labels_url":"https://api.github.com/repos/OSVR/OSVR-Core/issues/294/labels{/name}","comments_url":"https://api.github.com/repos/OSVR/OSVR-Core/issues/294/comments","events_url":"https://api.github.com/repos/OSVR/OSVR-Core/issues/294/events","html_url":"https://github.com/OSVR/OSVR-Core/issues/294","id":118854874,"number":294,"title":"Fix vertical fields of view in defaults and config files","user":{"login":"russell-taylor","id":762320,"avatar_url":"https://avatars.githubusercontent.com/u/762320?v=3","gravatar_id":"","url":"https://api.github.com/users/russell-taylor","html_url":"https://github.com/russell-taylor","followers_url":"https://api.github.com/users/russell-taylor/followers","following_url":"https://api.github.com/users/russell-taylor/following{/other_user}","gists_url":"https://api.github.com/users/russell-taylor/gists{/gist_id}","starred_url":"https://api.github.com/users/russell-taylor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/russell-taylor/subscriptions","organizations_url":"https://api.github.com/users/russell-taylor/orgs","repos_url":"https://api.github.com/users/russell-taylor/repos","events_url":"https://api.github.com/users/russell-taylor/events{/privacy}","received_events_url":"https://api.github.com/users/russell-taylor/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/OSVR/OSVR-Core/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-25T15:02:25Z","updated_at":"2015-12-07T17:00:23Z","closed_at":"2015-12-07T17:00:23Z","body":"For at least the OSVR HDK and the dSight displays, we're computing the vertical field of view incorrectly.  This needs to be changed in the default and in the config files.  May also be incorrect for other displays.\r\n\r\nNote that the viewport width is proportional to the tangent of the half-width of the horizontal field of view, and that the height to the vertical field of view. This means that for non-square aspect ratios, the ratio of the window width/height is not directly proportional to the ratio of the HFOV/VFOV. This means that you cannot multiply the horizontal field of view by the ratio of the display size in pixels to compute the vertical field of view.\r\n\r\nFor example, the horizontal field of view on the OSVR HDK is 90 degrees and it covers half of the screen (1920/2). It is incorrect to compute the vertical field of view using 90 / (1920/2) * 1080 = 101.25 degrees. The correct calculation is atanDegrees( (tanDegrees(95/2) / (1920/2) * 1080) * 2 ) = 96.73 degrees.\r\n\r\nFor example, the Sensics dSight has a horizontal field of view of 95 degrees and a screen ratio of 1920x1080. It is incorrect to compute the vertical field of view using 95 / 1920 * 1080 = 53.43 degrees. The correct calculation is atanDegrees( (tanDegrees(95/2) / 1920 * 1080) * 2 ) = 63.1 degrees.\r\n\r\nThe Oculus config file also seems to be off, in two things. At least with one set of lenses, its overlap_percent is 100 (in terms of the angle of the displays being completely aligned with the Z axis).  Also, its vertical field of view should be 100 if it is to match that expected for its specified horizontal field of view of 93.2798."}}