VNB switching

Spacecraft, Thruster, Tank, Propagator, CoordinateSystem, etc.

VNB switching

Postby chancwj » Tue Jan 14, 2014 10:03 pm

I've been playing with electric propulsion and trying to figure out how to switch the VNB coordinate system for thrust direction when transitioning out of the Earth's sphere of influence. Unfortunately the coordinate system is defined in the Thruster definition in the Hardware folder. There's no way to define the thrust coordinate system in the Burns folder. So in addition to defining separate Burns for near earth and deep space, you also have to create two different Thrusters, one with the Earth as the coordinate origin and the other with the Sun as origin.
chancwj
 
Posts: 3
Joined: Thu Nov 14, 2013 12:55 am

Re: VNB switching

Postby jjkparker » Wed Jan 15, 2014 1:53 pm

If we allowed something like this, would it solve your issue?

Code: Select all
Create Thruster t
t.Origin = Earth

BeginMissionSequence

t.Origin = Sun


You're right that you can't do this right now, but it might be possible to allow it in the future. But I'm not the Thruster guy!

Joel
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: VNB switching

Postby shughes » Wed Jan 22, 2014 7:50 pm

A more elegant, and realistic approach, and one we use for this, is to set the thruster in spacecraft body coordinates, and set spacecraft body to be in the system you want. You can change attitude at any point in the mission.

Here is pseudoscript.

Code: Select all
Create Spacecraft DefaultSC;
GMAT DefaultSC.Attitude = CoordinateSystemFixed;
GMAT DefaultSC.AttitudeCoordinateSystem = EarthVNB;

Create Thruster Thruster1;
GMAT Thruster1.CoordinateSystem = Local;
GMAT Thruster1.Axes = SpacecraftBody;

Create CoordinateSystem EarthVNB;
GMAT EarthVNB.Origin = DefaultSC;
GMAT EarthVNB.Axes = ObjectReferenced;
GMAT EarthVNB.XAxis = V;
GMAT EarthVNB.YAxis = N;
GMAT EarthVNB.Primary = Earth;
GMAT EarthVNB.Secondary = DefaultSC;

Create CoordinateSystem SunVBN;
GMAT SunVBN.Origin = DefaultSC;
GMAT SunVBN.Axes = ObjectReferenced;
GMAT SunVBN.XAxis = V;
GMAT SunVBN.YAxis = N;
GMAT SunVBN.Primary = Sun;
GMAT SunVBN.Secondary = DefaultSC;

BeginMissionSequence;

GMAT DefaultSC.AttitudeCoordinateSystem = EarthVNB
%  Do maneuvers in Earth VNB
GMAT DefaultSC.AttitudeCoordinateSystem = SunVNB
%  Now do maneuvers in Sun VNB

shughes
 
Posts: 443
Joined: Mon Jun 09, 2008 6:27 pm


Return to GMAT Resources

Who is online

Users browsing this forum: No registered users and 1 guest

cron