***********************************************************************************
CelestLab - CNES Space mechanics toolbox for Scilab 
Version 3.0.0			     
***********************************************************************************


Overview of CelestLab 3.0.0
---------------------------
This version includes major improvements and a few changes. 
It is therefore not fully compatible with CelestLab 2.4.2, but only little changes
are necessary to make old scripts work. 


Among the new features: 
- Many new reference frames (IERS 2010 conventions)
- New models for the ephemerides of solar system main bodies (MEEUS, VSOP87, ELP, DE405)
- Force + potential functions including for the full gravity model up to degree/order 70 
  (potential defined by spherical harmonics)
- Extended definition of orbital elements (now 2 new types for equinoctial elements)
- IAU planetary angles (orientation of equator and prime meridian)
- New propagation model based on Lyddane (mean elements include secular and long period perturbation effects)
- Many new utility functions: Gauss for all orbital element types, conversion of time scales, etc... 
- Magnetic field added (IGRF model).. 

Changes regarding predefined data: 
- No local variables are now created by default (except one for internal use). 
The function CL_init is still available, but it now only creates a limited set of variables. 
Internal data may be retrieved by a new function: CL_dataGet. 
There have been some changes to improve consistency and simplicity: some redundant variables have been 
removed (e.g. %CL_j2, ...) or renamed (e.g. %CL_muSun is replaced by: %CL_body.Sun.mu). 
- Some data have been updated. Gravity data (zonal terms) are now those from EGM96s gravity model. 
The default oblateness value is consistent with WGS84. 

- All date/time function arguments are now relative to a specific time scale called "TREF". 
Two new reference frames adapted to mission analysis are defined: "ECI" (nearly inertial frame) 
and "ECF" (rotating frame).  
 
- Documentation has been extended with new pages describing various topics (ephemerides, forces...). 
It also includes a section named "cookbook" where various complete examples are given. 

- Configuration features have been added for high level properties. 

- CelestLab v3.0.0 can be used with Scilab version 5.3.0 or higher. 


Summary of data changes versus 2.4.2
------------------------------------
Note that as of v3.0.0, the variables %CL_xxx must be created explicitly by CL_init(). 

1) No change: 
%CL_au, %CL_deg2rad, %CL_eqRad, %CL_j1jn, %CL_mu, %CL_obla, %CL_rad2deg

2) New Names:
%CL_rotrEarth => %CL_rotrBody
%CL_rotrEarthSun => %CL_rotrBodySun
%CL_planetC => %CL_body

3) New ways to access data:
%CL_muMoon => %CL_body.Moon.mu
%CL_muSun => %CL_body.Sun.mu
%CL_radiusMoon => %CL_body.Moon.eqRad
%CL_radiusSun => %CL_body.Sun.eqRad
%CL_earthRadius => %CL_body.Earth.eqRad

4) Removed variables because of multiple definitions:
%CL_j2, %CL_j3, ... %CL_j6
=> Now use: %CL_j1jn(2), %CL_j1jn(3), ...

5) No explicit creation: 
%CL_g0, %CL_gravCst, %CL_lightSpeed, %CL_criticalInc1, %CL_criticalInc2
=> Now Use: CL_dataGet("g0"), CL_dataGet("gravCst") ...

6) No explicit creation / new names 
%CL_TAI_UTC, %CL_epsilon
=> Now Use: CL_dataGet("%CL_TAI_UTC_DATA"), CL_dataGet("epsOrb")
(accessing these data should not be necessary)

7) Removed data 
%CL_obliquity2000
=> No equivalent data in V3.0.0 


***********************************************************************************
Detailed changelog:
***********************************************************************************

New functions
-------------
- Frame conversion functions compliant with IERS2010 conventions: 
  CL_fr_convert, CL_fr_convertMat, CL_mod_siderealTime
- Utility functions to simplify frame conversions :
  CL_rot_pvConvert, CL_rot_pvJacobian, CL_rot_compose
- Models for ephemerides computation:
  CL_eph_moon, CL_eph_sun, CL_eph_planet, CL_eph_de405
- Forces and potential: CL_fo_xxx
- Magnetic field: CL_mod_geomagField
- Gauss equations: CL_op_gauss
- Solar system bodies frames (IAU2009):
  CL_mod_IAUBodyAngles, CL_fr_bodyConvert, CL_fr_bodyConvertMat
