***********************************************************************************
CelestLab - CNES Space mechanics toolbox for Scilab - Detailed Changelog
***********************************************************************************

====================================
Version 2.4.2 - July 27, 2012			  
====================================
- One bug fixed in CL_rot_quat2axAng (which sometimes returned a wrong rotation angle). 
- One new demo (in the "relative motion" section). 
- Improvement/adaptation of the functions: CL_rot_quat2axAng, CL_rot_axAng2quat, CL_rot_quatSlerp. 
- The CelestLab menu has been extended. 


Bugs fixed  
----------
- CL_rot_quat2axAng: the rotation angle was sometimes incorrect (for angles > 180 deg). 

Improved/changed functions
--------------------------
- CL_rot_quat2axAng, CL_rot_axAng2quat: 
  The convention for undefined axes (identity quaternion) has changed: 
  instead of returning [%nan;%nan;%nan] CL_rot_quat2axAng now returns [0;0;0]. 
  This is more consistent with the way %nan is handled in CelestLab, and also 
  with CL_rot_axAng2quat which accepted [0;0;0] as input in practice. 
  The rotation angle returned by CL_rot_quat2axAng is now in [0, pi]. 

- CL_rot_quatSlerp: code has been simplified. 
  
New demos
---------
- Enforced linear relative motion

Miscellaneous
-------------
- The CelestLab menu has been extended. It is now possible to edit the data files
that contain the values of CelestLab predefined variables. 



====================================
Version 2.4.1 - July 20, 2012			  
====================================
- A few minor changes, mostly the update of the detailed changelog 
  that was not exact. 
- 2 new demos (relative motion and Hohmann <-> continuous thrust)
- Improvement of the functions: CL_cw_Mmatrix and CL_cw_Nmatrix


Improved functions
------------------
- CL_cw_Mmatrix, CL_cw_Nmatrix 

New demos
---------
- Continuous versus Hohmann
- Keplerian relative motion



====================================
Version 2.4.0 - July 10, 2012			  
====================================
This version is a "minor" version that includes a few improvements.  
The main features (in comparison with 2.3.0) are: 
- 11 new functions:
- 7 new demos
- A few bugs fixed
- A total of 16 functions are now deprecated.  


New functions
-------------
- New maneuver functions (old maneuver functions are now deprecated)
  CL_man_applyDvKep, CL_man_dvApsidesLine, CL_man_dvBiElliptic, CL_man_dvHohmann, 
  CL_man_dvHohmannG, CL_man_dvIncRaanCirc, CL_man_dvInc, CL_man_dvSma
  => deltav (sum of  norms) is now always returned as 1st argument
  => velocity increments are in cartesian coordinates
- CL_gm_orbSphTriangle
- CL_op_equatorialSwath
- CL_integrate
- CL_home (see below)

Improved functions
------------------
- CL_rot_angles2quat, CL_rot_angles2matrix: now accepts an unlimited number of
  successive rotations (previously limited to 1,2 or 3 rotations)
- CL_plot_earthMap, CL_locationInfo: data is now stored in a binary files
 (previously stored as ASCII files). 
  The loading time is shorter and files are smaller.
- CL_unitConvert: addition of 3 news units : arcmin, arcsec, mas (=milli arcsec)
- CL_dat_utc2tai, CL_dat_tai2utc: Code rewritten. It is now more rigourous and
  faster. 
- CL_rot_angles2quat, CL_rot_axAng2quat, CL_rot_matrix2quat: empty input
  arguments are now correctly handled.
- CL_g_stdaxes: The size of the font is now proportional to the size of the
  figure by default.
- Overloading of quaternions: Implicit size operator (ex: 2:$) is now handled.
- The code of a few functions has been simplified and improved (CL_kp_xxx, 
  CL_ip_xxx, CL_op_raan2beta,...). 
- CL_op_raan2beta, CL_op_beta2raan: in some cases %nan is now returned (before:
  an error was raised).    

Bugs fixed  
----------
- CL_rot_angularVelocity: Depending on the rotation sequence, the angular
  velocity vector could be incorrect.
  The convention for the angular velocity vector returned is now clearly
  documented.
- CL_fr_J20002ter,CL_fr_ter2J2000: The velocity and jacobian computation was 
  not correct (due to the bug above). The effects were small in practice 
  (effect of precession and nutation on velocity). 
