** Branch linked: lp:~fpstovall/nrtb/sprint-005

** Changed in: nrtb/alpha
       Status: New => Fix Committed

You received this bug notification because you are a member of NRTB
Core, which is subscribed to New Real Time Battle.

  Delta V motion not applied properly

Status in The New Real Time Battle Project:
  Fix Committed
Status in New Real Time Battle alpha series:
  Fix Committed

Bug description:
  In cpp/sim_engine/base_object/base_object.cpp we are not applying
  motion properly, only half the deltaV should applied to motion, rather
  than the entire deltaV. In other words:

  velocity = oldV + (accel*Time);
  applyV = oldV + ((accel*Time)/2);
  location += applyV * time

  rotation should be handled in similar manner. Following is the method
  where the fault lies:

  bool base_object::apply(int time, float quanta)
    // move acording to forces
    float tmass = mass + mass_mod;
    triplet a = force / tmass;
    triplet ra = torque / (tmass * 0.5); // not accurate!!
    velocity += (a  + accel_mod) * quanta;
    rotation += (ra + torque_mod) * quanta;
    location += velocity * quanta;
    attitude += rotation * quanta;
    // apply post-effectors
    bool killme (false);
    for (auto e : post_attribs)
      if (e.second->tick(*this, time))
        killme = true;
    return killme;

To manage notifications about this bug go to:

Mailing list: https://launchpad.net/~nrtb-core
Post to     : nrtb-core@lists.launchpad.net
Unsubscribe : https://launchpad.net/~nrtb-core
More help   : https://help.launchpad.net/ListHelp

Reply via email to