Barycenter

Lead: SPH

Developer: WCS

Tester: JMB

 

 

Explore

Known Bugs

Failing Tests

Other Findings

Requirements

Interface/Functional Spec

Overview

Script Syntax

Description

Fields

GUI

Remarks

Examples

Test Procedures

Assumptions

File Naming Conventions

Nominal Tests

Edge/Corner/Miscellaneous Tests

Unique Validation Tests

Unique Mode Tests

Unique GUI Tests

Explore

Known Bugs

 

      Bug     GMT-2213     Some Barycenter tests are off by 3 meters with Matlab truth

      Bug     GMT-2354     Creating Barycenter in GUI and using throws invalid exception

      Bug     GMT-2065     Barycenter Panel Minor Enhancements

 

Failing Tests

There were some failing tests but they were due to inconsistencies in the SPK files being used and I fixed those problems.

Other Findings

The following validation failures are tracked in GMT-3503:

 

I found several validation failures.  (-SPH).  We need to check that all objects added to a barycenter are of type CelestialBody, and that each CelestialBody in the list appears only once.  These may be caught at run time but they are definitely not caught at initialization.

 

Barycenter_Validation_AddBodiesToSolarySystemBarycenter (script) []

Barycenter_Validation_BodyAppearsMoreThanOnce (script) []

Barycenter_Validation_SSBAppearsInBodyList (script) []

You can add a spacecraft to a barycenter

Requirements

 

FRR-18.1

The system shall allow the user to create and configure a barycenter defined by any combination of default or user-defined celestial bodies.

FRR-18.2.0

The system shall contain a "built-in" in point defined as the solar system barycenter defined by the following ephemeris sources.

FRR-18.2.1

                                       1)  DE405

FRR-18.2.2

                                       2)  SPK

 

Interface/Functional Spec

Overview

 

The center of mass of selected celestial bodies.

Description

 

A Barycenter is a center of mass of a set of celestial bodies.  GMAT contains two barycenter objects: a built-in SolarSystemBarycenter object and the Barycenter resource that allows you to build a custom barycenter object such as the Earth-Moon barycenter.

 

See Also : Coordinate System, Solar System, Libration Point.

Fields

 

See the User Interface Spec spreadsheet for reference information for fields. 

GUI

 

The Barycenter dialog box allows you to define the celestial bodies included in a custom Barycenter.  All celestial bodies, including user-defined bodies, are available for use in a Barycenter  and appear in either the AvailableBodies list or the SelectedBodies list.  The example below illustrates the default configuration which contains Earth and Luna.

 

 

The SolarySystemBarycenter object shown below is a built-in object and you cannot modify its configuration.  See the Remarks section for details regarding the model for the SolarSystemBarycenter.

 

           

Remarks

 

Built-in SolarSystemBarycenter Object

 

The built-in SolarSystemBarycenter is modelled using the ephemerides selected in the SolarySystem.EphemerisSource field.  For example, if you select DE421 for SolarSystem.EphemerisSource, then the barycenter location is computed by calling the DE421 ephemeris routines.  For DE and SPICE ephemerides, the model for the barycenter includes the planets and several hundred minor planets and asteroids.  Note that you cannot add bodies to the SolarSystemBarycenter.

 

Custom Barycenter Objects

 

You can create a custom barycenter using the Barycenter resource.  The position and velocity of a barycenter is a mass-weighted average of the position and velocity of the included celestial bodies.  In the equations below m_i, r_i, and v_i are respectively the mass, position, and velocity of the ith body in the barycenter and r_b and v_b are respectively the position and velocity of the barycenter.

Examples

Define the state of a spacecraft in Solar System Barycenter coordinates.

Create CoordinateSystem SSB

SSB.Origin = SolarSystemBarycenter;

SSB.Axes   = MJ2000Eq;

 

Create ReportFile aReport

 

Create Spacecraft aSpacecraft

aSpacecraft.CoordinateSystem = SSB;

aSpacecraft.X  = -27560491.88656896;

aSpacecraft.Y  = 132361266.8009069;

aSpacecraft.Z  = 57419875.95483227;

aSpacecraft.VX = -29.78491261798486;

aSpacecraft.VY = 2.320067257851091;

aSpacecraft.VZ = -1.180722388963864;

 

BeginMissionSequence

 

