[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Users] Fwd: Sprite orbit-guesser on the web using Orekit?



Thanks, Luc.  I've got something that almost compiles. ;-)

What do you suggest for dv?

My code so far is just after my signature block. (Sorry for Gmail's
crappy formatting.)


Regards,
Michael Turner
Executive Director
Project Persephone
K-1 bldg 3F
7-2-6 Nishishinjuku
Shinjuku-ku Tokyo 160-0023
Tel: +81 (3) 6890-1140
Fax: +81 (3) 6890-1158
Mobile: +81 (90) 5203-8682
turner@projectpersephone.org
http://www.projectpersephone.org/

"Love does not consist in gazing at each other, but in looking outward
together in the same direction." -- Antoine de Saint-Exupéry

/**
 * SpriteProp - for KickSat Sprites
 */

import java.util.List;
import java.util.ArrayList;

import org.apache.commons.math3.geometry.euclidean.threed.Vector3D;
import org.apache.commons.math3.ode.nonstiff.AdaptiveStepsizeIntegrator;
import org.apache.commons.math3.ode.nonstiff.DormandPrince853Integrator;
import org.apache.commons.math3.util.MathUtils;
import org.orekit.utils.Constants;
import org.orekit.utils.IERSConventions;
import org.orekit.utils.PVCoordinates;
import org.orekit.errors.OrekitException;
import org.orekit.frames.FactoryManagedFrame;
import org.orekit.frames.FramesFactory;
import org.orekit.frames.Transform;
import org.orekit.propagation.SpacecraftState;
import org.orekit.propagation.numerical.NumericalPropagator;
import org.apache.commons.math3.util.FastMath;
import org.orekit.orbits.KeplerianOrbit;
import org.orekit.orbits.PositionAngle;
import org.orekit.time.AbsoluteDate;

/*
 * @author Luc Maisonobe
 * @author Fabien Maussion
 * @author Pascal Parraud
 * @author Romain Di Costanzo
 * @author Michael Turner
 *
 */
