SlideShare a Scribd company logo
1 of 14
Download to read offline
Interfacing Java for orbit propagation
Application to orbits in the Mars-Phobos system
Alain Lamy
CNES - DSO/DV/IF
Scilab Conference
20 November 2018
Context / background
 Scilab has been used at CNES for many years, in particular for spaceflight
dynamics mission analysis
 CNES Contribution: CelestLab (available on https://atoms.scilab.org) +
CelestLabX (extension)
 First version: end of 2009. Updated end of october 2018
 Contents:
 CelestLab: pure Scilab code – main user interface
 CelestLabX: internal functions called by CelestLab (C and java interfaces)
 Other libraries / tools used at CNES with interfaces
with Fortran, C and Java languages
2
CelestLab / CelestLabX – illustrations
3
Help, demos, examples, cookbook…
Why interfacing with other languages ?
 For efficiency reasons
 To make existing software available. Examples (CelestLabX):
 STELA: long-term orbit propagation -> Java
 TLEs: orbit data / model for propagation of various space objects -> C++
 To be consistent with the original (same code)
 Fewer bugs. Less testing effort (interfaced code may be complex)
 But additional effort necessary… has to be worth it
 To attract new users interested in the additional features.
4
Example of use of Java interface (STELA)
 Example from Celestlab
// Initial date (time scale: TREF)
cjd0 = CL_dat_cal2jd(2018, 11, 16);
// Keplerian mean orbital elements (frame: ECI)
mean_kep0 = [7.e6; 1.e-3; 98*(%pi/180); %pi/2; 0; 0];
// Final dates
cjd = cjd0 + (0:60);
// STELA model parameters (default values)
params = CL_stela_params();
// Propagation
mean_kep = CL_stela_extrap("kep", cjd0, mean_kep0, cjd, params, "m");
// Plot inclination (deg)
scf();
plot(cjd – cjd0, mean_kep(3,:) * (180/%pi));
CL_g_stdaxes();
Structure of model parameters (forces…)
Initial state
Extrapolation dates
Easy to use
Looks like pure Scilab code
5
Numerical integration of orbital motion
 Position = ‫׭‬ σ 𝒂𝒄𝒄𝒆𝒍𝒆𝒓𝒂𝒕𝒊𝒐𝒏
 Several examples in CelestLab using ode
 Rather straightforward, but the computation
of some forces can be very time consuming
=> slow execution
 One possibility: interface functions written
in compiled languages
=> would imply lots of rewriting.
6
// Dynamic model
function [ydot]=fct(t, y)
pos = y(1:3,:);
vel = y(4:6,:);
ydot = zeros(y);
ydot(1:3,:) = vel;
ydot(4:6,:) = CL_fo_centralAcc(pos);
endfunction
// Initial state
t0 = 0;
y0 = [7.e6; 0; 0; 0; 7.e3; 0];
t = (0:180:10000); // time instants (seconds)
// Integration
rtol = 1.e-12 * [1;1;1;1;1;1];
atol = 1.e-6 * [1;1;1;1.e-3;1.e-3;1.e-3];
y = ode(y0, t0, t, rtol, atol, fct);
Other solution: interface Java
 Why Java ?
 Library for flight dynamics software exists (used in future control centers)
 Called Patrius
(in addition: freeware: see https://logiciels.cnes.fr/en)
 Contains lots of features that enable the computation of trajectories
=> Idea: Design an interface for numerical propagation
similar to what already exists for STELA
7
Basic example
 Typical example (from function help)
8
// Initial orbit state (position/velocity, frame: CIRS, time scale: TREF)
cjd0 = CL_dat_cal2cjd(2004, 10, 4);
kep0 = [7.e6; 1.e-3; 98 * (%pi/180); 0; 0; 0];
pv0 = CL_oe_convert("kep", "pv", kep0);
// Epoch of final orbit states
cjd = cjd0 + (0 : 60 : 86400) / 86400;
// Model parameters (default values)
params = ms_orbp_params();
// Propagation
pv = ms_orbp_extrap(cjd0, pv0, cjd, params, "pv");
// Plot osculating semi-major axis and inclination
kep = CL_oe_convert("pv", "kep", pv);
scf();
plot(cjd, kep(1,:) / 1000);
xtitle("Semi major axis (km)");
Similar to STELA example
Looks like pure Scilab code
Easy to use
Features
 Simple interfaces
 Computation of position / velocity / acceleration at selected dates, and also of:
 Jacobian matrix at each date (hypermatrix 6x6xN) :
𝜕𝑝𝑣
𝜕𝑝𝑣0
 Derivative at each date wrt selected parameters (matrix 6xN) :
𝜕𝑝𝑣
𝜕𝑝
=> can be used in more complex applications: orbit adjustment…
Design aspect: Scilab code for the interface: as simple as possible.
As much as possible is done in specific java interface code.
9
Application: Mars – Phobos system
 Mars
 Average distance from the Sun: 1.5 AU
 Radius: about 3400 km
 Phobos :
 One of the 2 satellites of Mars
 Size: 26x22x18 km
 Distance from Mars center:
< 3 Mars radii
 Orbits: QSO (quasi satellite orbits)
around Mars / close to Phobos
10
Typical studies that have been conducted
 Theoretical study of QSOs with simplified model (=> particular properties)
 Comparison with more accurate models
 Adjustment of initial state (least squares)
 Multiple shooting (multiple adjustments on consecutive arcs)
 etc…
11
Illustrations (results)
 Propagation from almost arbitrary initial conditions
12
Inertial frame (km) Rotating frame (km)
Trajectory very sensitive to initial conditions
(yellow dots: collision with Phobos)
Conclusion
 Main points
 Interfacing Java and Scilab is rather easy
 No compiled code => no additional tools needed (compilers…)
 Possible limitation: incompatible Java libraries in javaclasspath
 CNES applications : STELA, numerical extrapolation as well as other simpler
functions :
 Very satisfying results
 Tools have been used in projects under study (Mars – Phobos system, among others)
 We’ll continue in this direction !
13
Annex
 Scilab-Java interface: one remark
 Example :
14
function F()
jimport fr.cnes.xxx.Extrapolation;
jextrapolation = jnewInstance(Extrapolation);
…
jremove(Extrapolation);
jremove(jextrapolation);
endfunction
jremove necessary otherwise: memory leaks…
Very tedious and not safe in case of errors – similar to freeing memory in C
=> Improvements would be worthwhile

More Related Content

What's hot

DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018Scilab
 
INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018Scilab
 
Finite Element Analysis of Solar impulse aircraft
Finite Element Analysis of Solar impulse aircraftFinite Element Analysis of Solar impulse aircraft
Finite Element Analysis of Solar impulse aircraftAdarsh Agrawal
 
Get more from your UAV Imagery
Get more from your UAV ImageryGet more from your UAV Imagery
Get more from your UAV Imagerypcigeomatics
 
ESCAPE Kick-off meeting - KM3Net, Opening a new window on our universe (Feb 2...
ESCAPE Kick-off meeting - KM3Net, Opening a new window on our universe (Feb 2...ESCAPE Kick-off meeting - KM3Net, Opening a new window on our universe (Feb 2...
ESCAPE Kick-off meeting - KM3Net, Opening a new window on our universe (Feb 2...ESCAPE EU
 
Greece kalamata spaceport presentation
Greece kalamata spaceport presentationGreece kalamata spaceport presentation
Greece kalamata spaceport presentationYiannis Kapodistrias
 

What's hot (7)

DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018DLR @ Scilab Conference 2018
DLR @ Scilab Conference 2018
 
INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018INRA @ Scilab Conference 2018
INRA @ Scilab Conference 2018
 
Finite Element Analysis of Solar impulse aircraft
Finite Element Analysis of Solar impulse aircraftFinite Element Analysis of Solar impulse aircraft
Finite Element Analysis of Solar impulse aircraft
 
Get more from your UAV Imagery
Get more from your UAV ImageryGet more from your UAV Imagery
Get more from your UAV Imagery
 
ESCAPE Kick-off meeting - KM3Net, Opening a new window on our universe (Feb 2...
ESCAPE Kick-off meeting - KM3Net, Opening a new window on our universe (Feb 2...ESCAPE Kick-off meeting - KM3Net, Opening a new window on our universe (Feb 2...
ESCAPE Kick-off meeting - KM3Net, Opening a new window on our universe (Feb 2...
 
Greece kalamata spaceport presentation
Greece kalamata spaceport presentationGreece kalamata spaceport presentation
Greece kalamata spaceport presentation
 
20130108 kaptur technical_cs
20130108 kaptur technical_cs20130108 kaptur technical_cs
20130108 kaptur technical_cs
 

Similar to CNES @ Scilab Conference 2018

JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8Rafael Casuso Romate
 
Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Hajime Tazaki
 
SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.Ruslan Shevchenko
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)Pavlo Baron
 
Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2JollyRogers5
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Martin Odersky
 
A Survey of Concurrency Constructs
A Survey of Concurrency ConstructsA Survey of Concurrency Constructs
A Survey of Concurrency ConstructsTed Leung
 
Native interfaces for R
Native interfaces for RNative interfaces for R
Native interfaces for RSeth Falcon
 
Java collections the force awakens
Java collections  the force awakensJava collections  the force awakens
Java collections the force awakensRichardWarburton
 
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go WrongJDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go WrongPROIDEA
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John StevensonJAX London
 
Final Presentation
Final PresentationFinal Presentation
Final PresentationColin Eaton
 
Spark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with SparkSpark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with Sparksamthemonad
 
New features in jdk8 iti
New features in jdk8 itiNew features in jdk8 iti
New features in jdk8 itiAhmed mar3y
 
Introduction to cosmology and numerical cosmology (with the Cactus code) (2/2)
Introduction to cosmology and numerical cosmology (with the Cactus code)  (2/2)Introduction to cosmology and numerical cosmology (with the Cactus code)  (2/2)
Introduction to cosmology and numerical cosmology (with the Cactus code) (2/2)SEENET-MTP
 

Similar to CNES @ Scilab Conference 2018 (20)

JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8JavaScript Editions ES7, ES8 and ES9 vs V8
JavaScript Editions ES7, ES8 and ES9 vs V8
 
Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014Direct Code Execution - LinuxCon Japan 2014
Direct Code Execution - LinuxCon Japan 2014
 
SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.SE 20016 - programming languages landscape.
SE 20016 - programming languages landscape.
 
What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)What can be done with Java, but should better be done with Erlang (@pavlobaron)
What can be done with Java, but should better be done with Erlang (@pavlobaron)
 
Pune Clojure Course Outline
Pune Clojure Course OutlinePune Clojure Course Outline
Pune Clojure Course Outline
 
Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2Intro to Reactive Thinking and RxJava 2
Intro to Reactive Thinking and RxJava 2
 
Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009Scala Talk at FOSDEM 2009
Scala Talk at FOSDEM 2009
 
A Survey of Concurrency Constructs
A Survey of Concurrency ConstructsA Survey of Concurrency Constructs
A Survey of Concurrency Constructs
 
Native interfaces for R
Native interfaces for RNative interfaces for R
Native interfaces for R
 
Java collections the force awakens
Java collections  the force awakensJava collections  the force awakens
Java collections the force awakens
 
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go WrongJDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
JDD 2016 - Grzegorz Rozniecki - Java 8 What Could Possibly Go Wrong
 
Clojure made-simple - John Stevenson
Clojure made-simple - John StevensonClojure made-simple - John Stevenson
Clojure made-simple - John Stevenson
 
Final Presentation
Final PresentationFinal Presentation
Final Presentation
 
Spark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with SparkSpark 4th Meetup Londond - Building a Product with Spark
Spark 4th Meetup Londond - Building a Product with Spark
 
Erlang, an overview
Erlang, an overviewErlang, an overview
Erlang, an overview
 
Presentation alfonso romero
Presentation alfonso romeroPresentation alfonso romero
Presentation alfonso romero
 
New features in jdk8 iti
New features in jdk8 itiNew features in jdk8 iti
New features in jdk8 iti
 
Introduction to cosmology and numerical cosmology (with the Cactus code) (2/2)
Introduction to cosmology and numerical cosmology (with the Cactus code)  (2/2)Introduction to cosmology and numerical cosmology (with the Cactus code)  (2/2)
Introduction to cosmology and numerical cosmology (with the Cactus code) (2/2)
 
SPAA11
SPAA11SPAA11
SPAA11
 
Clojure And Swing
Clojure And SwingClojure And Swing
Clojure And Swing
 

More from Scilab

Electric motor optimization
Electric motor optimizationElectric motor optimization
Electric motor optimizationScilab
 
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...Scilab
 
X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...Scilab
 
Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3Scilab
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab
 
Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1Scilab
 
Multiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in ScilabMultiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in ScilabScilab
 
Scilab optimization workshop
Scilab optimization workshop Scilab optimization workshop
Scilab optimization workshop Scilab
 
Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018Scilab
 
Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018Scilab
 
Scilab Conference 2018 - Welcome to the Community
Scilab Conference 2018 - Welcome to the CommunityScilab Conference 2018 - Welcome to the Community
Scilab Conference 2018 - Welcome to the CommunityScilab
 
Customizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and PaletteCustomizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and PaletteScilab
 
Scilab/Xcos pour l'enseignement des sciences de l'ingénieur
Scilab/Xcos pour l'enseignement des sciences de l'ingénieurScilab/Xcos pour l'enseignement des sciences de l'ingénieur
Scilab/Xcos pour l'enseignement des sciences de l'ingénieurScilab
 
Scilab pour l'enseignement des mathématiques
Scilab pour l'enseignement des mathématiquesScilab pour l'enseignement des mathématiques
Scilab pour l'enseignement des mathématiquesScilab
 
Optimization in scilab
Optimization in scilabOptimization in scilab
Optimization in scilabScilab
 
Introduction to Discrete Probabilities with Scilab - Michaël Baudin, Consort...
Introduction to Discrete Probabilities with Scilab - Michaël Baudin, Consort...Introduction to Discrete Probabilities with Scilab - Michaël Baudin, Consort...
Introduction to Discrete Probabilities with Scilab - Michaël Baudin, Consort...Scilab
 
Scilab is not naive
Scilab is not naiveScilab is not naive
Scilab is not naiveScilab
 
Xcos pour débutants
Xcos pour débutantsXcos pour débutants
Xcos pour débutantsScilab
 
Scilab debutant
Scilab debutantScilab debutant
Scilab debutantScilab
 
Xcos for beginners
Xcos for beginnersXcos for beginners
Xcos for beginnersScilab
 

More from Scilab (20)

Electric motor optimization
Electric motor optimizationElectric motor optimization
Electric motor optimization
 
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
Faster Time to Market using Scilab/XCOS/X2C for motor control algorithm devel...
 
X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...X2C -a tool for model-based control development and automated code generation...
X2C -a tool for model-based control development and automated code generation...
 
Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3Scilab for real dummies j.heikell - part3
Scilab for real dummies j.heikell - part3
 
Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2Scilab for real dummies j.heikell - part 2
Scilab for real dummies j.heikell - part 2
 
Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1Scilab for real dummies j.heikell - part 1
Scilab for real dummies j.heikell - part 1
 
Multiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in ScilabMultiobjective optimization and Genetic algorithms in Scilab
Multiobjective optimization and Genetic algorithms in Scilab
 
Scilab optimization workshop
Scilab optimization workshop Scilab optimization workshop
Scilab optimization workshop
 
Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018Sanofi @ Scilab Conference 2018
Sanofi @ Scilab Conference 2018
 
Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018Fraunhofer IIS @ Scilab Conference 2018
Fraunhofer IIS @ Scilab Conference 2018
 
Scilab Conference 2018 - Welcome to the Community
Scilab Conference 2018 - Welcome to the CommunityScilab Conference 2018 - Welcome to the Community
Scilab Conference 2018 - Welcome to the Community
 
Customizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and PaletteCustomizing Xcos with new Blocks and Palette
Customizing Xcos with new Blocks and Palette
 
Scilab/Xcos pour l'enseignement des sciences de l'ingénieur
Scilab/Xcos pour l'enseignement des sciences de l'ingénieurScilab/Xcos pour l'enseignement des sciences de l'ingénieur
Scilab/Xcos pour l'enseignement des sciences de l'ingénieur
 
Scilab pour l'enseignement des mathématiques
Scilab pour l'enseignement des mathématiquesScilab pour l'enseignement des mathématiques
Scilab pour l'enseignement des mathématiques
 
Optimization in scilab
Optimization in scilabOptimization in scilab
Optimization in scilab
 
Introduction to Discrete Probabilities with Scilab - Michaël Baudin, Consort...
Introduction to Discrete Probabilities with Scilab - Michaël Baudin, Consort...Introduction to Discrete Probabilities with Scilab - Michaël Baudin, Consort...
Introduction to Discrete Probabilities with Scilab - Michaël Baudin, Consort...
 
Scilab is not naive
Scilab is not naiveScilab is not naive
Scilab is not naive
 
Xcos pour débutants
Xcos pour débutantsXcos pour débutants
Xcos pour débutants
 
Scilab debutant
Scilab debutantScilab debutant
Scilab debutant
 
Xcos for beginners
Xcos for beginnersXcos for beginners
Xcos for beginners
 

Recently uploaded

Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024innovationoecd
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxMurugaveni B
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPirithiRaju
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentationtahreemzahra82
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Nistarini College, Purulia (W.B) India
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptArshadWarsi13
 
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...lizamodels9
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsssuserddc89b
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxmalonesandreagweneth
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)DHURKADEVIBASKAR
 
Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2John Carlo Rollon
 
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)riyaescorts54
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxkessiyaTpeter
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫qfactory1
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxBerniceCayabyab1
 

Recently uploaded (20)

Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdf
 
OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentation
 
Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...Bentham & Hooker's Classification. along with the merits and demerits of the ...
Bentham & Hooker's Classification. along with the merits and demerits of the ...
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.ppt
 
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
Best Call Girls In Sector 29 Gurgaon❤️8860477959 EscorTs Service In 24/7 Delh...
 
TOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physicsTOPIC 8 Temperature and Heat.pdf physics
TOPIC 8 Temperature and Heat.pdf physics
 
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptxLIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
LIGHT-PHENOMENA-BY-CABUALDIONALDOPANOGANCADIENTE-CONDEZA (1).pptx
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)
 
Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2Evidences of Evolution General Biology 2
Evidences of Evolution General Biology 2
 
Volatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -IVolatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -I
 
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
(9818099198) Call Girls In Noida Sector 14 (NOIDA ESCORTS)
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
 
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptxSOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
SOLUBLE PATTERN RECOGNITION RECEPTORS.pptx
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫Manassas R - Parkside Middle School 🌎🏫
Manassas R - Parkside Middle School 🌎🏫
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptxGenBio2 - Lesson 1 - Introduction to Genetics.pptx
GenBio2 - Lesson 1 - Introduction to Genetics.pptx
 

CNES @ Scilab Conference 2018

  • 1. Interfacing Java for orbit propagation Application to orbits in the Mars-Phobos system Alain Lamy CNES - DSO/DV/IF Scilab Conference 20 November 2018
  • 2. Context / background  Scilab has been used at CNES for many years, in particular for spaceflight dynamics mission analysis  CNES Contribution: CelestLab (available on https://atoms.scilab.org) + CelestLabX (extension)  First version: end of 2009. Updated end of october 2018  Contents:  CelestLab: pure Scilab code – main user interface  CelestLabX: internal functions called by CelestLab (C and java interfaces)  Other libraries / tools used at CNES with interfaces with Fortran, C and Java languages 2
  • 3. CelestLab / CelestLabX – illustrations 3 Help, demos, examples, cookbook…
  • 4. Why interfacing with other languages ?  For efficiency reasons  To make existing software available. Examples (CelestLabX):  STELA: long-term orbit propagation -> Java  TLEs: orbit data / model for propagation of various space objects -> C++  To be consistent with the original (same code)  Fewer bugs. Less testing effort (interfaced code may be complex)  But additional effort necessary… has to be worth it  To attract new users interested in the additional features. 4
  • 5. Example of use of Java interface (STELA)  Example from Celestlab // Initial date (time scale: TREF) cjd0 = CL_dat_cal2jd(2018, 11, 16); // Keplerian mean orbital elements (frame: ECI) mean_kep0 = [7.e6; 1.e-3; 98*(%pi/180); %pi/2; 0; 0]; // Final dates cjd = cjd0 + (0:60); // STELA model parameters (default values) params = CL_stela_params(); // Propagation mean_kep = CL_stela_extrap("kep", cjd0, mean_kep0, cjd, params, "m"); // Plot inclination (deg) scf(); plot(cjd – cjd0, mean_kep(3,:) * (180/%pi)); CL_g_stdaxes(); Structure of model parameters (forces…) Initial state Extrapolation dates Easy to use Looks like pure Scilab code 5
  • 6. Numerical integration of orbital motion  Position = ‫׭‬ σ 𝒂𝒄𝒄𝒆𝒍𝒆𝒓𝒂𝒕𝒊𝒐𝒏  Several examples in CelestLab using ode  Rather straightforward, but the computation of some forces can be very time consuming => slow execution  One possibility: interface functions written in compiled languages => would imply lots of rewriting. 6 // Dynamic model function [ydot]=fct(t, y) pos = y(1:3,:); vel = y(4:6,:); ydot = zeros(y); ydot(1:3,:) = vel; ydot(4:6,:) = CL_fo_centralAcc(pos); endfunction // Initial state t0 = 0; y0 = [7.e6; 0; 0; 0; 7.e3; 0]; t = (0:180:10000); // time instants (seconds) // Integration rtol = 1.e-12 * [1;1;1;1;1;1]; atol = 1.e-6 * [1;1;1;1.e-3;1.e-3;1.e-3]; y = ode(y0, t0, t, rtol, atol, fct);
  • 7. Other solution: interface Java  Why Java ?  Library for flight dynamics software exists (used in future control centers)  Called Patrius (in addition: freeware: see https://logiciels.cnes.fr/en)  Contains lots of features that enable the computation of trajectories => Idea: Design an interface for numerical propagation similar to what already exists for STELA 7
  • 8. Basic example  Typical example (from function help) 8 // Initial orbit state (position/velocity, frame: CIRS, time scale: TREF) cjd0 = CL_dat_cal2cjd(2004, 10, 4); kep0 = [7.e6; 1.e-3; 98 * (%pi/180); 0; 0; 0]; pv0 = CL_oe_convert("kep", "pv", kep0); // Epoch of final orbit states cjd = cjd0 + (0 : 60 : 86400) / 86400; // Model parameters (default values) params = ms_orbp_params(); // Propagation pv = ms_orbp_extrap(cjd0, pv0, cjd, params, "pv"); // Plot osculating semi-major axis and inclination kep = CL_oe_convert("pv", "kep", pv); scf(); plot(cjd, kep(1,:) / 1000); xtitle("Semi major axis (km)"); Similar to STELA example Looks like pure Scilab code Easy to use
  • 9. Features  Simple interfaces  Computation of position / velocity / acceleration at selected dates, and also of:  Jacobian matrix at each date (hypermatrix 6x6xN) : 𝜕𝑝𝑣 𝜕𝑝𝑣0  Derivative at each date wrt selected parameters (matrix 6xN) : 𝜕𝑝𝑣 𝜕𝑝 => can be used in more complex applications: orbit adjustment… Design aspect: Scilab code for the interface: as simple as possible. As much as possible is done in specific java interface code. 9
  • 10. Application: Mars – Phobos system  Mars  Average distance from the Sun: 1.5 AU  Radius: about 3400 km  Phobos :  One of the 2 satellites of Mars  Size: 26x22x18 km  Distance from Mars center: < 3 Mars radii  Orbits: QSO (quasi satellite orbits) around Mars / close to Phobos 10
  • 11. Typical studies that have been conducted  Theoretical study of QSOs with simplified model (=> particular properties)  Comparison with more accurate models  Adjustment of initial state (least squares)  Multiple shooting (multiple adjustments on consecutive arcs)  etc… 11
  • 12. Illustrations (results)  Propagation from almost arbitrary initial conditions 12 Inertial frame (km) Rotating frame (km) Trajectory very sensitive to initial conditions (yellow dots: collision with Phobos)
  • 13. Conclusion  Main points  Interfacing Java and Scilab is rather easy  No compiled code => no additional tools needed (compilers…)  Possible limitation: incompatible Java libraries in javaclasspath  CNES applications : STELA, numerical extrapolation as well as other simpler functions :  Very satisfying results  Tools have been used in projects under study (Mars – Phobos system, among others)  We’ll continue in this direction ! 13
  • 14. Annex  Scilab-Java interface: one remark  Example : 14 function F() jimport fr.cnes.xxx.Extrapolation; jextrapolation = jnewInstance(Extrapolation); … jremove(Extrapolation); jremove(jextrapolation); endfunction jremove necessary otherwise: memory leaks… Very tedious and not safe in case of errors – similar to freeing memory in C => Improvements would be worthwhile