1. Do not share user accounts! Any account that is shared by another person will be blocked and closed. This means: we will close not only the account that is shared, but also the main account of the user who uses another person's account. We have the ability to detect account sharing, so please do not try to cheat the system. This action will take place on 04/18/2023. Read all forum rules.
    Dismiss Notice
  2. For downloading SimTools plugins you need a Download Package. Get it with virtual coins that you receive for forum activity or Buy Download Package - We have a zero Spam tolerance so read our forum rules first.

    Buy Now a Download Plan!
  3. Do not try to cheat our system and do not post an unnecessary amount of useless posts only to earn credits here. We have a zero spam tolerance policy and this will cause a ban of your user account. Otherwise we wish you a pleasant stay here! Read the forum rules
  4. We have a few rules which you need to read and accept before posting anything here! Following these rules will keep the forum clean and your stay pleasant. Do not follow these rules can lead to permanent exclusion from this website: Read the forum rules.
    Are you a company? Read our company rules

Request (Feature) Collision/crash filter activation

Discussion in 'SimTools DIY Version' started by Hocky, Jan 28, 2020.

  1. Hocky

    Hocky Member

    Joined:
    Aug 30, 2018
    Messages:
    51
    Balance:
    119Coins
    Ratings:
    +25 / 1 / -0
    We are many that has been struggling to filter out the spikes from collisions/crashes in car racing.
    There are some tricks you can use with filters like boundary, smoothing and so on but this solution is not optimal. The worst case in car racing is going sideways into something and TL is doing high speed movements side to side. High speed rolls can also be really bad.

    I know that now I need to tune down the wanted movements just to make shure that the crashes are not so violent. If you have a high performing simulator you want to get as much immersion out of it as possible.
    (I dont want crash immersion :))

    Can we use the telemetry data (if available) that identifies that a collision/crash is happening?
    Same telemetry data that is used to make transducer vibrate.

    The idea was if a collision occurs, add high values of filtering like smoothing and low boundary values.
    I know that you can not change the filters when online in the application.

    @yobuddy can this be done?
    • Like Like x 1
    • Agree Agree x 1
  2. KydDynoMyte

    KydDynoMyte Fool's Gold Contributor

    Joined:
    Sep 5, 2011
    Messages:
    111
    Location:
    RTP, NC
    Balance:
    92Coins
    Ratings:
    +28 / 2 / -0
    My Motion Simulator:
    3DOF
    You already trimmed off the high spike values past normal driving data with Tuning Center? I was thinking about this lately, it'd be nice to have an exponential filter to give the last 5 or 10% of your travel to spikes from crashes, extreme movements, etc.

    I think changing from linear to rotational output type might be an exponential filter, but doubt it covers the type of range needed, and it's applied to the axis and not the force.

    Also thinking it wouldn't be a bad idea to have a little proxy program in between simtools and the sim to manipulate the data how you want. But my sim uses a network interface, probably making it much easier to do that.

    And you'd probably want to turn down the individual forces in game manager while the game is running for your idea.
  3. Michael Jeffries

    Michael Jeffries Member Gold Contributor

    Joined:
    Jul 22, 2019
    Messages:
    105
    Balance:
    485Coins
    Ratings:
    +17 / 0 / -0
    My Motion Simulator:
    Motion platform, 4DOF
    Supposedly FlyPT Mover app makes it easier to control crash spikes, but getting it to feel as good as SimTools isnt that easy. It looks like you need to be a mechanical engineer to get it working correctly.
  4. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,906Coins
    Ratings:
    +5,027 / 16 / -0
    The problem here is that when doing math in 2d, there is no real way to tell how fast the actuator is moving.
    And for most games anyway, they have no crash detection variable to use.

    However, I have been working on a new api that will include a crash input var, and then allow use to limit the strength of a crash.
    But I'm only in testing phase and its a ways off for now.

    I'm open to discuss ways we could implement such a feature, but I really think it's something that can be built into a new game api.
    It would for sure be handy for all flight games, as they almost always have a crash variable handy, that i have seen anyway.
    Take care,
    yobuddy
    • Informative Informative x 1
  5. Hocky

    Hocky Member

    Joined:
    Aug 30, 2018
    Messages:
    51
    Balance:
    119Coins
    Ratings:
    +25 / 1 / -0
    Thanks for you input because this is something that needs to be sorted out :)
    I have tried everything there is and I can not make crashes mild without taking out the wanted motion.

    Sorry it was maybe a naive idea that there was a collision variable in the games, I looked at GameVibe and there it was collision indication to be sent to the transducers. Did look in the codemaster udp as an example and could not find any, as you stated.
    All games should have this variable I think but to bad they dont have! I wonder how hard it would be for them to add it?

    What do you mean by calculations in 2d? Is it that the filters are applied at the motion que?
    Is any filtering done at the telemetry data?

    Thanks!
  6. yobuddy

    yobuddy Well-Known Member Staff Member Moderator SimAxe Beta Tester SimTools Developer Gold Contributor

    Joined:
    Feb 9, 2007
    Messages:
    5,133
    Occupation:
    Computer Technician
    Location:
    Portland, Oregon - USA
    Balance:
    47,906Coins
    Ratings:
    +5,027 / 16 / -0
    We would have to get creative, In theory we could look for any accelerations that are a select-able % over our min/max values, and shutdown if a threshold is reached.
    (or switch to a select-able % of the normal force, like 20 % strength.)
    We just need to run a bunch of tests really to what all works.
    Take care,
    yobuddy
    • Creative Creative x 1
    Last edited: Feb 3, 2020
  7. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    1,346
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    2,692Coins
    Ratings:
    +1,043 / 9 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    The crash would be most likely like sudden spike in the position data from slow normal motion to an instant other far position of the actuator, you can use a time based filter to ignore these spikes in data ( translated as high frequency ) and allow the actuator to go to that position slower by adding some artificial data points between positions if the new out of ordinary position is sustained ( which can translate as normal lower frequency data ).

    I used a rolling average filter on my latest experiments that fixes partially the spike issue without adding latency to the motion as its not using tables or bubble sort or anything like that. It even makes the motor move smoother with no vibrations between steps. See this video:




    Thanks
    Thanos
  8. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,846
    Location:
    Portugal
    Balance:
    14,096Coins
    Ratings:
    +2,169 / 16 / -0
    My Motion Simulator:
    6DOF
    @yobuddy,

    What I'm using right now for crashes is a spike remover.
    The idea is to remove sudden variations in value.
    I'm using a dynamic low pass filter.
    It's dynamic, because the strength of the filter is dependant on the variation of the value.
    So if variation is to strong, the filter is stronger.
    If variation is to low, filter has no strength.
    I made it exponential, to make it even stronger for extra variations.
    So the strength is = variation * variation
    I also added for my next Mover, the possibility to decide from when we start applying the filter. What that means is that we can use the filter just above a variation of 10 as an example.
    Also we can now change the exponential. It can be 1 (linear) or 2, 3, 4... for stronger effect without affecting lower values.

    I think it can be done on the output of the Simtools axis. That's what I had in the last Mover, now I will be using it in the DOF's.

    It has no latency, because there's no filter at low variations.
    • Informative Informative x 1
  9. pmvcda

    pmvcda aka FlyPT

    Joined:
    Nov 3, 2010
    Messages:
    1,846
    Location:
    Portugal
    Balance:
    14,096Coins
    Ratings:
    +2,169 / 16 / -0
    My Motion Simulator:
    6DOF
    Some code for the dynamic EMALP (I call it EDYNLP in Mover):

    Code:
            public double Filter(double value)
            {
                var aux = Math.Abs(value - this._filteredValue);
                if (aux > this.From)
                {
                    aux -= this.From;
                    aux *= aux;
                    aux *= this.Samples;
                    if (aux < 1) aux = 1;
                    var _alpha = 2.0 / (1.0 + aux);
                    this._filteredValue += _alpha * (value - this._filteredValue);
                }
                else
                {
                    this._filteredValue = value;
                }
                return this._filteredValue;
            }
    • Like Like x 1
    • Winner Winner x 1
    • Useful Useful x 1
  10. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    1,346
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    2,692Coins
    Ratings:
    +1,043 / 9 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF

    Nice!

    I do something similar with the rolling average approximation filter in hardware:

    Code:
    float sma;
    int period;
     
    float ApproximateSimpleMovingAverage(float new_value) {
      sma *= (period – 1);
      sma += vew_value;
      sma /= period;
      return sma;
    }
    • Informative Informative x 1
  11. T R Para

    T R Para i make stuff up

    Joined:
    Oct 18, 2018
    Messages:
    385
    Occupation:
    Retired
    Location:
    Cincinnati, Oh
    Balance:
    2,436Coins
    Ratings:
    +357 / 2 / -0
    My Motion Simulator:
    AC motor, 6DOF
    I agree 100%
    With people building much more powerful and quicker actuators using the 220 vac closed loop servo motors I am very concerned about getting injured by my sim.
    If you crash in DCS the impact is all too real !.
    I am glad to see this potential problem is being addressed .:thumbs:thumbs:thumbs
  12. Hocky

    Hocky Member

    Joined:
    Aug 30, 2018
    Messages:
    51
    Balance:
    119Coins
    Ratings:
    +25 / 1 / -0
    I am following all your ideas for filters and such and I think we are many that could help out testing any ideas.
    The filter stuff seems very hard to get to work, its so many conditions and combinations that could occur and a filter that is 90% is not good enough. The last 10% could just be the hit that goes wrong. If the filter gets better and better we will tune the rigs more and more aggressive, then when the 10% occurs... :(

    Wish I could help out more but I am just not on that level of knowledge.
    Trying to push someone out of the box :)

    If this was simple it would already been done!
    I think this is the main thing that limits the performance, both movements and tactile.
    Last edited: Feb 5, 2020
  13. SeatTime

    SeatTime Well-Known Member

    Joined:
    Dec 27, 2013
    Messages:
    2,574
    Occupation:
    Retired
    Location:
    Brisbane Australia
    Balance:
    28,370Coins
    Ratings:
    +2,844 / 38 / -0
    My Motion Simulator:
    AC motor, Motion platform
    I use to use BFF software to control my 6DOF many moons ago - it use to have a 'crash' /high G setting that worked with the games it supported, so it has been done before :). extract from setup file

    ;Trigger acceleration level in G's for crash detect (active in some racing car sim versions).
    ;If vehicle acceleration above this value is detected the motion software assumes a crash has
    ;occurred and will send the motion driver to Hold to protect the platform.
    Crash_Gs=10.0
    • Like Like x 3
    Last edited: Feb 5, 2020
  14. Hocky

    Hocky Member

    Joined:
    Aug 30, 2018
    Messages:
    51
    Balance:
    119Coins
    Ratings:
    +25 / 1 / -0
    That sounds like another aproach to catch the crash moment.
    Did it work good without limiting the other movements?

    So for each DOF that are G based you set a value that are the max value for driving under normal conditions?
    So how long did the platform Hold or in crash mode, as long as the G was above or a timer to?
    What happend after the Hold, did the motion slowly transition back to the actual motion cue?

    Could this be a complement to the filters, @yobuddy , @pmvcda, @Thanos?
  15. SeatTime

    SeatTime Well-Known Member

    Joined:
    Dec 27, 2013
    Messages:
    2,574
    Occupation:
    Retired
    Location:
    Brisbane Australia
    Balance:
    28,370Coins
    Ratings:
    +2,844 / 38 / -0
    My Motion Simulator:
    AC motor, Motion platform
    It had no effect on any filter setting until the G limit was reached in which case the rig just parked itself. A hot key was used to reset the software back to the 'active' state. Worked great. Remember that this software was designed to work on really big AC rigs.
    • Like Like x 2
  16. DotComRich

    DotComRich Member

    Joined:
    Nov 8, 2018
    Messages:
    49
    Balance:
    544Coins
    Ratings:
    +25 / 1 / -0
    The only crashes that I've ever really had an issue with are when the car rolls. Barrel rolling in dirt rally in particular is as scary as it comes in terms of a motion sim. The TL especially goes crazy in barrel rolls. As long as I stay on my wheels, the crashes really are not a concern.

    Is there a way to detect if the car is upside down? If so you could instantly lower the overall intensity by 'x' amount until the car has stopped moving or has been back upright for 'x' number of seconds.
  17. Thanos

    Thanos Building the Future one AC Servo at a time... or 6

    Joined:
    Jul 6, 2017
    Messages:
    1,346
    Occupation:
    Electronics Engineer
    Location:
    United States
    Balance:
    2,692Coins
    Ratings:
    +1,043 / 9 / -0
    My Motion Simulator:
    AC motor, Motion platform, 4DOF, 6DOF
    ...and this is the reason Microsoft Flight simulator freezes the simulation when you crash. Too many variables and unique situations to take care of...
  18. dododge

    dododge Active Member Gold Contributor

    Joined:
    Mar 8, 2015
    Messages:
    100
    Balance:
    854Coins
    Ratings:
    +71 / 0 / -0
    A related(?) situation I've encountered is falling off/through the world in Assetto Corsa and the car tumbling and/or spinning as it falls (and it typically doesn't stop until you manually reset to the pit). I don't think it's ever happened on one of the official tracks but there are plenty of mod maps where it's easy to do if you go exploring off-road.
  19. Hocky

    Hocky Member

    Joined:
    Aug 30, 2018
    Messages:
    51
    Balance:
    119Coins
    Ratings:
    +25 / 1 / -0
    @Thanos now has released a new firmware for the AMC AASD controller with a really clever spike filter. This filter is in the controller and not in simtools.

    The AMC got more control of the actuator as it know the position of the actuator and can also control the speed. Thanos can explain this better maybe?

    It is a game changer! Seems to make you go 100%, no boundary and limited smoothing.
    For the first time you can tune for max performance and not worry of the crashes.

    MDBOX users (me) just need to wait a little until its implemented into the AMC-MDBOX firmware.

    Just wanted all to know and I am very excited about this new feature!
    • Like Like x 1
  20. Michael Jeffries

    Michael Jeffries Member Gold Contributor

    Joined:
    Jul 22, 2019
    Messages:
    105
    Balance:
    485Coins
    Ratings:
    +17 / 0 / -0
    My Motion Simulator:
    Motion platform, 4DOF
    I agree - this feels unbelievable. This is the filter I've been looking for since I got a motion rig last year!
    • Like Like x 1