For information , the following is the code that I am currently using .
1. Update section .
Code:
<!-- Can use either (>K:RELEASE_DROPPABLE_OBJECTS) or (>K:ROTOR_BRAKE)
as the trigger in the Update
Rotor brake is only applicable if Ripple bomb switch is installed
Drop number must be set and Time interval set if more than 1 bomb is
being set at that switch instrument
Ripple Bomb Switch only works in FSX -->
<Update Hidden="Yes">
<Frequency>18</Frequency>
(@c:FlightPlanIsActiveWaypointLocked,Bool) 1 ==
if{
3251 (>L:DistToRun,feet)
(A:GPS WP NEXT LAT, degrees) (>@c:GeoCalcLatitude1,degrees)
(A:GPS WP NEXT LON, degrees) (>@c:GeoCalcLongitude1,degrees)
(A:PLANE LATITUDE,degrees) (>@c:GeoCalcLatitude2,degrees)
(A:PLANE LONGITUDE,degrees) (>@c:GeoCalcLongitude2,degrees)
(@c:GeoCalcBearing,degrees) (>L:BearingTargetPos,degrees)
(@c:GeoCalcDistance,nmiles) (>L:DistanceTargetPos,nmiles)
(L:DistanceTargetPos,feet) (L:DistToRun,feet) <
if{
(>K:RELEASE_DROPPABLE_OBJECTS)
0 (>@c:FlightPlanIsActiveWaypointLocked,Bool)
}
}
</Update>
2. Functional code .
Code:
<!-- START Locked Waypoint -->
<Element>
<Position X="3" Y="134"/>
<Text X="20" Y="10" Bright="Yes" Length="3" Font="Gloucester MT Extra Condensed" FontSize="9" Color="#93FF72" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
<String>%WPT%</String>
</Text>
</Element>
<!-- Dist in feet per second and time in sec fr Release to Target -->
<Element>
<Select>
<Value>
(A:GROUND VELOCITY, knots) 6076 * (>L:DistPerKnot,feet)
(L:DistPerKnot,feet) 3600 / (>L:DistPerSecond,number)
(L:DistToRun,feet) (L:DistPerSecond,number) / (>L:TimeToRun,number)
</Value>
</Select>
</Element>
<Element>
<Visible>(@c:FlightPlanIsActiveWaypointLocked,Bool) 1 == </Visible>
<!-- time count down readout to bomb release -->
<Element>
<Position X="78" Y="155"/>
<FormattedText X="80" Y="22" Font="Tahoma" FontSize="11" LineSpacing="11" Adjust="LEFT" Color="#FF0000" Bright="Yes">
<String>%WPT LOCKED%\n% TTR: %((A:GPS WP ETE,seconds) (L:TimeToRun,number) -)%!3d%</String>
</FormattedText>
</Element>
</Element>
<Element>
<Visible>(@c:FlightPlanIsActiveWaypointLocked,Bool) 1 == (P:Local time,seconds) 1.5 % 0.5 < and </Visible>
<Element>
<Position X="22" Y="135"/>
<Text X="20" Y="11" Bright="Yes" Length="3" Font="Tahoma" FontSize="12" Color="#FF0000" Adjust="Center" VerticalAdjust="Center" Multiline="No" Fixed="No">
<String>%*%</String>
</Text>
</Element>
</Element>
<!-- END Locked Waypoint -->
3. Mouse section .
Same as in above posts .
I have made several changes , the reason being that any changes made to the "Distance to Run at release" value will result in compensation of
the TTR time countdown readout .
The TTR will now always countdown to zero at time of release regardless of Speed or Height used .
It is of course dependant on the "Distance to Run at release" value set in the Update Geocalc .
The following lists several "Distance to Run " values for various Speeds and Heights agl ,
Code:
Below are listed the 3 aspects .
1. Set "Distance to Run at release" value into the Update of the xml .
2 . Set autopilot Speed and TFR values ( TFR = Height agl ).
****************************
400 KIAS @ 500' TFR => 3251
500 KIAS @ 500' TFR => 4119
*****************************
400 KIAS @ 2,000' TFR => 4845
500 KIAS @ 2,000' TFR => 7054
****************************
400 KIAS @ 4,000' TFR => 5874
500 KIAS @ 4,000' TFR => 8136
****************************
Previously at this forum we created a Ripple Bomb switch that enabled both the Number of Bombs and the Time Interval to be set .
An Event Handler dll Rotor Brake to be assigned to controllers to effect release of a string of bombs , refer following link ,
http://www.fsdeveloper.com/forum/threads/programmable-switch-help-needed.426006/
The comment section prior to the Update above advises that Either K: Event can be used in the Update .
The Rotor Brake K:Event will work as long as the Ripple Switch exists in the panel .
You must set a Number value , and a Time interval if you wish time separation in the Ripple Switch .
Then click WPT to switch On the Waypoint Locked ,
it will then automatically releas a string of bombs when the TTR countdown reaches zero .
You can set any number of bomb from 1 to a greater number .
Sorry about the length of this post , but it may be of use to some .
Cheers
Karol
Shot of multiple bomb being deployed automatically