Impulsive Burn and Decrementing Mass

Conversations pertaining to the testing of GMAT

Impulsive Burn and Decrementing Mass

Postby JTichy » Mon Jul 13, 2009 5:47 pm

In writing acceptance test scripts today I stumbles upon an error. Within the Impulsive Burn Maneuver object if the user selects a Local Coordinate System then the maneuver occurs without error. For instance a Local VNB System

Code: Select all
%-----  Spacecraft A
Create Spacecraft Sc;
GMAT Sc.DateFormat = TAIModJulian;
GMAT Sc.Epoch = '21545.000000000';
GMAT Sc.CoordinateSystem = EarthMJ2000Eq;
GMAT Sc.DisplayStateType = Cartesian;
GMAT Sc.X = 7100;
GMAT Sc.Y = 0;
GMAT Sc.Z = 1300;
GMAT Sc.VX = 0;
GMAT Sc.VY = 7.35;
GMAT Sc.VZ = 1;
GMAT Sc.DryMass = 850;
GMAT Sc.Cd = 2.2;
GMAT Sc.Cr = 1.8;
GMAT Sc.DragArea = 15;
GMAT Sc.SRPArea = 1;
GMAT Sc.Tanks = {tank1}
%GMAT Sc.Thrusters = {engine1};
GMAT Sc.Attitude = CoordinateSystemFixed;
GMAT Sc.AttitudeDisplayStateType = 'Quaternion';
GMAT Sc.AttitudeRateDisplayStateType = 'AngularVelocity';
GMAT Sc.AttitudeCoordinateSystem = 'EarthMJ2000Eq';
GMAT Sc.Q1 = 0;
GMAT Sc.Q2 = 0;
GMAT Sc.Q3 = 0;
GMAT Sc.Q4 = 1;
GMAT Sc.EulerAngleSequence = '312';
GMAT Sc.AngularVelocityX = 0;
GMAT Sc.AngularVelocityY = 0;
GMAT Sc.AngularVelocityZ = 0;

%-----  Fuel Tank A
Create FuelTank tank1;
GMAT tank1.FuelMass = 725;
GMAT tank1.Pressure = 1200;
GMAT tank1.Temperature = 20;
GMAT tank1.RefTemperature = 12;
GMAT tank1.Volume = 0.8;
GMAT tank1.FuelDensity = 1029;
GMAT tank1.PressureModel = PressureRegulated;

%-----   Impulsive Burn A
Create ImpulsiveBurn IB;
GMAT IB.CoordinateSystem = Local;
GMAT IB.Origin = Earth;
GMAT IB.Axes = VNB;
GMAT IB.Element1 = 1.6785;
GMAT IB.Element2 = 0;
GMAT IB.Element3 = 0;
GMAT IB.DecrementMass = true;
GMAT IB.Tank = {tank1};
GMAT IB.Isp = 300;
GMAT IB.GravitationalAccel = 9.81;


%  Create a force model
Create ForceModel fm;
GMAT fm.CentralBody = Earth;
GMAT fm.PointMasses = {Earth};
GMAT fm.Drag = None;
GMAT fm.SRP = Off;
GMAT fm.ErrorControl = RSSStep;


%  Create a propagator
Create Propagator prop;
GMAT prop.FM = fm;
GMAT prop.Type = RungeKutta89;
GMAT prop.InitialStepSize = 60;
GMAT prop.Accuracy = 1e-9;
GMAT prop.MinStep = 60;
GMAT prop.MaxStep = 60;
GMAT prop.MaxStepAttempts = 50;
 
%  Create a report file
Create ReportFile rf;
GMAT rf.Filename = '.\output\GMAT_IB_output.report';
GMAT rf.Precision = 16;
%GMAT rf.Add = {Sc.TAIModJulian, Sc.X, Sc.Y, Sc.Z, Sc.VX, Sc.VY, Sc.VZ, Sc.TotalMass};
GMAT rf.WriteHeaders = Off;
GMAT rf.ZeroFill = On;
GMAT rf.ColumnWidth = 27;
GMAT rf.LeftJustify = On;


 
% -------------------------------------------------------------------------
% --------------------------- Mission Sequence ----------------------------
% -------------------------------------------------------------------------

Report rf Sc.TAIModJulian Sc.X Sc.Y Sc.Z Sc.VX Sc.VY Sc.VZ Sc.TotalMass;
Maneuver IB(Sc);
Report rf Sc.TAIModJulian Sc.X Sc.Y Sc.Z Sc.VX Sc.VY Sc.VZ Sc.TotalMass;


Produces
21545.00 7100.00 0.00 1300.00 0.00 7.35 1.00 1575.00
21545.00 7100.00 0.00 1300.00 0.00 9.01 1.22 890.40


However, once switched into EarthMJ2000Eq system, the maneuver no longer decrements mass.

