USS SanAntonio
Naval Postgraduate School SAVAGE project, Vivian Meazza, Heiko Schulz
early-production
LPD17.ac
var wind_node = props.globals.getNode("/environment/wind-speed-kt");
var time_node = props.globals.getNode("/sim/time/elapsed-sec");
var roll_node = props.globals.getNode("/ai/models/LPD17-boats/roll");
var pitch_node = props.globals.getNode("/ai/models/LPD17-boats/pitch");
var loopid = 1;
var loop = func(id) {
if (id != loopid) return;
var rollcyclesec = 40.55;
var pitchcyclesec = 40.08;
var rolltimer = time_node.getValue()/rollcyclesec - int(time_node.getValue()/rollcyclesec);
var rollwave = math.sin(2*math.pi*rolltimer);
roll_node.setValue(rollwave*(wind_node.getValue()+1));
var pitchtimer = (time_node.getValue()+1)/pitchcyclesec - int((time_node.getValue()+1)/pitchcyclesec);
var pitchwave = math.sin(2*math.pi*pitchtimer);
pitch_node.setValue(pitchwave*(wind_node.getValue()+1));
settimer(func { loop(id); }, 0);
}
settimer(func { loop(loopid); }, 0);
loopid += 1;
rotate
ShapeIndexedFaceS.005
ShapeIndexedFaceS.004
ShapeIndexedFaceS.002
ShapeIndexedFaceS
ShapeIndexedFaceSet
ShapeIndexedFaceS.001
ShapeIndexedFaceS.006
ShapeIndexedFaceS.007
/ai/models/LPD17-boats/roll
0.02
0
1
0
rotate
ShapeIndexedFaceS.005
ShapeIndexedFaceS.004
ShapeIndexedFaceS.002
ShapeIndexedFaceS
ShapeIndexedFaceSet
ShapeIndexedFaceS.001
ShapeIndexedFaceS.006
ShapeIndexedFaceS.007
/ai/models/LPD17-boats/pitch
0.0025
1
0
0
textranslate
rect
/sim/time/elapsed-sec
-0.010
1
0
0
rotate
ShapeIndexedFaceS.007
surface-positions/elevators-pos-norm
-90.0
94.936
0.00
3.968
0
1
0
rotate
ShapeIndexedFaceS.006
surface-positions/elevators-pos-norm
90.0
93.243
0.00
-6.464
0
1
0
Aircraft/Frigate/Models/smoke.xml
1.2
0.00
-0.68
0