Merge branch 'mass-info-both-with-and-without-motor' into intellij-ce-settings
This commit is contained in:
		
						commit
						9ffcad37c8
					
				@ -1518,8 +1518,8 @@ TCurveMotor.ttip.emptyMass = Empty mass:
 | 
				
			|||||||
! RocketInfo
 | 
					! RocketInfo
 | 
				
			||||||
RocketInfo.lengthLine.Length = Length
 | 
					RocketInfo.lengthLine.Length = Length
 | 
				
			||||||
RocketInfo.lengthLine.maxdiameter = , max. diameter
 | 
					RocketInfo.lengthLine.maxdiameter = , max. diameter
 | 
				
			||||||
RocketInfo.massText1 = Mass with motors
 | 
					RocketInfo.massWithMotors = Mass with motors
 | 
				
			||||||
RocketInfo.massText2 = Mass with no motors
 | 
					RocketInfo.massWithoutMotors = Mass with no motors
 | 
				
			||||||
RocketInfo.at = at M=
 | 
					RocketInfo.at = at M=
 | 
				
			||||||
RocketInfo.cgText = CG:
 | 
					RocketInfo.cgText = CG:
 | 
				
			||||||
RocketInfo.cpText = CP:
 | 
					RocketInfo.cpText = CP:
 | 
				
			||||||
 | 
				
			|||||||
@ -1222,8 +1222,8 @@ TCurveMotorCol.LENGTH = D
 | 
				
			|||||||
! RocketInfo
 | 
					! RocketInfo
 | 
				
			||||||
RocketInfo.lengthLine.Length = Délka
 | 
					RocketInfo.lengthLine.Length = Délka
 | 
				
			||||||
RocketInfo.lengthLine.maxdiameter = , max. prumer
 | 
					RocketInfo.lengthLine.maxdiameter = , max. prumer
 | 
				
			||||||
RocketInfo.massText1 = Hmotnost s motory 
 | 
					RocketInfo.massWithMotors = Hmotnost s motory
 | 
				
			||||||
RocketInfo.massText2 = Hmotnost bez motoru
 | 
					RocketInfo.massWithoutMotors = Hmotnost bez motoru
 | 
				
			||||||
RocketInfo.at = v M=
 | 
					RocketInfo.at = v M=
 | 
				
			||||||
RocketInfo.cgText = Te\u017Eí\u0161te:
 | 
					RocketInfo.cgText = Te\u017Eí\u0161te:
 | 
				
			||||||
RocketInfo.cpText = Centrum tlaku:
 | 
					RocketInfo.cpText = Centrum tlaku:
 | 
				
			||||||
 | 
				
			|||||||
@ -1281,8 +1281,8 @@ TCurveMotorCol.LENGTH = L
 | 
				
			|||||||
! RocketInfo
 | 
					! RocketInfo
 | 
				
			||||||
RocketInfo.lengthLine.Length = Länge
 | 
					RocketInfo.lengthLine.Length = Länge
 | 
				
			||||||
RocketInfo.lengthLine.maxdiameter = , max. Durchmesser
 | 
					RocketInfo.lengthLine.maxdiameter = , max. Durchmesser
 | 
				
			||||||
RocketInfo.massText1 = Masse mit Motoren
 | 
					RocketInfo.massWithMotors = Masse mit Motoren
 | 
				
			||||||
RocketInfo.massText2 = Masse ohne Motoren
 | 
					RocketInfo.massWithoutMotors = Masse ohne Motoren
 | 
				
			||||||
RocketInfo.at = bei M=
 | 
					RocketInfo.at = bei M=
 | 
				
			||||||
RocketInfo.cgText = CG:
 | 
					RocketInfo.cgText = CG:
 | 
				
			||||||
RocketInfo.cpText = CP:
 | 
					RocketInfo.cpText = CP:
 | 
				
			||||||
 | 
				
			|||||||
@ -887,8 +887,8 @@ RocketInfo.cpText                 = CP:
 | 
				
			|||||||
! RocketInfo
 | 
					! RocketInfo
 | 
				
			||||||
