Independent of using Earthview or not, I've found that the following series of
code modifications makes Flightgear support flights into low orbits (without
Earthview, you can enjoy a fogged sphere, but without the changes, JSBSim
models never reach high enough and rendering artefacts (grey zone, red zone,
dark zone) appear.
1) The fix for almost everything is Ron's patch:
diff --git a/src/Environment/atmosphere.cxx b/src/Environment/atmosphere.cxx
index 022ea54..f16005f 100644
--- a/src/Environment/atmosphere.cxx
+++ b/src/Environment/atmosphere.cxx
@@ -18,7 +18,8 @@ ISA_layer(3, 32000, 104986, 868.019, 0.256326, 228.65,
-44.50, -0.0028, -
ISA_layer(4, 47000, 154199, 110.906, 0.0327506, 270.65, -2.50, 0,
0),
ISA_layer(5, 51000, 167322, 66.9389, 0.0197670, 270.65, -2.50, 0.0028,
0.0008534),
ISA_layer(6, 71000, 232939, 3.95642, 0.00116833, 214.65, -58.50, 0.0020,
0.0006096),
-ISA_layer(7, 80000, 262467, 0.88628, 0.000261718, 196.65, -76.50),
+ISA_layer(7, 80000, 262467, 0.88628, 0.000261718, 196.65, -76.50, 0.0,
0.0),
+ISA_layer(8, 1.0e9, 3.28e9, 0.00001, 3.0e-9, 2.73, -270.4, 0.0,
0.0),
};
const int ISA_def_size(sizeof(ISA_def) / sizeof(ISA_layer));
This removes the red and dark zone rendering artefacts, it enables JSBSim
operation in orbit beyond 150 km altitude (over the last days, I've tried
taking the Vostok to a 450 km orbit and back down and then went into some basic
orbital maneuvering raising the orbit to a circular 800 km - all this works as
expected, at some point the TDU just doesn't have the juice to do anything
fancy, there's no return from 800 km...). It also removes the hole in the
atmosphere at re-entry - previously g-force ramped up around around 70 km, then
fell to zero, then ramped up to full around 40 km altitude - now it's a smooth
deceleration.
I if no one sees any bad side effects, I would highly recommend to commit this
to GIT.
2) The grey zone is caused by the spacecraft going beyond the skydome, in which
case a fog-grey background color is painted. This can be solved by changing the
background color to black, and Lauri told me how to do that:
> flightgear/src/Main/renderer.cxx around line 700. There are two
> instances of following:
> camera->setClearColor(toOsg(clearColor));
> which should be changed to
> camera->setClearColor(osg::Vec4(0.0, 0.0, 0.0, 0.0));
To my knowledge this was already committed at some point but got reversed since
it caused black fog for low visibility when the skydome unloaded.
However, thanks to Torsten's recent work, we can now fix that by not unloading
the skydome at low visibility, i.e. we simply default
/sim/rendering/minimum-sky-visibility
to a really low value (possibly zero) and the skydome never unloads, which
prevents the black fog from being an issue and fixes the grey zone at high
altitude.
If there are no other bad side effects I have missed, I would recommend to
commit this to GIT.
3) Vostok is no longer maintained by vitos, so to fly it to high altitude
someone needs to remove the Nasal-coded mission restriction.
This means removing the block
if (altitude>maximum_altitude_ft)
{
setprop("fdm/jsbsim/systems/crashes/crashed", 1);
setprop("fdm/jsbsim/systems/crashes/crash-type", "Alititude exceeds
"~(maximum_altitude_ft*0.3048/1000)~"km");
crash("Alititude exceeds "~(maximum_altitude_ft*0.3048/1000)~"km",
"Vysota prevysila "~(maximum_altitude_ft*0.3048/1000)~"km");
}
in Aircraft/Vostok-1/Nasal/Crashes.nas.
Provided the first patch which fixes the reason for why this condition is
probed in Nasal is committed, I would ask that the altitude restriction in
Vostok is also removed.
Thanks,
* Thorsten
------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Flightgear-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-devel