Fix #881 by inverting location value imported from RockSim

This commit is contained in:
Neil Balch 2021-05-12 19:22:21 -07:00
parent fea2497ecc
commit f2b15c10ea

View File

@ -180,7 +180,9 @@ class FinSetHandler extends AbstractElementHandler {
finish = RocksimFinishCode.fromCode(Integer.parseInt(content)).asOpenRocket();
}
if (RocksimCommonConstants.XB.equals(element)) {
location = Double.parseDouble(content) / RocksimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH;
// Opposite value accounts for the different relative distance directions used
// Issue Ref: https://github.com/openrocket/openrocket/issues/881
location = -Double.parseDouble(content) / RocksimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH;
}
if (RocksimCommonConstants.LOCATION_MODE.equals(element)) {
axialMethod = RocksimLocationMode.fromCode(Integer.parseInt(content)).asOpenRocket();