units

Frequently-asked questions

units

Postby cfd » Sun Feb 02, 2014 10:53 pm

Can the units (metric) in GMAT be changed to English (feet and feet/sec)?
cfd
 
Posts: 4
Joined: Sun Feb 02, 2014 10:45 pm

Re: units

Postby jjkparker » Tue Feb 04, 2014 2:18 pm

No, GMAT has fixed units (SI).

However, you can change units in the script before outputting:

Code: Select all
X_miles = mySC.EarthMJ2000Eq.X * 1000 / 1609.344
Report myReport X_miles
Joel J. K. Parker
Flight dynamics engineer, GMAT team
http://gmatcentral.org
jjkparker
 
Posts: 617
Joined: Thu Jan 07, 2010 9:48 pm
Location: NASA Goddard Space Flight Center, Greenbelt, MD

Re: units

Postby cfd » Thu Feb 06, 2014 5:28 pm

Thanks, I got this to work. But, the report reflects the first value and then stays at that value, that is, as the trajectory changes the value of the converted parameter stays at the initial converted value. How do I make the variable update throughout the propagation?
cfd
 
Posts: 4
Joined: Sun Feb 02, 2014 10:45 pm

Re: units

Postby jjkparker » Thu Feb 06, 2014 6:43 pm

A full script implementing this would look something like:

Code: Select all
% other Create statements

Create Report myReport
myReport.Add = {} % don't report anything automatically; use Report command instead

BeginMissionSequence

% Write 10 lines at 5-second intervals
For i=1:10
    Propagate myProp(mySC) {mySC.ElapsedSecs = 5}
    X_miles = mySC.EarthMJ2000Eq.X * 1000 / 1609.344
    Report myReport X_miles
EndFor
Joel J. K. Parker
Flight dynamics engineer, GMAT team
http://gmatcentral.org
jjkparker
 
Posts: 617
Joined: Thu Jan 07, 2010 9:48 pm
Location: NASA Goddard Space Flight Center, Greenbelt, MD


Return to FAQ

Who is online

Users browsing this forum: No registered users and 2 guests