RocketInfo.lengthLine.Length      = Longitud: 
 | 
					RocketInfo.lengthLine.Length      = Longitud: 
 | 
				
			||||||
RocketInfo.lengthLine.maxdiameter = , Di\u00e1metro m\u00e1ximo: 
 | 
					RocketInfo.lengthLine.maxdiameter = , Di\u00e1metro m\u00e1ximo: 
 | 
				
			||||||
RocketInfo.massText1              = Masa con motores: 
 | 
					RocketInfo.massWithMotors         = Masa con motores:
 | 
				
			||||||
RocketInfo.massText2              = Masa sin motores: 
 | 
					RocketInfo.massWithoutMotors      = Masa sin motores:
 | 
				
			||||||
RocketInfo.stabText               = Estabilidad: 
 | 
					RocketInfo.stabText               = Estabilidad: 
 | 
				
			||||||
RocketInfo.velocityValue          = N/A
 | 
					RocketInfo.velocityValue          = N/A
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -878,8 +878,8 @@ RocketInfo.cpText                 = CP:
 | 
				
			|||||||
! RocketInfo
 | 
					! RocketInfo
 | 
				
			||||||
RocketInfo.lengthLine.Length      = Longueur
 | 
					RocketInfo.lengthLine.Length      = Longueur
 | 
				
			||||||
RocketInfo.lengthLine.maxdiameter = , diam\u00E8tre max.
 | 
					RocketInfo.lengthLine.maxdiameter = , diam\u00E8tre max.
 | 
				
			||||||
RocketInfo.massText1              = Masse avec moteurs 
 | 
					RocketInfo.massWithMotors         = Masse avec moteurs
 | 
				
			||||||
RocketInfo.massText2              = Masse sans moteurs
 | 
					RocketInfo.massWithoutMotors      = Masse sans moteurs
 | 
				
			||||||
RocketInfo.stabText               = Stabilit\u00E9:
 | 
					RocketInfo.stabText               = Stabilit\u00E9:
 | 
				
			||||||
RocketInfo.velocityValue          = N/A
 | 
					RocketInfo.velocityValue          = N/A
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1285,8 +1285,8 @@ TCurveMotorCol.LENGTH = Lunghezza
 | 
				
			|||||||
! RocketInfo
 | 
					! RocketInfo
 | 
				
			||||||
RocketInfo.lengthLine.Length = Lunghezza
 | 
					RocketInfo.lengthLine.Length = Lunghezza
 | 
				
			||||||
RocketInfo.lengthLine.maxdiameter = , max. diametro
 | 
					RocketInfo.lengthLine.maxdiameter = , max. diametro
 | 
				
			||||||
RocketInfo.massText1 = Massa CON motori
 | 
					RocketInfo.massWithMotors = Massa CON motori
 | 
				
			||||||
RocketInfo.massText2 = Massa SENZA motori
 | 
					RocketInfo.massWithoutMotors = Massa SENZA motori
 | 
				
			||||||
RocketInfo.at = a M=
 | 
					RocketInfo.at = a M=
 | 
				
			||||||
RocketInfo.cgText = CG:
 | 
					RocketInfo.cgText = CG:
 | 
				
			||||||
RocketInfo.cpText = CP:
 | 
					RocketInfo.cpText = CP:
 | 
				
			||||||
 | 
				
			|||||||
@ -1343,8 +1343,8 @@ TCurveMotor.ttip.emptyMass  = \u7A7A\u865A\u8CEA\u91CF\uFF1A
 | 
				
			|||||||
! RocketInfo
 | 
					! RocketInfo
 | 
				
			||||||
RocketInfo.lengthLine.Length  = \u9577\u3055
 | 
					RocketInfo.lengthLine.Length  = \u9577\u3055
 | 
				
			||||||
RocketInfo.lengthLine.maxdiameter  = , \u6700\u5927\u76F4\u5F84
 | 
					RocketInfo.lengthLine.maxdiameter  = , \u6700\u5927\u76F4\u5F84
 | 
				
			||||||
RocketInfo.massText1  = \u30E2\u30FC\u30BF\u30FC\u8FBC\u307F\u91CD\u91CF
 | 
					RocketInfo.massWithMotors  = \u30E2\u30FC\u30BF\u30FC\u8FBC\u307F\u91CD\u91CF
 | 
				
			||||||
RocketInfo.massText2  = \u30E2\u30FC\u30BF\u30FC\u7121\u3057\u91CD\u91CF
 | 
					RocketInfo.massWithoutMotors  = \u30E2\u30FC\u30BF\u30FC\u7121\u3057\u91CD\u91CF
 | 
				
			||||||
RocketInfo.at  = at M=
 | 
					RocketInfo.at  = at M=
 | 
				
			||||||
RocketInfo.cgText  = CG:
 | 
					RocketInfo.cgText  = CG:
 | 
				
			||||||
RocketInfo.cpText  = CP:
 | 
					RocketInfo.cpText  = CP:
 | 
				
			||||||
 | 
				
			|||||||
@ -1226,8 +1226,8 @@
 | 
				
			|||||||
 ! RocketInfo
 | 
					 ! RocketInfo
 | 
				
			||||||
 RocketInfo.lengthLine.Length  =  D\u0142ugo\u015B\u0107
 | 
					 RocketInfo.lengthLine.Length  =  D\u0142ugo\u015B\u0107
 | 
				
			||||||
 RocketInfo.lengthLine.maxdiameter  =  , maks. \u015Brednica
 | 
					 RocketInfo.lengthLine.maxdiameter  =  , maks. \u015Brednica
 | 
				
			||||||
 RocketInfo.massText1  =  Masa z silnikami
 | 
					 RocketInfo.massWithMotors  =  Masa z silnikami
 | 
				
			||||||
 RocketInfo.massText2  =  Masa bez silników
 | 
					 RocketInfo.massWithoutMotors  =  Masa bez silników
 | 
				
			||||||
 RocketInfo.at  =  przy M
 | 
					 RocketInfo.at  =  przy M
 | 
				
			||||||
 RocketInfo.cgText  =  \u015AC:
 | 
					 RocketInfo.cgText  =  \u015AC:
 | 
				
			||||||
 RocketInfo.cpText  =  \u015AP:
 | 
					 RocketInfo.cpText  =  \u015AP:
 | 
				
			||||||
 | 
				
			|||||||
@ -862,8 +862,8 @@ RocketInfo.cpText                 = CP:
 | 
				
			|||||||
# RocketInfo
 | 
					# RocketInfo
 | 
				
			||||||
RocketInfo.lengthLine.Length      = Tamanho
 | 
					RocketInfo.lengthLine.Length      = Tamanho
 | 
				
			||||||
RocketInfo.lengthLine.maxdiameter = , di\u00e2metro m\u00e1x.
 | 
					RocketInfo.lengthLine.maxdiameter = , di\u00e2metro m\u00e1x.
 | 
				
			||||||
RocketInfo.massText1              = Massa com motores
 | 
					RocketInfo.massWithMotors         = Massa com motores
 | 
				
			||||||
RocketInfo.massText2              = Massa sem motores
 | 
					RocketInfo.massWithoutMotors      = Massa sem motores
 | 
				
			||||||
RocketInfo.stabText               = Estabilidade:
 | 
					RocketInfo.stabText               = Estabilidade:
 | 
				
			||||||
RocketInfo.velocityValue          = N/D
 | 
					RocketInfo.velocityValue          = N/D
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -1435,8 +1435,8 @@ TCurveMotor.ttip.emptyMass = \u041c\u0430\u0441\u0441\u0430 \u0431\u0435\u0437 \
 | 
				
			|||||||
! RocketInfo
 | 
					! RocketInfo
 | 
				
			||||||
RocketInfo.lengthLine.Length = \u0414\u043b\u0438\u043d\u0430
 | 
					RocketInfo.lengthLine.Length = \u0414\u043b\u0438\u043d\u0430
 | 
				
			||||||
RocketInfo.lengthLine.maxdiameter = , \u043c\u0430\u043a\u0441. \u0434\u0438\u0430\u043c\u0435\u0442\u0440
 | 
					RocketInfo.lengthLine.maxdiameter = , \u043c\u0430\u043a\u0441. \u0434\u0438\u0430\u043c\u0435\u0442\u0440
 | 
				
			||||||