Report aReport aSpacecraft.EarthMJ2000Eq.X aSpacecraft.EarthMJ2000Eq.Y ...               

              aSpacecraft.EarthMJ2000Eq.Z

 

Report the state of a spacecraft in Solar System Barycenter coordinates

 

Create CoordinateSystem SSB

SSB.Origin = SolarSystemBarycenter;

SSB.Axes   = MJ2000Eq;

 

Create Spacecraft aSpacecraft;

Create ReportFile aReport

 

BeginMissionSequence

 

Report aReport aSpacecraft.SSB.X aSpacecraft.SSB.Y aSpacecraft.SSB.Z ...

                 aSpacecraft.SSB.VX aSpacecraft.SSB.VY aSpacecraft.SSB.VZ

 

Create an Earth-Moon barycenter and use it in a Sun-Earth-Moon Libration point.

 

Create Barycenter EarthMoonBary

EarthMoonBary.BodyNames = {Earth,Luna};

 

Create LibrationPoint SunEarthMoonL2

SunEarthMoonL2.Primary   = Sun;

SunEarthMoonL2.Secondary = EarthMoonBary

SunEarthMoonL2.Point     = L2;

 

Create CoordinateSystem SEML2Coordinates;

SEML2Coordinates.Origin = SunEarthMoonL2;

SEML2Coordinates.Axes   = MJ2000Eq;

 

Create Spacecraft aSpacecraft

GMAT aSpacecraft.DateFormat = UTCGregorian;

GMAT aSpacecraft.Epoch = '09 Dec 2005 13:00:00.000';

GMAT aSpacecraft.CoordinateSystem = SEML2Coordinates;

GMAT aSpacecraft.X  = -32197.88223741966;

GMAT aSpacecraft.Y  = 211529.1500044117;

GMAT aSpacecraft.Z  = 44708.57017366499;

GMAT aSpacecraft.VX = 0.03209516489451751;

GMAT aSpacecraft.VY = 0.06086386504053736;

GMAT aSpacecraft.VZ = 0.0550442738917212;

 

Create ReportFile aReport

 

BeginMissionSequence

 

Report aReport aSpacecraft.EarthMJ2000Eq.X aSpacecraft.EarthMJ2000Eq.Y ...               

              aSpacecraft.EarthMJ2000Eq.Z

Test Procedures

Nominal Tests

Priority

Status

Summary

P1

Done: SPH

Test computation of Solar System Barycenter using DE405, DE421, DE424, and SPK ephemeris sources.

 

See examples like:

Barycenter_DE405SSB_NeptuneOrbit

Barycenter_SPKSSB_SaturnOrbit

Barycenter_DE421SSB_SaturnOrbit

Barycenter_DE424SSB_SaturnOrbit

 

 

P1

Done: SPH

Test computation of assembled barycenter using SPK, DE405, DE421, and DE42 sources.

 

See examples like:

BaryCenter_SunJupiter_SunOrbit_Cmd

BaryCenter_SunMarsSaturnNeptune_LunaOrbit

BaryCenter_SunMercuryVenusEarthMarsJupiterSaturnUranusNeptunePlutoLuna_EarthOrbit

P1

Done: SPH

Test that user-defined body is used correctly in assembled barycenter.

 

Edge/Corner/Miscellaneous Tests

 

None: -SPH

 

Priority

Status

Summary

 

 

 

 

 

 

 

 

 

 

Unique Validation Tests

These are unique validation tests that are required for special field or object couplings.

Priority

Status

Summary

P1

Done: SPH

Test that a body cannot be added twice to an assembled barycenter

P1

Done: SPH

Test that you cannot add SSB to an assembled barycenter.

P1

Done: SPH

Test that you cannot add bodies to SSB.

P1

Done: SPH

Test that you cannot add a spacecraft to a barycenter

Unique Mode Tests

 

None.  This object cannot be configured in command mode.

Priority

Status

Summary

 

 

 

 

 

 

 

 

 

 

Unique GUI Tests

These are tests that are unique to the GUI interface for this feature that are not covered by the standard GUI test template and procedures.

 

Priority

Status

Summary

P1

Inspected: SPH

Test that user defined bodies appear as available bodies in barycenter GUI.

P1

Inspected: SPH

Test that SolarSystemBarycenter does not appear in assembled barycenter GUI.