- CL_man_hohmannG: The tue anomaly of the first maneuver was sometimes erroneous.
- CL_man_inclination: The computed DV with option=0 was not always the optimal DV.
- CL_man_lambert: If the case positions are aligned, the function now returns %nan
  (before, there was a "division by zero"). 
- CL_ex_lyddaneInfos: Optional arguments were not taken into account.

Interface changes
-----------------
- CL_fr_ter2topoN,CL_fr_topoN2ter: argument "obl" replaced by "obla". but obl
  is still possible. 
- The argument "conv" in a few frame conversion functions has been replaced by
 "conv_iers", because
  conv is a reserved keywork in scilab 5.4. But this has little impact as only
  one option is possible in practice. 

Data
----
- Most recent leap second added in TAI_UTC.scd file. From July 1st 2012, 0h:
  TAI-UTC = 35 seconds. 
  NB: Two functions (CL_dat_utc2tai and CL_dat_tai2utc) use these data. See also
  CL_init(). 
  
New demos
---------
- Sun elevation on Earth
- Satellite local time
- Solar zenith angle 1
- Solar zenith angle 2
- Cost of inclination change - circular
- Cost of inclination change - elliptical 1
- Cost of inclination change - elliptical 2

Documentation
-------------
- Some functions from the "Utilities" folder have been moved to a new folder: 
  "Math". 
- The CelestLab overview help page now contains links to external pages about 
  CelestLab. 

Deprecated functions 
(will generate a warning message in CelestLab v3.x,
 and will be permanently deleted in CelestLab v4.0)
--------------------
- CL_man_applyDv, CL_man_apsidesLine, CL_man_biElliptic, CL_man_hohmann, 
  CL_man_hohmannG, CL_man_incRaanCirc, CL_man_inclination, CL_man_sma
  (use new maneuver functions instead)
- CL_gm_lat2loctime, CL_gm_locSolTime (use CL_gm_orbSphTriangle instead)
- CL_gm_equatorialSwath, CL_gm_equatorialOverlap (use CL_op_equatorialSwath
  instead)
- CL_colNorm, CL_colMult (use CL_norm and CL_dMult instead)
- CL_rot_eul2quat, CL_rot_quat2eul (use CL_rot_angles2quat and CL_rot_quat2angles
  instead)

Internals
---------
- All the internal global variables have been replaced by one unique variable
  (structure): %CL__PRIV. 
  NB: %CL__PRIV is a "private" variable, supposed to be accessed by CelestLab
  functions only. 
- The variable %CL_home has been removed. It has been replaced by a new function:
  CL_home(). 



====================================
Version 2.3.0 - January 31, 2012			  
====================================
- 10 new functions: 
- A few bug fixed (one major in CL_fr_locOrbMat) 
- A few functions improved 


New functions
-------------
- CL_gm_inters3dLineEllips, CL_gm_inters3dConeSa.
- CL_op_shortPeriodsJ2Circ.
- CL_ex_eckHechInfos, CL_ex_lyddaneInfos.
- CL_oe_cir2kep, CL_oe_kep2cir.
- CL_interpLagrange, CL_ev_visibilityEph.
- CL_intervDiff.
 
 
Improved functions
------------------
- CL_rot_quat2axAng: now has a better accuracy for quaternions almost equal to identity.
- CL_matSort: now accepts [] as input argument.
- CL_intervUnion: intervals of zero length are now deleted.
- CL_ex_eckHech: initial version did not allow for perfectly frozen orbits.
                 (oscillation of second order of magnitude of 4.e-7 on mean ex)
                 A correction of 4.e-7 on mean ex has been applied. 
				 Note that the present version is not the "standard" version. 
- Quaternions: q*a and q/a  now work if: 
                1) a = scalar and dim(q) = whatever
                2) a = row vector and dim(q) = 1
- CL_op_frozenOrbitDer : now returns %nan for dpom/dt if the result is undefined (ecc = 0 or inc = 0 or pi)
- CL_g_legend : now has a similar interface as scilab function "legend" (1st argument = axes or array of handles)
- CL_g_select : now accept an arry of handles as first argument
- CL_plot_earthMap, CL_plot_ephem: now more efficient (only one call to "plot")
- Help pages about orbital elements and description of jacobians improved.