Code: Select all
%-----  Spacecraft A
Create Spacecraft Sc;
GMAT Sc.DateFormat = TAIModJulian;
GMAT Sc.Epoch = '21545.000000000';
GMAT Sc.CoordinateSystem = EarthMJ2000Eq;
GMAT Sc.DisplayStateType = Cartesian;
GMAT Sc.X = 7100;
GMAT Sc.Y = 0;
GMAT Sc.Z = 1300;
GMAT Sc.VX = 0;
GMAT Sc.VY = 7.35;
GMAT Sc.VZ = 1;
GMAT Sc.DryMass = 850;
GMAT Sc.Cd = 2.2;
GMAT Sc.Cr = 1.8;
GMAT Sc.DragArea = 15;
GMAT Sc.SRPArea = 1;
GMAT Sc.Tanks = {tank1}
%GMAT Sc.Thrusters = {engine1};
GMAT Sc.Attitude = CoordinateSystemFixed;
GMAT Sc.AttitudeDisplayStateType = 'Quaternion';
GMAT Sc.AttitudeRateDisplayStateType = 'AngularVelocity';
GMAT Sc.AttitudeCoordinateSystem = 'EarthMJ2000Eq';
GMAT Sc.Q1 = 0;
GMAT Sc.Q2 = 0;
GMAT Sc.Q3 = 0;
GMAT Sc.Q4 = 1;
GMAT Sc.EulerAngleSequence = '312';
GMAT Sc.AngularVelocityX = 0;
GMAT Sc.AngularVelocityY = 0;
GMAT Sc.AngularVelocityZ = 0;

%-----  Fuel Tank A
Create FuelTank tank1;
GMAT tank1.FuelMass = 725;
GMAT tank1.Pressure = 1200;
GMAT tank1.Temperature = 20;
GMAT tank1.RefTemperature = 12;
GMAT tank1.Volume = 0.8;
GMAT tank1.FuelDensity = 1029;
GMAT tank1.PressureModel = PressureRegulated;

%-----   Impulsive Burn A
Create ImpulsiveBurn IB;
GMAT IB.CoordinateSystem = EarthMJ2000Eq;
GMAT IB.Origin = Earth;
%GMAT IB.Axes = VNB;
GMAT IB.Element1 = 1.6785;
GMAT IB.Element2 = 0;
GMAT IB.Element3 = 0;
GMAT IB.DecrementMass = true;
GMAT IB.Tank = {tank1};
GMAT IB.Isp = 300;
GMAT IB.GravitationalAccel = 9.81;


%  Create a force model
Create ForceModel fm;
GMAT fm.CentralBody = Earth;
GMAT fm.PointMasses = {Earth};
GMAT fm.Drag = None;
GMAT fm.SRP = Off;
GMAT fm.ErrorControl = RSSStep;


%  Create a propagator
Create Propagator prop;
GMAT prop.FM = fm;
GMAT prop.Type = RungeKutta89;
GMAT prop.InitialStepSize = 60;
GMAT prop.Accuracy = 1e-9;
GMAT prop.MinStep = 60;
GMAT prop.MaxStep = 60;
GMAT prop.MaxStepAttempts = 50;
 
%  Create a report file
Create ReportFile rf;
GMAT rf.Filename = '.\output\GMAT_IB_output.report';
GMAT rf.Precision = 16;
%GMAT rf.Add = {Sc.TAIModJulian, Sc.X, Sc.Y, Sc.Z, Sc.VX, Sc.VY, Sc.VZ, Sc.TotalMass};
GMAT rf.WriteHeaders = Off;
GMAT rf.ZeroFill = On;
GMAT rf.ColumnWidth = 27;
GMAT rf.LeftJustify = On;


 
% -------------------------------------------------------------------------
% --------------------------- Mission Sequence ----------------------------
% -------------------------------------------------------------------------

Report rf Sc.TAIModJulian Sc.X Sc.Y Sc.Z Sc.VX Sc.VY Sc.VZ Sc.TotalMass;
Maneuver IB(Sc);
Report rf Sc.TAIModJulian Sc.X Sc.Y Sc.Z Sc.VX Sc.VY Sc.VZ Sc.TotalMass;


Produces:
21545.00 7100.00 0.00 1300.00 0.00 7.35 1.00 1575.00
21545.00 7100.00 0.00 1300.00 1.67 7.35 1.00 1575.00





I am using the 6-17 build to run these tests.
JTichy
 
Posts: 26
Joined: Tue May 12, 2009 9:02 pm

Re: Impulsive Burn and Decrementing Mass

Postby shughes » Mon Jul 13, 2009 6:05 pm

Sounds like this is a good old fashioned bug. Have you added it to Bugzilla yet?
shughes
 
Posts: 443
Joined: Mon Jun 09, 2008 6:27 pm

Re: Impulsive Burn and Decrementing Mass

Postby JTichy » Mon Jul 13, 2009 7:00 pm

Bug 1500
JTichy
 
Posts: 26
Joined: Tue May 12, 2009 9:02 pm

Re: Impulsive Burn and Decrementing Mass

Postby zeeshan002 » Wed Apr 22, 2015 1:04 pm

Extract the script configurations from the existing Cb scripts and from those generate test cases that are centered about a user-defined comet, asteroid, planet, and moon
aliii
zeeshan002
 
Posts: 1
Joined: Wed Apr 22, 2015 12:58 pm


Return to Testing

Who is online

Users browsing this forum: No registered users and 1 guest