How to jump from point to point?

Tell me, please, what is wrong in my algorithm impulse to jump from one platform to another? (From point A to point B and Ay > By)
Image
Suppose that initially the body is at the point A at a height h = Ay-By, then:

y (t) = Ay + Vy + gt ^ 2/2
x (t) = Ax + Vx * t

Suppose we want that body to overcome the distance in 1 second, then y (1) = By:

Vy = By-Ay-g / 2 = h-g / 2;
Vx = Bx-Ax;

In Box2D we have applyLinearImpulse (impulse, point);

impulse = mass * speed;

Code: Select all

    player_body = PhysicsFactory.createBoxBody(mPhysicsWorld, a_sprite, BodyDef.BodyType.DynamicBody, FIXTURE_DEF);
            player_body.setFixedRotation(true);
            player_body.setLinearDamping(0f);

    final Vector2 impulse_vector = new Vector2();
                 
         impulse_vector.y = -1*(mPhysicsWorld.getGravity().y/2+h)*player_body.getMass();
         impulse_vector.x = (target_x-player_body.x)*player_body.getMass();
   
    player_body.applyLinearImpulse(impulse_vector, player_body.getWorldCenter());



As a result my body moves too far away.

P.S. Sorry for my terrible English

Original thread: https://box2d.org/forum/viewtopic.php?t=9720