public class SpriteProp {

/**
* @param args
*/
public static void main(String[] args) {
         int n;
         AbsoluteDate releaseDate;
         float dv;
         NumericalPropagator kickSatPropagator;
         KeplerianOrbit orbit;

         // Keplerian parameters taken from
http://spaceflight.nasa.gov/realdata/sightings/SSapplications/Post/JavaSSOP/orbit/ISS/SVPOST.html
         try {
orbit = new org.orekit.orbits.KeplerianOrbit(
6794126.00, //  a, semi-major axis -  size.
.0014140, // meters: e, eccentricity -  shape.
51.83436, // i, inclination -  orientation w.r.t equator.
82.92739, // pa, perigee
31.76736, // degrees: raan, Right Ascension of the Ascending Node
46.64131, // anomaly, TA/MA True/Mean Anomaly
PositionAngle.valueOf("TRUE"), // type,
FramesFactory.getITRF (IERSConventions.IERS_2010, true), // frame,
AbsoluteDate.J2000_EPOCH, // date
Constants.EIGEN5C_EARTH_MU // central attraction coefficient MU
);

         n = 200; // egregious MAGIC - MT

// copied from https://www.orekit.org/static/architecture/propagation.html
      // steps limits
         final double minStep  = 0.001;
         final double maxStep  = 1000;
         final double initStep = 60;

         // error control parameters (absolute and relative)
         final double positionError = 10.0;
         final double[][] tolerances =
NumericalPropagator.tolerances(positionError, orbit, orbit.getType());

         // set up mathematical integrator
         AdaptiveStepsizeIntegrator integrator =
             new DormandPrince853Integrator(minStep, maxStep,
tolerances[0], tolerances[1]);
         integrator.setInitialStepSize(initStep);

         // set up space dynamics propagator
         kickSatPropagator = new NumericalPropagator(integrator);
// End of copy

// Luc Maisonobe, from e-mail
// - start with the initial orbit of KickSat
// - at the prescribed time of sprites release, compute position and
//   attitude of KickSat using any orbit propagator, and a Sun pointing
//   attitude (i.e. using CelestialBodyPointing for the attitude provider),
// - supposing KickSat will release n sprites uniformly spread with some
//   known radial velocity in its plane orthogonal to Sun pointing, you can
//   compute the sprites initial positions and velocities as follows:

   SpacecraftState kickSat = kickSatPropagator.propagate(releaseDate);
   Transform satToInertial = kickSat.toTransform().getInverse();
   List<PVCoordinates> spritesPV = new ArrayList<PVCoordinates>(n);
   for (int i = 0; i < n; i++) {

     // each sprite has a relative position of 0, 0, 0 wrt KicSat
     // and a relative velocity at some angle in the release plane
     // orthogonal to KickSat Z axis
     double alpha = i * MathUtils.TWO_PI / n;
     PVCoordinates relativePV =
         new PVCoordinates(Vector3D.ZERO,
                           new Vector3D(dv * FastMath.cos(alpha),
                                        dv * FastMath.sin(alpha),
                                        0.0));

     // convert the relative PV (i.e. position velocity expressed
     // in spacecraft frame) into an absolute PV
     spritesPV.add(satToInertial.transformPVCoordinates(relativePV));
   // End of Luc Maisonobe e-mail contribution
   }
  } catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (OrekitException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}

}



On Sun, Feb 2, 2014 at 6:23 AM, MAISONOBE Luc <luc.maisonobe@c-s.fr> wrote:
> Hi Michael,
>
> Michael Turner <michael.eugene.turner@gmail.com> a écrit :
>
>
>> On Fri, Jan 31, 2014 at 10:20 AM, Hank Grabowski
>> <hank@applieddefense.com> wrote:
>>>
>>> Sounds interesting.  What sort of assistance would you be looking for?
>>
>>
>> Between now and launch, I believe Zac has his hands full with the
>> ground station software. I don't want to distract him too much. I
>> think we only need basic starting-point data from him, e.g., about
>> PPOD deployment (timing, altitude, direction, etc.) and then Sprite
>> deployment (timing, relative velocities w.r.t. KickSat). For purposes
>> of predicting orbital decay, perhaps also ballistic coefficient of
>> Sprites at various angles.
>>
>> Translating all that into orbit propagation is where I'm clueless. I'm
>> not an Orekit user. I've only contributed to the wiki at the level of
>> copy editing.
>
>
> I think the following could be done easily:
>
>  - start with the initial orbit of KickSat
>  - at the prescribed time of sprites release, compute position and
>    attitude of KickSat using any orbit propagator, and a Sun pointing
>    attitude (i.e. using CelestialBodyPointing for the attitude provider),
>  - supposing KickSat will release n sprites uniformly spread with some
>    known radial velocity in its plane orthogonal to Sun pointing, you can
>    compute the sprites initial positions and velocities as follows:
>
>     SpacecraftState kicksat = kickSatPropagator.propagate(releaseDate);
>     Transform satToInertial = kickSat.toTransform().getInverse();
>     List<PVCoordinates> spritesPV = new ArrayList<PVCoordinates>(n);
>     for (int i = 0; i < n; i++) {
>
>       // each sprite has a relative position of 0, 0, 0 wrt KicSat
>       // and a relative velocity at some angle in the release plane
>       // orthogonal to KickSat Z axis
>       double alpha = i * MathUtils.TWO_PI / n;
>       PVCoordinates relativePV =
>           new PVCoordinates(Vector3D.ZERO,
>                             new Vector3D(dv * FastMath.cos(alpha),
>                                          dv * FastMath.sin(alpha),
>                                          0.0));
>
>       // convert the relative PV (i.e. position velocity expressed
>       // in spacecraft frame) into an absolute PV
>       spritesPV.add(satToInertial.transformPV(relativePV));
>     }
>
> Then, one can create one propagator for each sprite and compute their
> trajectory after release from KickSat. In order to take drag into account
> for orbit decay, one should us a numerical propagator.
> Some of these propagators could be configured with elevation detectors to
> automatically compute the Acquisition Of Signal/Loss Of Signal events from a
> specified ground point (I would say the four propagators that correspond to
> sprites release towards velocity, across track to the left, across track to
> the right and in the rear direction, in order to have an idea of how the
> sprites cloud expand).
>
> The propagators could also generate an ephemeris so some fancy display could
> be created (or people could download it).
>
> Does this seem achievable?
>
> best regards,
> Luc
>
>
>
>>
>> Zac is concerned that time might be too short to do anything useful.
>> I'm not so sure, but getting basic requirements worked out should help
>> with the estimate. I think he envisions a tasty graphical display --
>> e.g., a real-time graphic showing the globe and positions of Sprites
>> (and KickSat). My thought was more like this: tell people what times
>> of day would be best for trying to get reception, depending on where
>> they are. Where reception is successful, the results might be used to
>> update the orbital elements on a per-Sprite basis. At this point, I
>> don't know how much dispersion is expected in the Sprite fleet.
>>
>> Regards,
>> Michael Turner
>> Executive Director
>> Project Persephone
>> K-1 bldg 3F
>> 7-2-6 Nishishinjuku
>> Shinjuku-ku Tokyo 160-0023
>> Tel: +81 (3) 6890-1140
>> Fax: +81 (3) 6890-1158
>> Mobile: +81 (90) 5203-8682
>> turner@projectpersephone.org
>> http://www.projectpersephone.org/
>>
>> "Love does not consist in gazing at each other, but in looking outward
>> together in the same direction." -- Antoine de Saint-Exupéry
>>
>>
>> On Fri, Jan 31, 2014 at 10:20 AM, Hank Grabowski
>> <hank@applieddefense.com> wrote:
>>>
>>> Sounds interesting.  What sort of assistance would you be looking for?
>>>
>>>
>>> On Thu, Jan 30, 2014 at 10:05 AM, Michael Turner
>>> <michael.eugene.turner@gmail.com> wrote:
>>>>
>>>>
>>>> See forwarded e-mail below, from Zac Manchester, the lead on KickSat.
>>>>
>>>>   http://www.kickset.net
>>>>
>>>> I have Java web hosting (metawerx.net) and a little experience with
>>>> getting the demo code running, but I'm not an orbital mechanics expert
>>>> by any means. The SpaceX CRS 3 / ELaNa 5 launch is now scheduled for
>>>> March 1st, so there's about one month to do something here with
>>>> Orekit.
>>>>
>>>> I think it's an interesting problem -- a few hundred flat,
>>>> spin-stabilized femtosats, with high ballistic coefficents, deployed
>>>> radially from a sun-pointing, spin-stabilized cubesat. Being able to
>>>> predict their orbits even approximately might help those with ground
>>>> stations. Deviations from Orekit trajectory predictions might count as
>>>> exosphere density data (for all I know, which isn't much.)
>>>>
>>>>  If anyone wants to help out with this, please write me. Everybody
>>>> involved with KickSat Sprites would greatly appreciate it.
>>>> Contributors will be duly credited.
>>>>
>>>> Regards,
>>>> Michael Turner
>>>> Executive Director
>>>> Project Persephone
>>>> K-1 bldg 3F
>>>> 7-2-6 Nishishinjuku
>>>> Shinjuku-ku Tokyo 160-0023
>>>> Tel: +81 (3) 6890-1140
>>>> Fax: +81 (3) 6890-1158
>>>> Mobile: +81 (90) 5203-8682
>>>> turner@projectpersephone.org
>>>> http://www.projectpersephone.org/
>>>>
>>>> "Love does not consist in gazing at each other, but in looking outward
>>>> together in the same direction." -- Antoine de Saint-Exupéry
>>>>
>>>>
>>>>
>>>> ---------- Forwarded message ----------
>>>> From: Zac Manchester <zacinaction@gmail.com>
>>>> Date: Thu, Jan 30, 2014 at 4:03 AM
>>>> Subject: Re: Sprite orbit-guesser on the web using Orekit?
>>>> To: Michael Turner <michael.eugene.turner@gmail.com>
>>>>
>>>>
>>>> Hi Michael,
>>>>
>>>> Good to hear from you - hope things are going well. First off, the
>>>> launch date has slipped once again to March 1, and I'm told that date
>>>> is "very soft" and likely subject to further (possibly significant)
>>>> delays.
>>>>
>>>> Right now I'm working on getting my radio demodulator/decoder online
>>>> so that hams can just record audio files and upload them to be decoded
>>>> in the cloud. Ideally we could then plot all of the ground station
>>>> contacts on a google maps overlay or something.
>>>>
>>>> As for some kind of astrodynamics thing using Orekit, the obvious
>>>> thing to do is some kind of orbit propagation/estimation using the
>>>> tracking data we get. The issue I think is that we're likely to run
>>>> out of time with the launch coming up so quickly. If this is what you
>>>> want to focus on, I'd recommend trying to pipe the Orekit orbit
>>>> propagator output into a google earth or google maps visualization to
>>>> be displayed online. If you can take care of the graphics/web UI
>>>> stuff, I can handle the astrodynamics end.
>>>>
>>>> Have fun at the Brown conference - I've been to a couple and they're
>>>> always interesting. I think this one will be right up your alley.
>>>>
>>>> Best,
>>>> Zac
>>>
>>>
>>>
>>
>>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>