celestlabx: celestlab’s extension module · reference data from jpl, sofa, cnes .... lots of...

Post on 04-Feb-2021

1 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

  • 16 May 2014

    CelestLabX: CelestLab’s extension module

    ScilabTEC

    Alain Lamy, CNESAlain.Lamy@cnes.fr

  • Age

    nda

    2

    � Space Flight Dynamics mission design at CNES

    � What tools for mission design ?-> What makes Scilab adapted to mission design ?

    � CelestLab: Our toolbox for SFD mission design

    � CelestLabX: Extension to CelestLab� Design options and choices� Development aspects� Contents

    � Conclusion

  • 3

    The Toulouse Space Centre

    Systems Engineering & Flight Dynamics department

    Support to project system teams(performance analyses…)

    Delegated responsibility on flight dynamics system, test benches, mission simulator,

    system tests

    Architects for AOCS, Command and control flight S/W

    Mission Design and Flight Dynamics Coordination

    Flight dynamics:

    Mission designCoordination (preparation of operations…)

    Prepares the French space technical policy

    Develops orbital systems

    Operates satellites

    Ensures compatibility with the French Operations Space Act

  • 4

    What is flight dynamics?

    � Flight dynamics is the field related to the orbit / attitude (orientation) of objects in space, which includes aspects such as: � Defining the trajectory (around Earth, other planets, the Sun…) � Determining the trajectory using measurements (from groundstations, using onboard sensors)� Simulating various aspects of the mission: visibility from groundstations…� Controlling the trajectory, computing adequate maneuvers to keepthe satellite on track.

    � Project phases: � Mission design: early stages -> prove the feasibility� Preparation of the operational activities / tools / flight software for all mission phases� Operations

  • 5

    Introduction: mission design at CNES(mission design for projects in early phases)

    � Iterative process to: �Better define a mission �Prove its feasibility�Exhibit the key elements

    Mission objectives, Hypotheses

    Studies

    Coordination(PASO)Thermics

    Space

    dynamics

    Electrical

    architectureAttitude control On-board

    Instruments

    At CNES mission analyses are carried out within a dedicated structure: PASO(*) = Concurrent Design Facility(*) Plateau d’Architecture des Systèmes Orbitaux

  • 6

    What tools for mission design ?

    What kind of tools do we need for mission design ?(lots of studies, various tools required, there are always specific aspects...)

    � Not so easy. Compromise between: � Flexibility (adaptation of tools must be easy) � Robustness (reference, reliable tools must be available)� Efficiency (simple problems/questions must be answered easily) � Consistency between tools

    � Scilab appears to fullfill our needs

    Some time ago, we didn’t use Scilab:We had unix-based solutions, with compiled program (Fortran…), shell scripts, data exchanges using files, dedicated libraries for I/O … … It worked but was not as flexible as we might have wished.

  • 7

    What makes Scilab adapted to mission design ?

    � The language is simple enough� Close enough to maths � Adapted to engineers: you do flight dynamics and not programming(but: writing libraries requires a bit more of « programming stuff »)� Can be easily used by anyone for simple calculations

    � Scilab comes with many functions / libraries� No need for external libraries for usual tasks (maths, statistics…) � Graphical features included� Atoms for additional features� Vectorization (operations on vectors) => often well adapted for simple

    tasks: x = linspace(0,10,100); y = f(x); plot(x,y);

    � Links with other langages possible� We used Scilab with C, FORTRAN, and more recently Java� Scilab becomes a « glue » language and a unifying platform

  • 8

    CelestLab = flight dynamics for Scilab

    � Scilab flight dynamics library, pure scilab code � Open source (same licence as Scilab)

    �Available on atoms web site since end of 1999. Number of downloads > 20000

    � Contains ~250 functions (~20000 lines of code)� Functions dealing with main flight dynamics aspects

    Coordinates & Frames, Trajectory and maneuvers, Orbit properties, Interplanetary, Geometry & events, Relative motion, Models, Utilities

    � Thoroughly tested�Reference data from JPL, SOFA, CNES ....

    � Lots of examples, demos (~65), tutorial pages �Can be used as starting points when you have to do something close to whatalready exists. � Provides immediate answers to common/recurrent questions => simple problemsare generally easily solved.

    http://atoms.scilab.org/toolboxes/celestlab

  • 9

    Simple example (using CelestLab)

    � Angle between the orbit plane and the Sun direction (beta) inc = 77.6 * %CL_deg2rad; sma = 890.e3 + %CL_eqRad; ecc = 0.001; kep0 = [sma; ecc; inc; 0; 0; 0]; // orbital elements

    cjd0 = CL_dat_cal2cjd(2020,3,10); // initial datecjd = cjd0 + (0 : 1/1440 : 10); // computation dates

    kep = CL_ex_secularJ2(cjd0, kep0, cjd); // propagate

    [pos, vel] = CL_oe_kep2car(kep); // position and velocity[pos_ecf, vel_ecf] = CL_fr_convert("ECI", "ECF", cjd, pos, vel); // change ref. frame

    sun = CL_eph_sun(cjd); // Sun positionsun_ecf = CL_fr_convert("ECI", "ECF", cjd, sun); // change ref. frame

    beta1 = %pi/2 - CL_vectAngle(CL_cross(pos, vel), sun); beta2 = %pi/2 - CL_vectAngle(CL_cross(pos_ecf, vel_ecf), sun_ecf);

    scf(); plot(cjd, beta2 * %CL_rad2deg, "b"); plot(cjd, beta1 * %CL_rad2deg, "r");

    xtitle("Beta angle (deg)", "days"); CL_g_legend(gca(), ["Velocity / Earth", "Inertial velocity"]); CL_g_stdaxes();

  • 10

    Simple example (using CelestLab)

    � Run the script and you obtain:

  • 11

    CelestLab: illustrations

    CelestLab Demo Tool

  • 12

    CelestLab: illustrations

    Examples of CelestLab help pages

  • 13

    CelestLab: illustrations

    Reference frames in CelestLab(use of the latest standards)

  • 14

    Why make CelestLab open-source ?

    � No rights issues in CelestLab

    � Make things standard=> A way to share our methods, conventions

    � Make exchanges inside the flight dynamics community easier� Instead of data => we can exchange lines of code� Description of methods or algorithms => answer can be: « see CelestLab »� Can be used in universities for training of engineers / students in the flight dynamics domain

    � Contributions� Detections of errors is more efficient if there are many users. � Users may have ideas for extensions or create useful tools based on CelestLab(that we would not have time to develop)

  • 15

    CelestLabX: introduction

    � Open-source code / freeware libraries exist and we would like to use them through Scilab. -> Saves (long) coding / testing time-> Add usefull features to the libraries

    � Sometimes efficiency implies calling native code if vectorization isnot easy to achieve.

    � Our solution: CelestLabX = CelestLab’s extension: -> contains interfaces to public (or maybe specific) tools and libraries-> the additional features are made available throughCelestLab (CelestLab then contains either pure Scilab code or calls to functions from CelestLabX)

  • 16

    CelestLabX: Design options

    � Option 1 :

    Drawback: Structure not clear. Not obvious from the user’sperspective which library contains what.

    � Option 2 : Drawback: more complex

    � Option 3 : Advantage: - CelestLab remains simple. - User (mostly) sees CelestLab- CelestLab alone is useable

    CelestLab’sextension

    (independentmodule)

    CelestLab(unchanged)

    CelestLabExtended with interfaces to

    various languages / native code

    CelestLab’sextension

    (low level native code + interfaces)

    CelestLabNew interfaces

  • 17

    CelestLabX: Design options

    � Closer look at the selected option :

    CelestLab’sextension

    (low level native code + interfaces)

    CelestLab+ new interfaces

    What the user (mainly) sees

    C code

    Java code

    Standard Scilab API calls

    New features nowIncluded in Scilab for - Calling java from Scilab- Generating jar files

    (Standard module structure)

  • 18

    CelestLabX: Internal structure

    � Example with Stela interface (interface to java code):

    CL_stela_extrap()

    CelestLab(Scilab code)

    Additional features Available / CelestLabX: Change of reference Frame, coordinates ...

    CelestLabX(Scilab code)

    CLx_stela_extrap()

    Interface as simple as possible(reason: simplify code, tests …)

    CelestLabXspecific

    Java interfaces: (Java code)

    CLx_stela_register()CLx_config_set()

    ...

    Extrapolation.javaDerivation.java

    CelestLabX(STELA jar files)

    .jar

    STELA

    .jar

    Included in CelestLabX

    STELA installation directory loaded at start-up Generic functions

  • 19

    Development of CelestLabX

    � Contract with Scilab Enterprises with well defined respective roles:

    CNES S/E

    First version(prototype)

    C only

    Improved version (standard module)

    CelestLabXInterfaces

    Prototypes of implementations

    Extended version

    Scilab

    Final versionCelestLab

    (new interfaces)

  • 20

    CelestLabX: contents

    � Initial contentsSTELA: � CNES tool created in the context of satellite end of life regulations(limitation of the amount of debris). � Used for orbit long-term propagation (prediction of satellite positions over manyyears, usually up to 100)� Semi analytical propagation: propagation of « mean orbital elements » instead of true orbital elements => much less time consuming. � Can be downloaded from http://logiciels.cnes.fr/STELA/en/logiciel.htm

    Two-line elements� Data representing orbital states to be used for the propagation of objects with a specific model (SGP4/SDP4)� Classically used for the propagation of debris (number of objects > 10000)� Open source code exists (http://celestrak.com/software/vallado-sw.asp )

    � Probably in the future � Atmospheric density models; MSIS2000 or DTM2013

  • 21

    For mission design at CNES : not only CelestLab !

    Tools (sce, sci…) and data organized in directories (+ Descriptors)

    « navigator »

    Low level lib.

    Higher level lib.(+ interfaces with C, Fortran, Java)

    Scilab « extension »Functionalities for an easier use of the toolsUser area …

    dir

    dir

    dir

    dir dir

    data

    tree

    .sce

    .sci

    .scd

  • 22

    Stela interface in CelestLab (beta version)

    (Extract from CelestLab help pages)

    Run

  • 23

    A few concluding remarks

    � Scilab has been used extensively at CNES for flight dynamics mission design for a few years now.

    � Scilab appears to be well adapted: recurrent studies are now donemuch more efficiently (thanks to various tools, CelestLab in particular).

    � CelestlabX has been created to extend CelestLab with new featureswritten in other languages (C, Java), while keeping CelestLab simple. The alpha version of CelestLabX is beginning to be used at CNES.

    � CelestLabX is not yet publicly available: it should (hopefully) be beforenext summer.

    � Interfaces between Scilab and Java will probably be more commonpractice in the future at CNES as the software for the next generationof control centers will be written in Java.

  • 24

    For more information...

    � For more information on CelestLab:http://atoms.scilab.org/toolboxes/celestlab

top related