1
0
Fork 0

Merge branch 'master' of git://gitorious.org/fg/fgdata

This commit is contained in:
Erik Hofman 2010-08-08 11:06:32 +02:00
commit 4feb05c2e6
6 changed files with 638 additions and 6 deletions

View file

@ -0,0 +1,194 @@
AC3Db
MATERIAL "ac3dmat1" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 1 1 1 shi 100 trans 0.482
OBJECT world
kids 10
OBJECT poly
name "rect1"
loc -0.242457 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect2"
loc -0.188577 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect3"
loc -0.134698 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect4"
loc -0.0808192 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect5"
loc -0.0269392 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect6"
loc 0.0269398 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect7"
loc 0.0808188 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect8"
loc 0.134698 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect9"
loc 0.188578 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect10"
loc 0.242457 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.9 KiB

View file

@ -0,0 +1,384 @@
AC3Db
MATERIAL "ac3dmat1" rgb 1 1 1 amb 1 1 1 emis 0 0 0 spec 1 1 1 shi 100 trans 0.482
OBJECT world
kids 20
OBJECT poly
name "rect1"
loc -0.51799 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect2"
loc -0.46411 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect3"
loc -0.410231 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect4"
loc -0.356352 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect5"
loc -0.302472 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect6"
loc -0.248593 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect7"
loc -0.194714 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect8"
loc -0.140835 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect9"
loc -0.086955 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect10"
loc -0.0330757 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect11"
loc 0.0208036 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect12"
loc 0.0746829 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect13"
loc 0.125599 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect14"
loc 0.176515 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect15"
loc 0.227431 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect16"
loc 0.278347 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect17"
loc 0.329263 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect18"
loc 0.380179 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect19"
loc 0.431095 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 25.062 -25
0 25.062 25
0 -24.938 25
0 -24.938 -25
numsurf 1
SURF 0x0
mat 0
refs 4
0 -0.046875 1.04687
1 1.04687 1.04687
2 1.04687 -0.0468746
3 -0.046875 -0.0468746
kids 0
OBJECT poly
name "rect20"
loc 0.48201 -0.06195 -1.19202e-006
texture "contrail.png"
crease 45.000000
numvert 4
0 -24.938 -25
0 -24.938 25
0 25.062 25
0 25.062 -25
numsurf 1
SURF 0x0
mat 0
refs 4
3 -0.046875 1.04687
2 1.04687 1.04687
1 1.04687 -0.0468746
0 -0.046875 -0.0468746
kids 0

View file

