Saturday, November 12, 2005

[104] Parameters - Field of View #4

In the conclusion of my previous post of the same serie, I was saying that having a different FOV for each different viewpoints in the 2D cockpit, was kind of a pain. During docking with the LM for example, we may have to switch back and forth between the left rendez-vous window (FOV = 24°) and the main control panel (FOV = 59.09°). Altought the FOV value can be changed using a keyboard shortcut (+/- 10°), this neither fast or practical enough to be a valid solution.

The best way of inforcing a given FOV depending on the panel you are looking at, is to actualy hack the source code of NASSP to perform an automatic change when you switch between the various panels of the CM cockpit. This is done by modifing the method Saturn::SetView() in the file saturnvc.cpp, to insert the following code at the bottom of the method, right above the call to SetCameraOffset():
 //  DarthVader's hack
if(InPanel &&; oapiCameraInternal())
{
double FOV = 27.58;

switch(PanelId)
{
case SATPANEL_MAIN:
case SATPANEL_LOWER:
{
FOV = 59.05;
break;
}
case SATPANEL_LEFT:
case SATPANEL_RIGHT:
{
FOV = 63.85;
break;
}
case SATPANEL_LEFT_RNDZ_WINDOW:
case SATPANEL_RIGHT_RNDZ_WINDOW:
{
FOV = 24;
break;
}
case SATPANEL_HATCH_WINDOW:
{
FOV = 25.34;
break;
}
default:
break;
}

oapiCameraSetAperture(RAD * FOV / 2.0);
}
// DarthVader's hack
Et voila! Because we're checking that the user is really in the inside cockpit view, we avoid the FOV to be automatically switched back when using the outside view. The big issue with that solution is that in order to hack as I did, you not only need to have the whole source code of the project (accessible with CVS on sourceforge.net), but also Microsoft Visual C++ 6.0. Unless you are a developer you may have to try the free version and I dunno how good/easy it is. Oh yeah ... and you also need to install Orbiter's SDK in your Orbiter directory. So, as we can see, even if it's a solution, it's definitly not the way to go for most Orbinauts ...

We may want to wonder if having a precise FOV setting is really worth the trouble. It is clear that using a value calculated from our settings (screen height and distance from screen) is definitly something that must be done. Now, adjusting the FOV according to the 2D panels like I did may not be required. A possible compromise could be to adjust it for the panels that is the most useful. In the case of the CSM, it will most probably be the rendez-vous windows. Afterall, the other panels don't account for much in term of visibility. In the end, it's up to you to decide what fit you best :-)

To conclude this series on the FOV, let's have a quick look at the Lunar Module and see what FOV we should be using. In the same way we did with the Command Module, lets look at the position of the astronauts in the LM on the two following pictures:





We can estimate that they were standing further away from the front window of the LM, than the arm reach length we estimated in the CM's case. I haven't found any document that precisely states the position of the crew when at the flight station, but for the sake of simplifying thing we will assume a distance equal to the distance from your eyes to your screen, 55cm in my case.

Another piece of information hard to find is the exact dimension of the LM windows. After browsing trought various PDFs documents and looking at some schematics to scale, I came up with the following figures: forward window 63.5x71.12x60.96 (cm) and 12.7x33.02 (cm) of viewing area for the docking window. For the forward windows, I couldn't find if it was the viewing area or the whole window dimensions. So instead of using this I decided to try mesuring the on-screen distance between the middle of the left and right windows (which span on 3 panels in the 2D cockpit). On the LM schematics it looked like it was about 115.2cm and I got 73.5cm on the screen. Using the now familiar formula, we can calculate the proper FOV for the two forward facing windows:

Now, let's do the same for the rendez-vous window, which in Orbiter is 9x21.5 (cm):

These two values are so close that it is probably easier to use 42° in both. Here's two screenshots taken from inside the LM:


The CSM in front of the LM

View of the CSM docked to the LM

Don't hesitate to comment on this post if you have any question, objection or comment related to its quality or content. Thanks.

2 Comments:

Blogger FlyingSinger said...

Wow, now you HAVE gone to the Dark Side, hacking the NASSP code to make the views what you want! ([Cue mechanical breathing sound] "You have not yet begun to see the Power of the Force"). I think you have written the book on Orbiter view sizing!

BTW, how do you get to the LM docking view window? I can't find a control for this, and I can't see it on the outside of the LM.

I'm in Paris until Saturday 19th. When do you arrive? Probably that same weekend. It's rainy and cold today. I hope it's better Sunday.

-Bruce

2:39 PM  
Blogger DarthVader said...

hehe, yeah I may have gone a bit overboard with all that FOV stuff :)

I'm using the beta version of NASSP 7.0 .. it's far from finished but it's pretty nice as you can see. So the LM docking view isn't in 6.4.2.

I'm flying over next saturday. Our planes will probably cross the same sky on that day.

Hopew you'll enjoy your stay.

Cheers,

5:44 PM  

Post a Comment

<< Home