nrtb-core team mailing list archive
-
nrtb-core team
-
Mailing list archive
-
Message #00584
[Bug 1276332] [NEW] Delta V motion not applied properly
Public bug reported:
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;
};
** Affects: nrtb
Importance: Critical
Assignee: Rick Stovall (fpstovall)
Status: New
** Affects: nrtb/alpha
Importance: Critical
Assignee: Rick Stovall (fpstovall)
Status: New
** Changed in: nrtb
Importance: Undecided => Critical
** Changed in: nrtb
Assignee: (unassigned) => Rick Stovall (fpstovall)
** Changed in: nrtb
Milestone: None => sprint-005a
** Also affects: nrtb/alpha
Importance: Critical
Assignee: Rick Stovall (fpstovall)
Status: New
** Branch linked: lp:~fpstovall/nrtb/fps-bugsfix-005
--
You received this bug notification because you are a member of NRTB
Core, which is subscribed to New Real Time Battle.
https://bugs.launchpad.net/bugs/1276332
Title:
Delta V motion not applied properly
Status in The New Real Time Battle Project:
New
Status in New Real Time Battle alpha series:
New
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:
https://bugs.launchpad.net/nrtb/+bug/1276332/+subscriptions
Follow ups
References