Bugs fixed  
----------
- CL_fr_locOrbMat: The matrix was not always correct.  
- CL_rot_matrix2quat: conversion of a matrix close to identity could sometimes fail.
- CL_gm_stationElevation: numerical accuracy improved.
- CL_intervInters: code simplified and now safer. 
- CL_intervInv: Documentation updated (it was not correct). The function now doesn't return intervals of zero length or outside range.
- CL_g_tag, CL_g_select: now works with more types of objects, including uimenu.
- CL_oe_car2kep: Correction in the case of a zero inclination (elliptical orbits). The right ascension of the ascending node was incorrectly initialized. Now it is set to 0. 
- Compilation of the help files was failing on Linux (case sensitivity). 



====================================
Version 2.2.0 - July 27, 2011
====================================
- 9 new functions: 
- 7 new demos
- Several functions improved (performance, simplicity of code)
- A few bugs fixed
- 2 deprecated functions


New functions
-------------
- CL_gm_reflectionPtSph, CL_gm_eclipse, CL_gm_eclipseCheck.
- CL_rot_angles2quat, CL_rot_matrix2angles, CL_rot_quat2angles, CL_rot_defRot1ax, CL_rot_defRot2ax.
- CL_locationInfo.
 
 
Improved functions
------------------
- CL_op_frozenOrbit: algorithm simplified and performance improved.
- Quaternions: rewrite of all overloading functions. Operations : q1 <op> q2, with 
  op = +, -, *, /, etc... work even if the arguments don't have the same size 
  (i.e. one of the argument has size 1). Nearly all operations work with empty 
  quaternions.  
- CL_plot_earthMap: addition of a higher resolution map, and possibility to use elliptical or spherical coordinates.
- CL_gm_betaEclipse: now handles elliptical orbits.
- CL_rot_defRotVec: algorithm simplified and performance improved.
- CL_rot_defFrameVec: can now return a matrix or a quaternion.
  Warning: CL_rot_defFrameVec(u, n1) is now forbidden. Use CL_rot_defFrameVec(u,u,n1,n1) instead.
- CL_3b_environment: added Sun-Jupiter.
- CL_op_rarp2ae, CL_op_rpvp2ae, CL_op_rava2ae, CL_op_rpvinf2ae: better arguments handling
  

New demos
-------------
- Sun and Moon Directions.
- Moon phases.
- Cost of RAAN drift rate change.
- Sun glint.
- Drifts due to J2.
- Image of vector by 2 rotations.
- Cost of perigee/apogee altitude change.


Bugs fixed  
----------
- CL_op_repeat2smaInc: function could sometimes return an error (instead of %nan) when there was no solution.
- CL_rot_quat2eul, CL_rot_eul2quat: erroneous results (fixed). These functions are now deprecated. Use CL_rot_quat2angles, CL_rot_angles2quat.
- CL_op_frozenOrbitDer: erroneous results (fixed).
- CL_rot_angularVelocity: a bug could occur if the user had modified the format.
- CL_op_frozenOrbit: eccentricity could be negative in some cases.


Deprecated functions 
--------------------
- CL_rot_quat2eul
- CL_rot_eul2quat



====================================
Version 2.1.1 - January 6, 2011				  
====================================
- Correction of 2 demos
- 1 (minor) bug fixed

Changes
-------
- Corrections of 2 demos (Ground_stations_visibility.sce and Repeating_ground_tracks_2.sce)
  that did not work when CelestLab was loaded via ATOMS 
  (some CelestLab data were not initialized) 
- Minor bug fixed in CL_op_repeat2smaInc: test on eccentricity did not assume vectors



====================================
Version 2.1.0 - December 22, 2010
====================================
Changes:
- 4 New functions
- A few bugs fixed
- Several functions improved (performance, simplicity of code)
- Celestlab predefined data are now loaded from files (see CL_init) 


New functions
-------------
- CL_path
- CL_dMult (CL_colMult is now deprecated, use CL_dMult)
- CL_rot_defRotVec
- CL_rot_defFrameVec


Functions improved 
------------------
- CL_ex_meanEckHeck, CL_ex_meanLyddane: simplified code, improved accuracy.
- CL_ex_lyddane, CL_ex_eckHech, CL_ex_secularJ2: output angles are now "continuous" (no modulo 2*%pi anymore).
- CL_init : now uses external files found in <CelestLab installation Directory>/data/utils. 
  It is now easier for users to see and redefine constants, update TUC-TAI...