@ -24,6 +24,10 @@
best left at "False". Since the effects of wind on various ballistic objects is
uncertain, there is no plan to change this situation.
4. Submodels can be ensted to any depth, thus a submodel on expiry or impact etc,
can launch a child submodel, which in turn can launch a submodel. and so on. This
is the basis for Persistent Contrails, but any use is possible.
The initial conditions (IC) define the object's starting point (relative
to the user aircraft's "reported position"), and its initial speed and
direction (relative to the user aircraft). If you want to release many
@ -39,14 +43,15 @@
<delay> Time, in seconds, between repeated releases.
<count> Number of submodels available for multiple release.
-1 defines an unlimited number.
<slaved> Not used yet.
<slaved> If true, the submodel is slaved to the parent model.
<x-offset> Submodel's initial fore/aft position (in feet), relative to user aircraft. Fore is positive.
<y-offset> Submodel's initial left/right position (in feet), relative to user aircraft. Right is positive.
<z-offset> Submodel's initial up/down position (in feet), relative to user aircraft. Up is positive.
<yaw-offset> Submodel's initial azimuth, in degrees, relative to user
aircraft'snose. Right is positive.
<pitch-offset> Submodel's initial elevation, in degrees, relative to user aircraft's pitch. Up is positive.
<life> Life span in seconds. Default is 900.0.
<life> Life span in seconds.
Default is 900.0.
<buoyancy> In ft/sec/sec. Works opposite acceleration of gravity.
For example, if set to 32 the submodel will feel no
gravity. If greater than 32 the object will rise.
@ -58,10 +63,20 @@
<weight> The weight of the submodel (lbs). NOT set to 0 on submodel release. You may wish to set this value to 0 by means of key bindings or Nasal script.
Defaults to 0.25.
<contents> The path to the contents of a submodel. The contents must be in lbs. Intended for use with drop tanks. The property value will be set to 0 on release of the submodel: do not also set to 0 elsewhere e.g. in key bindings. Defaults to 0.
<random> Varies CD by +- 5%.
<random> Varies CD by +- 10%, initial azimuth by +- 10 degs, and life by <randomness>
<randomness> If <random> is true, <randomness> is applied to <life>. 0 > Value < 1 are valid.
Defaults to 0.5.
<no-roll> If true the submodel does not roll.
<impact> If true, the impact location (lat/lon) on the terrain is calculated. The Material (e.g Grass)of the terrain, load resistance, impact velocity and energy are returned. Altitude agl is calculated.
<impact-reports> Defines a report node. When an impact happens, then the path of the submodel will be written to this node. An attached listener function can evaluate the impact properties. If unset, reports go to /ai/models/model-impact.
<impact> If true, the impact location (lat/lon) on the terrain is calculated. The Material
(e.g Grass)of the terrain, load resistance, and impact velocity. Altitude agl is calculated.
<collision> If true, collisions with other objects is tested. If a collision is detected then
the position data are written to the "Report Node".
<fuze-range> Used in detecting collisions. The distance in feet between an object and a submodel
at which a collision is deemed to have occurred.
<expiry> If true, the current position of the submodel is written to the "Report Node" when the submodel life expires.
<impact-reports> Defines a "Report Node". When an impact happens, then the path of the submodel will be written to this node.
An attached listener function can evaluate the impact properties. If unset,
reports go to /ai/models/model-impact.
***** experimental ****
<external-force> If true the submodel is subjected to an external force<force-path> A string describing the property where the magnitude, azimuth and elevation of the external force is to be found. The following child properties are instantiated:

39
Nasal/contrail.nas Normal file
View file

@ -0,0 +1,39 @@
#########
# contrail calculator. Based on an approxmation to the "Appleman Chart"
# y = -0.077x2 + 2.7188x - 64.36
#
########
updateContrail = func{
var pressure_Node = props.globals.getNode("environment/pressure-inhg");
var temperature_Node = props.globals.getNode("environment/temperature-degc");
var contrail_Node = props.globals.getNode("environment/contrail");
var contrail_temp_Node = props.globals.getNode("environment/contrail-temperature-degc");
var x = pressure_Node.getValue();
var y = temperature_Node.getValue();
var con_temp = -0.077 * x * x + 2.7188 * x - 64.36;
contrail_temp_Node.setValue(con_temp);
if (y < con_temp and y < -40){
contrail_Node.setValue(1);
} else {
contrail_Node.setValue(0);
}
settimer(updateContrail,30)
}
### Contrail
print ("init contrail");
_setlistener("/sim/signals/nasal-dir-initialized", func {
props.globals.initNode("environment/pressure-inhg", 1, "DOUBLE");
props.globals.initNode("environment/temperature-degc", 1, "DOUBLE");
props.globals.initNode("environment/contrail", 1, "BOOL");
props.globals.initNode("environment/contrail-temperature-degc", 1, "DOUBLE");
var static_contrail_node = props.globals.getNode("sim/ai/aircraft/contrail", 1);
var time_node = props.globals.getNode("sim/time/elapsed-sec", 1);
updateContrail();
});

View file

@ -90,7 +90,7 @@ void main(void)
gl_FrontColor += gl_FrontLightModelProduct.sceneColor;
// As we get within 100m of the sprite, it is faded out. Equally at large distances it also fades out.
gl_FrontColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1 - smoothstep(30000.0, 40000.0, fogCoord));
gl_FrontColor.a = min(smoothstep(10.0, 100.0, fogCoord), 1 - smoothstep(60000.0, 80000.0, fogCoord));
gl_BackColor = gl_FrontColor;
// Fog doesn't affect clouds as much as other objects.