adjusted cp to change based on a component's instance count
This commit is contained in:
parent
29ec764b61
commit
7882304839
@ -204,8 +204,14 @@ public class BarrowmanCalculator extends AbstractAerodynamicCalculator {
|
||||
// Call calculation method
|
||||
forces.zero();
|
||||
calcMap.get(component).calculateNonaxialForces(conditions, forces, warnings);
|
||||
forces.setCP(component.toAbsolute(forces.getCP())[0]);
|
||||
forces.setCm(forces.getCN() * forces.getCP().x / conditions.getRefLength());
|
||||
|
||||
int instanceCount = component.getLocation().length;
|
||||
Coordinate x_cp_comp = forces.getCP();
|
||||
Coordinate x_cp_weighted = x_cp_comp.setWeight(x_cp_comp.weight * instanceCount);
|
||||
Coordinate x_cp_absolute = component.toAbsolute(x_cp_weighted)[0];
|
||||
forces.setCP(x_cp_absolute);
|
||||
double CN_instanced = forces.getCN() * instanceCount;
|
||||
forces.setCm(CN_instanced * forces.getCP().x / conditions.getRefLength());
|
||||
|
||||
if (map != null) {
|
||||
AerodynamicForces f = map.get(component);
|
||||
|
Loading…
x
Reference in New Issue
Block a user