- New orbital elements: "equin", "cireq", "pv"
  CL_oe_equin2car, CL_oe_car2equin, CL_oe_equin2kep, CL_oe_kep2equin 
  CL_oe_cireq2car, CL_oe_car2cireq, CL_oe_cireq2kep, CL_oe_kep2cireq
- Generic function to convert orbital elements: CL_oe_convert
- New analytical propagation model: CL_ex_lyddaneLp , CL_ex_meanLyddaneLp
  (the mean elements for this model include secular and long period effects.)
- Generic function for analytical propagation: CL_ex_propagate / CL_ex_meanElem
- New time scales: CL_dat_tcb2tdb, CL_dat_tdb2tcb
- Generic function to convert dates and time scales: CL_dat_convert, CL_dat_scaleConvert
- Interpolation in quaternions: CL_rot_interpQuat
- Visibility: CL_gm_stationVisiLocus, CL_gm_stationPointing
- Relative motion: CL_cw_propagate, CL_cw_propagateMan, CL_cw_lambert
- Mathematical functions: 
  CL_chebyshevEval, CL_chebyshevPoly, CL_legendrePoly, CL_quantile,
  CL_sphHarmVal, CL_sphHarmGrad, CL_fsolveb,
  CL_unMod, CL_mean, CL_interpLin
- Utility functions: 
  CL_version, CL_dataGet, CL_configGet, CL_configSet,
  CL_hms2sec, CL_sec2hms, CL_deg2sdms, CL_sdms2deg,
  CL_dat_cal2str, CL_dat_str2cal, CL_dat_now, CL_sortMat,
  CL_getEarthMap
- CL_ev_visibilityExtr in replacement of CL_ev_visibility
- CL_op_locTime in replacement of CL_op_locTimeG50
- CL_rot_angVelocity in replacement of CL_rot_angularVelocity
- Convenience function: CL_mod_atmUS76Density


Improved/changed functions
--------------------------
- CL_rot_quat2axAng: The returned angle is now in [-pi, pi]. (previously in [0,2pi])
- CL_rot_quat2matrix, CL_rot_matrix2quat: Addition argument: derivative of quaternion
- CL_inputParam, CL_defParam:  New types of input accepted: string and calendar format
- CL_unitConvert: 3 calling sequences are now accepted.     
  If units do not exist, the function returns an error (used to return [])
- CL_dat_cal2cjd: Input arguments year month day hour minute second can now be row vectors or scalar.
- CL_gm_eclipse: The argument of latitude (aol) of the end of eclipse is now always superior to 
  the aol of the beginning of eclipse.
- CL_kp_M2E: New algorithm. Faster and works better for eccentricities close to 1.
  New function is usable for any eccentricity except exactly 1.
- CL_kp_M2Ecir: Use CL_kp_M2E internally. New function is now usable for any eccentricity below 1.  
- Functions CL_oe_xxx: All functions have been recoded. Not computable terms are set to %nan (an error was returned previously)
- CL_co_car2sph, CL_co_sph2car: Argument vel_sph renamed in pos_sph_dot.
  New calling sequences available (to retrieve a 3x3 jacobian for example)
- CL_oe_car2kep, CL_oe_kep2car: Parabolic orbits not handled anymore.
  Reason: The first parameter of parabolic orbits is the semi-lactus rectum p, not the semi-major axis.
- Optional argument "zonals" has been renamed to "j1jn". Impacted functions:
  CL_op_frozenOrbit, CL_op_frozenOrbitDer, CL_ex_eckHech, CL_ex_eckHechInfos, CL_ex_meanEckHech,
  CL_ex_lyddane, CL_ex_lyddaneInfos, CL_ex_lyddaneMan, CL_ex_meanLyddane
- CL_graduate: Better results
- CL_integrate: New (more precise) methods added
- CL_interpLagrange: Additional output argument returned (values of interpolating polynomials derivatives)
- CL_lambert: Algorithm is now faster and more robust. 
- CL_path: The function can now search for files recursively in sub-directories 


New demos
---------
- Frame conversion utility
- Geoid
- Solar system 1
- Solar system 2
- Geomagnetic field


Miscellaneous
-------------
- New functionnality: CelestLab configuration (preferences).
- The CelestLab menu has been extended. 
  - New item: "Edit configuration file":
    It is now possible to edit the configuration file. 
    The structure of the configuration file has also been modified. 
  - New item: "About CelesLab"
- A CelestLab banner is displayed when CelestLab is loaded.



