Catapult launch button
Results 1 to 9 of 9

Thread: Catapult launch button

  1. #1

    Catapult launch button

    I'm making a small utility with all of the catapult launch codes. All of the buttons are done except for the catapult launch button.
    I have the mouse area defined and the aircraft will launch but the button\light does not change over to the launched state.

    I've tried this element value but its not working. <Value>(A:TAKEOFF ASSIST FIRE, percent)</Value>

    Any ideas would be appreciated.

  2. #2
    It does not work because afaik TAKEOFF ASSIST FIRE is not a valid simvar. There is a simvar which you might be able to use to switch a gauge light on/off like this:

    (A:CATAPULT STROKE POSITION:index,number) 0 >
    if{ gauge light ON }
    els{ gauge light OFF }

    The only problem with this is you need to know the index no. of the catapult you are using, catapults are indexed starting from 1. The result value will be 0 before the catapult fires, and then up to 100 as the aircraft is propelled down the catapult. The aircraft may takeoff before the value reaches 100 (depending on the aircraft weight, power applied, and other factors), in which case this value will not be further updated.
    I guess it will be a lot easier to use the speed of the aircraft as a condition.

  3. #3
    Quote Originally Posted by hschuit View Post
    It does not work because afaik TAKEOFF ASSIST FIRE is not a valid simvar. There is a simvar which you might be able to use to switch a gauge light on/off like this:

    (A:CATAPULT STROKE POSITION:index,number) 0 >
    if{ gauge light ON }
    els{ gauge light OFF }

    The only problem with this is you need to know the index no. of the catapult you are using, catapults are indexed starting from 1. The result value will be 0 before the catapult fires, and then up to 100 as the aircraft is propelled down the catapult. The aircraft may takeoff before the value reaches 100 (depending on the aircraft weight, power applied, and other factors), in which case this value will not be further updated.
    I guess it will be a lot easier to use the speed of the aircraft as a condition.
    Thank you..! I will try the aircraft speed as a variable..

  4. #4
    Maybe this simvar will do the job: (A:Surface Relative Ground Speed, knots) 5 >

    It retrieves the speed of the aircraft relative to the speed of the first surface directly underneath it, for example, an aircraft's taxiing speed while it is moving on a moving carrier.

  5. #5
    Quote Originally Posted by hschuit View Post
    Maybe this simvar will do the job: (A:Surface Relative Ground Speed, knots) 5 >

    It retrieves the speed of the aircraft relative to the speed of the first surface directly underneath it, for example, an aircraft's taxiing speed while it is moving on a moving carrier.
    This works well until I add a numerical value and then the function freezes.
    <element>
    <value>(A:SURFACE RELATIVE GROUND SPEED, knots) 40 </value></Value>
    </element>
    Any thoughts..?

  6. #6
    Not sure what you mean with "I add a numerical value"... Anyway, FYI attached an example of a simple light gauge which turns green when relative groundspeed exceeds 40 knots. Hope this clarifies how to use the simvar properly to test a speed value.
    Attached Files Attached Files

  7. #7
    Quote Originally Posted by Seahawk72s View Post
    This works well until I add a numerical value and then the function freezes.
    <element>
    <value>(A:SURFACE RELATIVE GROUND SPEED, knots) 40 </value></Value>
    </element>
    Any thoughts..?
    You need to add an operator to the value e.g. 40 > , otherwise there's nothing for the code interpreter to do.

  8. #8
    Quote Originally Posted by hschuit View Post
    Not sure what you mean with "I add a numerical value"... Anyway, FYI attached an example of a simple light gauge which turns green when relative groundspeed exceeds 40 knots. Hope this clarifies how to use the simvar properly to test a speed value.

    Excellent, my thanks..! Your code works just as I was hoping for...

  9. #9
    As a sidenote to using the var (A:SURFACE RELATIVE GROUND SPEED, knots), allthough not really relevant (I guess) for your problem:

    This variable, like (A:GROUND VELOCITY,knots), indicates the groundspeed in ANY direction; so it's always a 0 or positive number.
    I.e. if the aircraft rolls backward on a moving surface, the result is a positive number too.

    As said, probably not relevant for a Catapult launch, but certainly for Arrested landings or other applications on moving surfaces.
    Unfortunately there is no such variable like "A:SURFACE RELATIVE VELOCITY BODY Z", giving the actual longitudinal groundspeed relative to a moving surface; as the existing var. "A:VELOCITY BODY Z" (which CAN be negative) does on a non-moving surface.

    Rob

Members who have read this thread: 2

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •