In the Vizzy Program there is this Variable to read the Acceleration of the Craft.
If you summarize it up to one Value with the length method from the math section, it will always be positive. Even if the Craft is decelerating. Is there any option to check if the value is positive or negative?

Tags
Question

12 Comments

  • Log in to leave a comment
  • Profile image
    0 DMNK99

    Hello everybody, thank you all for your help and Ideas you submitted. I’ve found a solution that works pretty well by checking the velocity every 0.2 sec and if it decreases, multiply the acceleration by -1. So kind of that what @PointBreak suggested. But anyway unfortunately this was the completely wrong approach for what I was actually trying to achieve.
    But to go into this would completely go beyond the scope now.
    I’ll try a view different things over the next view days or weeks and if I don’t get any further, I’ll open up a new Post.
    Suffice it to say, the main goal was to make an Algorithm, which automatically lands the craft.
    So until then, take care! ;)

    Pinned 1.2 years ago
  • Profile image
    1,159 YaMomzBox420

    @Toinkove that's a great analogy, pretty close to what I would've used myself. It's basically how a high school physics teacher would introduce the topic of Newtonian physics to class(along with some kind of visual demonstration involving a toy car rolling down sloped track).

    To add a bit for clarity, acceleration(and deceleration) is always positive because it requires some type of force effecting the body. An object falls toward the ground because of gravitational force(downward acceleration), the air in it's path imparts drag force(upward acceleration), and when the two balance each other then acceleration is 0(terminal velocity). In the absence of these forces(or any others), then an object would never have any acceleration. This is all regardless of velocity or direction of motion/force applied.

    Acceleration is a vector quantity
    A=F•m
    since F is a directional force(vector), m is mass(scalar), and a scalar times a vector is always a vector in the same direction but of a different length.
    Velocity is also a vector and typically represents the path of motion of an object(assuming some outside force doesn't change that), so it's common to accept any acceleration that increases velocity length as positive "acceleration" and any acceleration that decreases velocity length as negative "deceleration". Acceleration can be in any direction though, so it doesn't necessarily mean the velocity vector's length(the actual "speed" of the object) will change with a given acceleration vector, the direction of velocity is instead effected.


    If the angle measures between the two vectors
    [Angle(v)(a)]
    Is less than 90°, then it's likely acceleration, and if the angle is greater than 90°, then it's likely deceleration, but only if the length of v changes respectively.


    PS, I realize there's a lot more to it than that, especially since I'm leaving out angular moment and rotational acceleration, but that's waaaaaay beyond anything I'm capable of explaining in a reasonable manner

    Also, yes, I am dumb and respond to random posts with entire essay sized comments XP

    1.2 years ago
  • Profile image

    @DMNK99 if you have a dot product, it will show you how well the two vectors align. I suggested this since you asked for determining the sign value and that is the only was I can think of doing it. Sadly, this means that you will almost never get the full magnitude of acceleration, but it will be close.
    When I say normal, I mean the magnitude is being constrained to 1. The operation is basically this in FunkyTrees:
    dot(FlightData.Acceleration,normalise(FlightData.SurfaceVelocity))
    As I stated earlier, this should give you an acceleration close to the actual value with a sign depending on whether or not it opposes or adds to the current velocity. If this doesn’t work, I can always submit a demo craft.

    1.2 years ago
  • Profile image
    1,092 PointBreak

    @DMNK99 No need to divide by timespan if you just want to know if it's positive/negative.

    1.2 years ago
  • Profile image
    285 Toinkove

    Sorry I can't help with the actual problem at hand, I just don't use Vizzy. But I'm not surprised it always reads Acceleration as positive because this is actually how it works.

    1.2 years ago
  • Profile image
    285 Toinkove

    @DMNK99 think of it this way .... if you're driving forward, foot on the gas peddle, you're accelerating forward. take foot off the gas, your acceleration forward starts to decrease (what most call deceleration). eventually the car will just be coasting along at a constant speed (or velocity) that would be zero acceleration. But when the car begins to start sowing down (in forward velocity), That's now acceleration to the rear (still have a forward velocity that is decreasing, but rearward acceleration). Acceleration (and velocity) is a vector, always has a numeric unit, like 10 KPH, and a direction, forward/backward/up/down. And is never negative. At least that's the physics aspect of it.

    +1 1.2 years ago
  • Profile image
    0 DMNK99

    @LeMagicBaguette Can you tell me, how to do that correctly? I used this dot function from the math section put the acceleration in the left slot and the velocity in the right one. I displayed the result in comparison to the acceleration variable and I don’t know, what it gave me there, but it’s not nearly the acceleration. And what did you mean with normal? Thanks.

    1.2 years ago
  • Profile image

    Dot product of acceleration and velocity (normal).

    1.2 years ago
  • Profile image
    0 DMNK99

    @PointBreak Thanks, I tried that, but this isn’t really working, since the wait command doesn’t seem to function very precisely.
    Because I have to divide the Result of v1-v2 by this timespan.

    1.2 years ago
  • Profile image
    0 DMNK99

    @Toinkove Yes with positive I meant increasing velocity and with negative decreasing. What did you mean with changing direction? Let’s say a Craft is falling straight down to the center of a Planet, accelerating by it’s Gravity. Then I turn the Engines on which acceleration is greater than that Gravity, then the velocity would decrease, but the direction would still stay the same. Ok after it reaches 0, it would accelerate up again and then change it’s direction. But until that point it wouldn’t. Or did I got anything wrong?

    1.2 years ago
  • Profile image
    1,092 PointBreak

    Maybe check the velocity every 0.1s and do v1-v2

    1.2 years ago
  • Profile image
    285 Toinkove

    Maybe cause Acceleration is Always positive! That's what my physics teacher was always scolding us about! It's the vector (or direction) that changes! Ok well not always positive, it can be 0. instead of positive or negative, maybe increasing or decreasing is what's necessary here?

    1.2 years ago

No Upvotes

Log in in to upvote this post.