RocketInfo.massText1 = \u041c\u0430\u0441\u0441\u0430 \u0441 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f\u043c\u0438
 | 
					RocketInfo.massWithMotors = \u041c\u0430\u0441\u0441\u0430 \u0441 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u044f\u043c\u0438
 | 
				
			||||||
RocketInfo.massText2 = \u041c\u0430\u0441\u0441\u0430 \u0431\u0435\u0437 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0435\u0439
 | 
					RocketInfo.massWithoutMotors = \u041c\u0430\u0441\u0441\u0430 \u0431\u0435\u0437 \u0434\u0432\u0438\u0433\u0430\u0442\u0435\u043b\u0435\u0439
 | 
				
			||||||
RocketInfo.at = \u041f\u0440\u0438 M
 | 
					RocketInfo.at = \u041f\u0440\u0438 M
 | 
				
			||||||
RocketInfo.cgText = \u0426\u0422:
 | 
					RocketInfo.cgText = \u0426\u0422:
 | 
				
			||||||
RocketInfo.cpText = \u0426\u0414:
 | 
					RocketInfo.cpText = \u0426\u0414:
 | 
				
			||||||
 | 
				
			|||||||
@ -1440,8 +1440,8 @@ TCurveMotor.ttip.emptyMass = Empty mass:
 | 
				
			|||||||
! RocketInfo
 | 
					! RocketInfo
 | 
				
			||||||
RocketInfo.lengthLine.Length = Length
 | 
					RocketInfo.lengthLine.Length = Length
 | 
				
			||||||
RocketInfo.lengthLine.maxdiameter = , max. diameter
 | 
					RocketInfo.lengthLine.maxdiameter = , max. diameter
 | 
				
			||||||
RocketInfo.massText1 = Mass with motors
 | 
					RocketInfo.massWithMotors = Mass with motors
 | 
				
			||||||
RocketInfo.massText2 = Mass with no motors
 | 
					RocketInfo.massWithoutMotors = Mass with no motors
 | 
				
			||||||
RocketInfo.at = at M=
 | 
					RocketInfo.at = at M=
 | 
				
			||||||
RocketInfo.cgText = CG:
 | 
					RocketInfo.cgText = CG:
 | 
				
			||||||
RocketInfo.cpText = CP:
 | 
					RocketInfo.cpText = CP:
 | 
				
			||||||
 | 
				
			|||||||
@ -952,8 +952,8 @@ RocketInfo.cpText                 = CP(\u538B\u5FC3):
 | 
				
			|||||||
! RocketInfo
 | 
					! RocketInfo
 | 
				
			||||||
RocketInfo.lengthLine.Length      = \u957F\u5EA6
 | 
					RocketInfo.lengthLine.Length      = \u957F\u5EA6
 | 
				
			||||||
RocketInfo.lengthLine.maxdiameter = , \u6700\u5927\u76F4\u5F84
 | 
					RocketInfo.lengthLine.maxdiameter = , \u6700\u5927\u76F4\u5F84
 | 
				
			||||||
RocketInfo.massText1              = \u542B\u53D1\u52A8\u673A\u7684\u603B\u8D28\u91CF
 | 
					RocketInfo.massWithMotors              = \u542B\u53D1\u52A8\u673A\u7684\u603B\u8D28\u91CF
 | 
				
			||||||
RocketInfo.massText2              = \u4E0D\u542B\u53D1\u52A8\u673A\u7684\u51C0\u8D28\u91CF
 | 
					RocketInfo.massWithoutMotors              = \u4E0D\u542B\u53D1\u52A8\u673A\u7684\u51C0\u8D28\u91CF
 | 
				
			||||||
RocketInfo.stabText               = \u7A33\u5B9A\u6027:
 | 
					RocketInfo.stabText               = \u7A33\u5B9A\u6027:
 | 
				
			||||||
