# Elements for a 2000 satellite constellation? No problem!

A customer recently asked if we had any constellation design tools in the toolbox, which at that point we did not. This customer had been tasked with simulating a constellation of nearly 2000 CubeSats, and had available only a GUI-based tool that required him to enter each satellite’s elements individually. He was able to clone them, but still had to open up each one to edit the elements. This means he first had to make a table of the elements he wanted, then painstakingly enter them. In the Spacecraft Control Toolbox, creating these elements and simulating or visualizing the satellites is as easy as writing a for loop.

Our workflow using the SCT is mostly programmatic, using functions and scripts. Functions such as El2RV make it easy to go from Kepler elements to a Cartesian state for initializing a simulation. In just a few hours, I was able to write a function to generate elements for a Walker-Delta constellation of any size, and plot the results; to examples are shown below.

The WalkerConstellation.m function will be in our 2015.1 release, due out in a week. It can generate elements for a classic rosette or a polar star. If there is sufficient customer interest we may expand the constellation design tools available in the toolbox!

```%-------------------------------------------------------------------
%   Form:
%   elements = WalkerConstellation( t, p, f, inc, sma, doStar )
%-------------------------------------------------------------------
WalkerConstellation( 720, 24, 2, 65*pi/180, 6800 )```

```% Create a polar star similar to Iridium
WalkerConstellation( 66, 6, f, 86.4*pi/180, 7150, true );```

```%-------------------------------------------------------------------- %   Compute orbital elements for a Walker constellation. % %   Generates a delta constellation be default, also called a rosette. For %   a star geometry, pass in true for the optional doStar parameter. The %   notation is i:n/p/f; f, the relative spacing, is an integer which can %   take any value from 0 to (p-1). % %   Real-life examples include the Galileo, a delta geometry, and Iridium, %   a star geometry. % %   Since version 2015.1 %-------------------------------------------------------------------- %   Form: %   elements = WalkerConstellation( t, p, f, inc, sma, doStar ) %-------------------------------------------------------------------- %   ----- %   Input %   ----- %   t         (1,1)    Total number of satellites %   p         (1,1)    Number of orbital planes %   f         (1,1)    Relative spacing between satellites in adjacent planes %   inc       (1,1)    Inclination (rad) %   sma       (1,1)    Semi-major axis (km) %   raan      (1,1)    RAAN spread, optional. The default is 2*pi. % %   ------ %   Output %   ------ %   elements   (6,t)    Kepler elements % %-------------------------------------------------------------------- %  Reference: Larson and Wertz, Space Mission Analysis and Design, second %  edition (1996), "Constellation Patterns", p. 191 %--------------------------------------------------------------------```