- Demo "Repeating ground tracks 2": option for sun-synchronous orbits.
- Demo "exponential density" and "US76 density": improved.
- CL_vectAngle: now uses asin (with cross product) when vectors are almost aligned. Improves accuracy.
- CL_dot, CL_vectAngle: now handle cases where the input arguments are (3xN) and (3x1).
- Overloading of hypermatrices (%hm_*): simpler code and improved performance.
- CL_fr_ter2topoN, CL_fr_topoN2ter: simpler code. Now handle cases where one input is (3xN) 
  and the other input is (3x1). If position or velocity are not provided, corresponding outputs are now [].
- CL_rot_axAng2quat: If the angle is 0 and the axis is %nan, the output quaternion is identity (instead of %nan).
  If the angle is not 0 and the axis is %nan: the output quaternion is %nan.
- CL_mod_US76: small correction of code and efficiency significantly improved.
- CL_fr_*, CL_oe_*: performance of jacobian calculation significantly improved.    
         

Bugs fixed  
----------
- Demos Halo manifold and Halo orbits: option for prograde and retrogade are now 1 and 0 respectively 
 (instead of 2 and 1)
- CL_op_locTimeG50: "tlt" and "mlt" replaced by "tsa" and "msa" (but still recognized for compatibility)
- CL_vectAngle, CL_stumpC, CL_stumpS: did not properly propagate %nan 
- CL_mod_moonSunG50 : did not properly handle the argument names "moon" and "sun"
- CL_fr_ter2G50, CL_fr_ter2G50: there was a problem when velocity was not provided
- CL_ex_lyddaneMan: an output date was incorrectly set to 0
- CL_ex_lyddane: when using this function with vectors and e > 0.05, the output semi-major axis 
  was incorrect (error ~20m)
- CL_colMult, CL_cross: did not correctly handle []
- CL_op_driftJ2: dM/de was incorrect 
- CL_mod_expDensity: percentile 33 gave incorrect results
- CL_op_rarp2ae: mu removed from inputs because it is not used in this function
- CL_ev_visibility: fixed example. Problem when dealing with long simulation and/or small time steps.  
- CL_rot_quat2eul: problem that gave incorrect results for angles > %pi
- CL_plot_*: used to set immediate_drawing to "on" thus erasing user's preference.
- CL_fr_topoNMat: documentation about input arguments
- CL_gm_eclipseCir: sizes of input arguments were not correctly tested



==================================
Version 2.0.1 - June 3, 2010				  
==================================
- Handling of global variables in CelestLab. 
  You can now set for example %CL_mu=3.8e14 in the console and that variable 
  will be used consistently throughout CelestLab, 
  whereas you used to have to modify the global variable to do that.
- Several bugs fixed
- New demo : Visibility / Accessibility at equator


- CL_ev_visibility : Bug fixed. Now returns [] when no visibility is found. 
- CL_ev_visibility : Keplerian propagation added : 'kep', in order for this function to be useable for hyperbolic orbits.
- CL_oe_car2kep and CL_oe_kep2car : Improvements to code in order to correctly handle low eccentricities and low inclinations. In particular the accuracy has improved for low eccentricity orbits. 
- CL_man_lambert : Perfomance dramatically improved. (~40 times faster)
- CL_stumpC : CL_stumpC(0) now correctly returns 1/2.
- New demos : demos/Visibility/Accessibility_at_equator.sce
- CL_ex_lydanne, CL_kp_M2E and CL_kp_M2Ecir : Now use less memory.



==================================
Version 2.0.0 - March 22, 2010
==================================
NB: Some interfaces have been improved. Therefore, this version is not fully 
compatible with the previous one.
Changes:
- A few anomalies corrected
- Several functions added
- Several new demos (with enhancements)
- Various improvements to documentation
- Improved error handling in several functions
- Improved performance and code of several functions simplified 
- A few functions removed (should be replaced by new improved functions in the future) 
- A few functions/constants/arguments renamed (for library consistency)
- Some interfaces modified


Removed functions 
-----------------
- Events functions (CL_ev_xxx) removed. They will be replaced by new functions in the next version.
- CL_gm_sunZenithAngle removed. Might be replaced by a new function in the next version.
- CL_fr_teme2J2000Mat removed.