RocketInfo.velocityValue          = N/A
 | 
					RocketInfo.velocityValue          = N/A
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -47,6 +47,7 @@ public class RocketInfo implements FigureElement {
 | 
				
			|||||||
	private double cg = 0, cp = 0;
 | 
						private double cg = 0, cp = 0;
 | 
				
			||||||
	private double length = 0, diameter = 0;
 | 
						private double length = 0, diameter = 0;
 | 
				
			||||||
	private double mass = 0;
 | 
						private double mass = 0;
 | 
				
			||||||
 | 
						private double massWithoutMotors = 0;
 | 
				
			||||||
	private double aoa = Double.NaN, theta = Double.NaN, mach = Application.getPreferences().getDefaultMach();
 | 
						private double aoa = Double.NaN, theta = Double.NaN, mach = Application.getPreferences().getDefaultMach();
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	private WarningSet warnings = null;
 | 
						private WarningSet warnings = null;
 | 
				
			||||||
@ -150,18 +151,14 @@ public class RocketInfo implements FigureElement {
 | 
				
			|||||||
				trans.get("RocketInfo.lengthLine.maxdiameter") +" " + 
 | 
									trans.get("RocketInfo.lengthLine.maxdiameter") +" " + 
 | 
				
			||||||
				UnitGroup.UNITS_LENGTH.getDefaultUnit().toStringUnit(diameter));
 | 
									UnitGroup.UNITS_LENGTH.getDefaultUnit().toStringUnit(diameter));
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		String massText;
 | 
							String massTextWithMotors;
 | 
				
			||||||
		if (configuration.hasMotors())
 | 
							String massTextWithoutMotors;
 | 
				
			||||||
			//// Mass with motors 
 | 
					 | 
				
			||||||
			massText = trans.get("RocketInfo.massText1") +" ";
 | 
					 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
			//// Mass with no motors 
 | 
					 | 
				
			||||||
			massText = trans.get("RocketInfo.massText2") +" ";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
		massText += UnitGroup.UNITS_MASS.getDefaultUnit().toStringUnit(mass);
 | 
							/// Mass with no motors
 | 
				
			||||||
		
 | 
							massTextWithoutMotors = trans.get("RocketInfo.massWithoutMotors") +" ";
 | 
				
			||||||
		GlyphVector massLine = createText(massText);
 | 
							massTextWithoutMotors += UnitGroup.UNITS_MASS.getDefaultUnit().toStringUnit(massWithoutMotors);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							GlyphVector massLineWithoutMotors = createText(massTextWithoutMotors);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		g2.setColor(Color.BLACK);
 | 
							g2.setColor(Color.BLACK);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -169,6 +166,14 @@ public class RocketInfo implements FigureElement {
 | 
				
			|||||||
		g2.drawGlyphVector(lengthLine, x1, y1+line);
 | 
							g2.drawGlyphVector(lengthLine, x1, y1+line);
 | 
				
			||||||
		g2.drawGlyphVector(massLine, x1, y1+2*line);
 | 
							g2.drawGlyphVector(massLine, x1, y1+2*line);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							if( configuration.hasMotors() ) {
 | 
				
			||||||
 | 
								//// Mass with motors
 | 
				
			||||||
 | 
								massTextWithMotors = trans.get("RocketInfo.massWithMotors") + " ";
 | 
				
			||||||
 | 
								massTextWithMotors += UnitGroup.UNITS_MASS.getDefaultUnit().toStringUnit(mass);
 | 
				
			||||||
 | 
								GlyphVector massLineWithMotors = createText(massTextWithMotors);
 | 
				
			||||||
 | 
								g2.drawGlyphVector(massLineWithMotors, x1, y1+3*line);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
 | 
				
			|||||||
@ -652,6 +652,7 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change
 | 
				
			|||||||
		extraText.setLength(length);
 | 
							extraText.setLength(length);
 | 
				
			||||||
		extraText.setDiameter(diameter);
 | 
							extraText.setDiameter(diameter);
 | 
				
			||||||
		extraText.setMass(cg.weight);
 | 
							extraText.setMass(cg.weight);
 | 
				
			||||||
 | 
							extraText.setMassWithoutMotors( massCalculator.getCG( configuration, MassCalcType.NO_MOTORS ).weight );
 | 
				
			||||||
		extraText.setWarnings(warnings);
 | 
							extraText.setWarnings(warnings);
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
		
 | 
							
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user