Bugs fixed  
----------
- CL_kp_M2E: A bug could happen when input arguments were matrices (PxN)
- CL_mod_polarMotionMatrix: the returned matrix was incorrect (wrong order for xp,yp).
- CL_ex_meanEckHech: sometimes, there was no convergence if initial argument of latitude
         was not in [0, 2*pi].
- CL_co_car2sph: problem in the vectorisation of the computation of the jacobian (/ instead of ./)
- CL_ex_lyddane: Small correction of the effect of J5 (model for the osculating elements)
- CL_ex_lyddane: Correction of a vectorization error. 


Data
----
- The way data are handled in CelestLab has been modified:
  CL_init() is now mandatory in order to create variables (%CL_xxx) in the local environment. 
  (only 13 most commonly used "constants" are loaded)
- The rest of the data is available via the function CL_dataGet. 
  Example: muSun = CL_dataGet("body.Sun.mu")
- The directories containing data has been reorganized. (new sub-directories created)
- %CL_TAI_UTC renamed to %CL_TAI_UTC_DATA
- New time data: %CL_TAI_UTC, %CL_TT_TAI, %CL_TT_REF, %CL_UT1_TREF
- New solar radiation pressure data: %CL_totalSolarIrradiance
- Some values have been upgraded to be consitent with IAU2009 standards :
  gravitation constants of planetes+satellites (barycentre), %CL_au, %CL_gravCst
- New gravity model data: EGM96s (70x70)
- %CL_j1jn updated to EGM96s values
- %CL_j2 removed. %CL_j1jn(2) should be used instead. 
- Same for: %CL_j3, %CL_j4, %CL_j5, %CL_j6. 
- %CL_obliquity2000 removed. 
- %CL_rotrEarth and %CL_rotrEarthSun renamed into %CL_rotrBody and %CL_rotrBodySun
- %CL_rotrBody and %CL_rotrBodySun depend on the configuration setting (preferences)
  (different values if ECI=Veis or ECI=CIRS)
- %CL_planetC replaced by %CL_body
- %CL_muSun, %CL_radiusSun, %CL_muMoon, %CL_radiusMoon removed, use %CL_body.<body>.<var>.


Documentation
-------------
- The documentation of CelestLab ("Introduction" section) has been updated with lots of new 
  contents: Flight dynamics details, cookbook, etc...


Deprecated functions 
--------------------
Many deprecated functions. 
Functions become deprecated because they can be replaced by new ones, or sometimes because
they are considered as badly designed and/or not very useful. 
The deprecated functions can still be used, but be aware that they will be removed one day. 
The whole list is: 
- CL_rot_angularVelocity (use CL_rot_angVelocity)
- CL_dat_cal2jd, CL_dat_cjd2jd, CL_dat_cjd2mjd, CL_dat_jd2cal
  CL_dat_jd2cjd, CL_dat_mjd2cjd (use CL_dat_convert)
- CL_fr_G502J2000, CL_fr_G502J2000Mat, CL_fr_G502ter, CL_fr_G502terMat
  CL_fr_H0n2J2000Mat, CL_fr_J20002G50, CL_fr_J20002ter, CL_fr_ter2G50
  CL_fr_ter2J2000, CL_fr_ter2J2000Mat (use CL_fr_convert) 
- CL_oe_car2cirEqua, CL_oe_cirEqua2car, CL_oe_cirEqua2kep, CL_oe_kep2cirEqua 
  (use new orbital elements "cireq" or "equin")
- CL_mod_equinoxesEquation, CL_mod_meanObliquity, CL_mod_nutationAngles
  CL_mod_nutationArg, CL_mod_nutationMatrix, CL_mod_polarMotionMatrix
  CL_mod_precessionAngles, CL_mod_precessionMatrix, CL_mod_sidTime, 
  CL_mod_sidTimeG50
- CL_ev_visibility (use CL_ev_visibilityExtr)
- CL_gm_stationElevation (use CL_gm_stationPointing)
- CL_op_locTimeG50 (use CL_op_locTime)
- CL_mod_moonSunG50, CL_mod_planetsG50ecl 
  (use CL_eph_moon, CL_eph_sun, CL_eph_planet or CL_eph_de405)
- CL_mod_expDensity, CL_mod_expDensityDrag, CL_cw_diffDrag
- CL_fr_ter2topoN et CL_fr_topoN2ter
- CL_matSort (use CL_sortMat)
- CL_cw_twoImpulse (use CL_cw_lambert), CL_cw_impulPropa, CL_cw_contPropa, 
  CL_cw_ballisticPropa (use CL_cw_propagate or CL_cw_propagateMan)

  