New functions 
-------------
- CL_ip_sphereInfluence
- CL_ip_escapeDv
- CL_ip_insertionDv
- CL_fr_locOrbMat
- CL_rot_quat2axAng
- Graphic functions : CL_g_xxx
- CL_graduate
- CL_autoLevels
- CL_defParam
- CL_inputParam
- CL_unitConvert
- CL_norm


Renamed functions/constants/arguments 
-------------------------------------
- CL_op_locTime --> CL_op_locTimeG50 because the frame is necessarily Gamma50 (Veis)
- %CL_omSun --> %CL_rotrEarthSun
- Pluton --> Pluto
- %CL_planetC.xxx.R --> %CL_planetC.xxx.eqRad
- %CL_planetC.xxx now contain an extra field : mu
- %CL_planetC.earth characteristics are now equal to %CL_eqRad, %CL_mu and %CL_obla.
- %CL_UA --> %CL_au
- Optional arguments : om_earth --> rotr_pla and om_sun --> rotr_pla_sun
- CL_man_lambert : R1, R2 --> pos1, pos2 ; sense --> direction ; dt --> delta_t
- CL_dsp_covCoord : means1,means2 --> param1,param2 and coord --> conv1to2
- CL_M2Egene --> CL_M2Ecir
- CL_co_car2ell and CL_co_ell2car : obl --> obla
- CL_colGcd --> CL_gcd
- CL_gm_visibility --> CL_ev_visibility


Modified outputs 
----------------
- CL_gm_stationElevation : result is now NxM instead of MxN
- CL_gm_sphericDist : result is now the angle instead of the distance
- CL_kp_characteristics : result is now a structure (instead of a tlist). 
                          Some fields names have changed but old names are still recognized.
- CL_ex_kepler : Date is not in the output anymore.
                 Mean anomaly is not between 0 and 2*%pi anymore (no modulo). 
- CL_rot_rotVect : The output vector is now the rotated vector (and not the coordinates
                 of the same vector in the rotated frame). 
- CL_3b_halo and CL_3b_lissajous : Date is not in the output anymore.


Reworked interface 
------------------
- CL_dsp_kepCovPropa (See documentation for details)
- CL_gm_eclipseCir (See documentation for details)
- CL_op_loctimeG50 and CL_gm_visiParams : can now have several outputs, "all" returns a structure.
- CL_3b_manifold: Dates of the Halo or Lissajous orbit now have to be given as inputs.


Improved functions 
------------------
- CL_plot_ephem and CL_plot_earthMap : better handling of view area. Additional optional arguments
- CL_dat_xxx : rewritten algorithms. These functions are now valid for ... 
- CL_gm_stationElevation : improved performance.
- CL_op_M2E and CL_op_M2Egene (now renamed CL_M2Ecir) : rewritten algorithms. Faster convergence.
- CL_colMult,CL_colNorm,CL_unitVector and CL_vectAngle : improved performance.
- CL_ex_lyddaneMan : Simplified algorithm


Bugs fixed  
----------
- %CL_TAI_TUC was not up to date
- bug in CL_mod_nutationMatrix
- Intervals functions (CL_interv xxx) now correctly handle empty arrays []
- CL_rMod now correctly handles empty arrays []
- CL_op_searchRepeatOrbits and CL_op_repeat2smaInc : improved convergence (it could cause bugs)
- Functions CL_dat_xxx : correction of bugs 
- CL_rot_quatSlerp : was not valid for vectors
- CL_M2E and CL_M2Egene : didnt work in some cases.
- bug in CL_plot_ephem
- CL_fr_G502J2000, CL_fr_G502ter and all the combinations : correction of bugs when using optionnal arguments.
- Removed useless optional arguments ut1,xp,yp from CL_fr_G502J2000, CL_fr_G502J2000Mat, CL_fr_J2000G50
- CL_man_incRaanCirc : didnt work for vectors
- bug in CL_man_biElliptic



==================================
Version 1.0.1 - December 18, 2009				  
==================================
Changes:
- Improvement of demos
- Correction of CL_gm_equatorialOverlap.sci
- Correction of CL_gm_equatorialSwath.sci
 (vectors [1,n] instead of [n,1])
- About page (explanations on constants)
	
  

==================================
Version 1.0.0 - December 17, 2009				  
==================================
First version. 



