Animation of the magneto switch in FSX using FSDS 3.5
Results 1 to 15 of 15

Thread: Animation of the magneto switch in FSX using FSDS 3.5

  1. #1
    SOH-CM-2024 Cees Donker's Avatar
    Join Date
    Jun 2005
    Location
    Zoetermeer, Netherlands
    Age
    68
    Posts
    4,631

    Animation of the magneto switch in FSX using FSDS 3.5

    Is anyone in this forum familiar with animations in FSDS 3.5? I'm trying to animate a magneto switch. It looks promising in FSDS, but is without movement in the sim. That means I must be doing something wrong!



    Cees

  2. #2
    SOH-CM-2024 Cees Donker's Avatar
    Join Date
    Jun 2005
    Location
    Zoetermeer, Netherlands
    Age
    68
    Posts
    4,631
    Well, I got it animated (in part) but it is quirky! I tried to animate it in four stages: off- mag1- mag2- both, with three intervals. I used the 'switch_ignition_magnetos_trimotor' tag and animated at frs. 0, 25, 50 and 75. I used these rotations: -45, -15, 15 and 45. But! There is only movement between the frames 25 and 50 and it moves from the off-position to the both-position. So I have -off- off- both- both- instead of -off- mag1- mag2- both-. I've got the feeling that I'm missing something obvious, but I can't figure out what.

    I sure hope someone here can help me!

    Cees

  3. #3
    Quote Originally Posted by Cees Donker View Post
    Well, I got it animated (in part) but it is quirky! I tried to animate it in four stages: off- mag1- mag2- both, with three intervals. I used the 'switch_ignition_magnetos_trimotor' tag and animated at frs. 0, 25, 50 and 75. I used these rotations: -45, -15, 15 and 45. But! There is only movement between the frames 25 and 50 and it moves from the off-position to the both-position. So I have -off- off- both- both- instead of -off- mag1- mag2- both-. I've got the feeling that I'm missing something obvious, but I can't figure out what.

    I sure hope someone here can help me!

    Cees
    I think your issue is the rotations you are using to position the switch. off should have the axis set to 0 for kf 0 after as you advance the kf your next value would be for instance 25 = 15 degrees , the for kf 50=30 degrees, kf 75 = 45 degrees. The actual values will depend on your texture map for the mag switch as you align your switch to the texture map.

    here is the code we use for all our models that use a mag switch which rotates to the individual positions,it's key framed 0, 25, 50, 75, 100 off, left, right, both, start If you don't wish to use the start function leave off the kf 100

    <Animation name="customMagSwitch" guid="a4b924b8-c430-4b09-92da-20acf7e728f4" length="100" type="Sim" typeParam2="customMagSwitch" typeParam="AutoPlay" />


    <PartInfo>
    <Name>customMagSwitch</Name>
    <AnimLength>100</AnimLength>
    <Animation>
    <Parameter>
    <Code>
    (L:ignitionState,enum) 3 + 0 max 4 min 25 *
    </Code>
    <Lag>200</Lag>
    </Parameter>
    </Animation>
    <MouseRect>
    <Cursor>Hand</Cursor>
    <TooltipText>Ignition</TooltipText>
    <MouseFlags>LeftSingle+RightSingle+RightRelease+Ri ghtDrag+WheelUp+WheelDown</MouseFlags>
    <CallbackCode>
    (M:Event) 'LeftSingle' scmp 0 ==
    (M:Event) 'WheelUp' scmp 0 ==
    or
    if{ (L:ignitionState,enum) -- -3 max (&gt;L:ignitionState,enum) }
    (M:Event) 'RightSingle' scmp 0 ==
    if{ (L:ignitionState,enum) ++ 1 min (&gt;L:ignitionState,enum) }
    (M:Event) 'WheelDown' scmp 0 ==
    if{ (L:ignitionState,enum) ++ 0 min (&gt;L:ignitionState,enum) }
    (M:Event) 'RightRelease' scmp 0 ==
    (L:ignitionState,enum) 1 ==
    and
    if{ 0 (&gt;L:ignitionState,enum) }
    (L:ignitionState,enum) -3 == if{ (&gt;K:MAGNETO_OFF) }
    (L:ignitionState,enum) -2 == if{ (&gt;K:MAGNETO_LEFT) }
    (L:ignitionState,enum) -1 == if{ (&gt;K:MAGNETO_RIGHT) }
    (L:ignitionState,enum) 0 == if{ (&gt;K:MAGNETO_BOTH) }
    (L:ignitionState,enum) 1 == if{ (&gt;K:MAGNETO_START) }
    </CallbackCode>
    </MouseRect>
    </PartInfo>

    Add these entries to your modeldef.xml file. Make a back up before you do. If you would rather I can send you our entire file. We've developed quite a bit of custom code. PM me your email address.

  4. #4
    SOH-CM-2024 Cees Donker's Avatar
    Join Date
    Jun 2005
    Location
    Zoetermeer, Netherlands
    Age
    68
    Posts
    4,631
    Thank you! That is very generous!

    Cees

  5. #5
    SOH-CM-2024 Cees Donker's Avatar
    Join Date
    Jun 2005
    Location
    Zoetermeer, Netherlands
    Age
    68
    Posts
    4,631

    second magneto switch in the same plane?

    Is it possible to put a second magneto switch in the same plane? I'm building a Fokker S.IV trainer with two panels, and I want to put a second magneto switch in the second cockpit. I've animated it, but it doesn't do anything.



    Cees

  6. #6
    SOH Staff Tako_Kichi's Avatar
    Join Date
    Sep 2007
    Location
    SW Ontario, Canada (Ex-pat Brit)
    Age
    66
    Posts
    5,120
    Quote Originally Posted by Cees Donker View Post
    Is it possible to put a second magneto switch in the same plane? I'm building a Fokker S.IV trainer with two panels, and I want to put a second magneto switch in the second cockpit. I've animated it, but it doesn't do anything.



    Cees
    I would just use the same code for the second magneto if you now have the first magneto working. You are only going to see/operate one magneto at a time in a tandem cockpit trainer and the sim only needs code for one. The fact that the rear magneto parts will move when you operate the front switch is moot as you won't see it and vice versa if you operate the rear one.
    Larry


  7. #7
    SOH-CM-2024 Cees Donker's Avatar
    Join Date
    Jun 2005
    Location
    Zoetermeer, Netherlands
    Age
    68
    Posts
    4,631
    Using the same code for the second magneto didn't work.


    Cees

  8. #8
    Quote Originally Posted by Cees Donker View Post
    Is it possible to put a second magneto switch in the same plane? I'm building a Fokker S.IV trainer with two panels, and I want to put a second magneto switch in the second cockpit. I've animated it, but it doesn't do anything.



    Cees
    Here's what we use. When placing duplicate animated controls, switches, levers in a second cockpit the trick is use a different name so that it can be activated uniquely from the part in the first cockpit otherwise it will animate when the first cockpit part is triggered

    <Animation name="front_customMagSwitch" guid="538d46cf-9375-456b-a5ce-bfb7eb8b024e" length="100" type="Sim" typeParam2="front_customMagSwitch" typeParam="AutoPlay" />

    <PartInfo>
    <Name>front_customMagSwitch</Name>
    <AnimLength>100</AnimLength>
    <Animation>
    <Parameter>
    <Code>
    (L:ignitionState,enum) 3 + 0 max 4 min 25 *
    </Code>
    <Lag>200</Lag>
    </Parameter>
    </Animation>
    <MouseRect>
    <Cursor>Hand</Cursor>
    <TooltipText>Ignition</TooltipText>
    <MouseFlags>LeftSingle+RightSingle+RightRelease+Ri ghtDrag+WheelUp+WheelDown</MouseFlags>
    <CallbackCode>
    (M:Event) 'LeftSingle' scmp 0 ==
    (M:Event) 'WheelUp' scmp 0 ==
    or
    if{ (L:ignitionState,enum) -- -3 max (&gt;L:ignitionState,enum) }


    (M:Event) 'RightSingle' scmp 0 ==
    if{ (L:ignitionState,enum) ++ 1 min (&gt;L:ignitionState,enum) }


    (M:Event) 'WheelDown' scmp 0 ==
    if{ (L:ignitionState,enum) ++ 0 min (&gt;L:ignitionState,enum) }


    (M:Event) 'RightRelease' scmp 0 ==
    (L:ignitionState,enum) 1 ==
    and
    if{ 0 (&gt;L:ignitionState,enum) }


    (L:ignitionState,enum) -3 == if{ (&gt;K:MAGNETO_OFF) }
    (L:ignitionState,enum) -2 == if{ (&gt;K:MAGNETO_LEFT) }
    (L:ignitionState,enum) -1 == if{ (&gt;K:MAGNETO_RIGHT) }
    (L:ignitionState,enum) 0 == if{ (&gt;K:MAGNETO_BOTH) }
    (L:ignitionState,enum) 1 == if{ (&gt;K:MAGNETO_START) }
    </CallbackCode>
    </MouseRect>
    </PartInfo>

  9. #9
    SOH-CM-2024 Cees Donker's Avatar
    Join Date
    Jun 2005
    Location
    Zoetermeer, Netherlands
    Age
    68
    Posts
    4,631
    Thanks Paul! I have that code already in my modeldef! Just tested it. It works!



    Cees

  10. #10
    Glad someone was able to help with the switch!

    I was trying to help with what little I know from FS9 stuff, but wasn't sure how the keyframe numbers worked for FSX.

    The xml looks WAY different for parts when compared to gauge xml, though. At least what I've messed with in the past for FS9, that is.

    Are all the values used for gauges also available for use in parts when it comes to FSX?

    Is this something to do with FSDS or is there something else to look at? I've played around with GMAX for the M-2 and don't remember anything like this. I'm guessing it's only for FSX, correct?

    Regards,

    Jorge
    Miami, FL

  11. #11
    SOH-CM-2024 Cees Donker's Avatar
    Join Date
    Jun 2005
    Location
    Zoetermeer, Netherlands
    Age
    68
    Posts
    4,631
    Quote Originally Posted by Jorge View Post
    Glad someone was able to help with the switch!

    I was trying to help with what little I know from FS9 stuff, but wasn't sure how the keyframe numbers worked for FSX.

    The xml looks WAY different for parts when compared to gauge xml, though. At least what I've messed with in the past for FS9, that is.

    Are all the values used for gauges also available for use in parts when it comes to FSX?

    Is this something to do with FSDS or is there something else to look at? I've played around with GMAX for the M-2 and don't remember anything like this. I'm guessing it's only for FSX, correct?

    Regards,

    Jorge
    Miami, FL
    This is a custom code Paul has shared and it's for FSX.
    But the problem we discussed was for the D.16 and that uses the same code for the magneto switch as this one, but the plane won't start with the switch. In the S.IV discussed here it works fine.

    Cees

  12. #12
    Quote Originally Posted by Cees Donker View Post
    Thanks Paul! I have that code already in my modeldef! Just tested it. It works!



    Cees
    You’re most welcome. Great to hear.

  13. #13
    SOH Staff Tako_Kichi's Avatar
    Join Date
    Sep 2007
    Location
    SW Ontario, Canada (Ex-pat Brit)
    Age
    66
    Posts
    5,120
    Quote Originally Posted by Jorge View Post
    Glad someone was able to help with the switch!

    I was trying to help with what little I know from FS9 stuff, but wasn't sure how the keyframe numbers worked for FSX.

    The xml looks WAY different for parts when compared to gauge xml, though. At least what I've messed with in the past for FS9, that is.

    Are all the values used for gauges also available for use in parts when it comes to FSX?

    Is this something to do with FSDS or is there something else to look at? I've played around with GMAX for the M-2 and don't remember anything like this. I'm guessing it's only for FSX, correct?

    Regards,

    Jorge
    Miami, FL
    The XML syntax changed significantly between FSX and FS2004 and earlier. Some FS2004 code will work in FSX if it is written in the correct format but any early syntax XML (i.e. FS2000, FS2002, etc.) code will not. None of the FS2004 'canned' animation codes will work in FSX either, all animations have to be created individually and coded appropriately.
    Larry


  14. #14
    Thanks for the explination. I'm still fighting FSX to try and get it to work smoothly on my system, so not much flying with it yet.

    Still, it's nice to have an idea of what can be parsed up to the thing in case I try my hand again at designing down the road again.

    Now back to getting contact points and such straightened out.

    Regards,

    Jorge
    Miami, FL

  15. #15
    SOH Staff Tako_Kichi's Avatar
    Join Date
    Sep 2007
    Location
    SW Ontario, Canada (Ex-pat Brit)
    Age
    66
    Posts
    5,120
    Quote Originally Posted by Jorge View Post
    Now back to getting contact points and such straightened out.
    If it's info regarding the modeling of gear parts then check out post #53 in this thread by the great Milton Shupe: https://www.sim-outhouse.com/sohforu...-Modeler/page3

    If it's the contact point data in the aircraft.cfg file then check out post #55 in the same thread.

    That entire thread and all related video links are full of useful info.
    Larry


Members who have read this thread: 0

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
  •