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

===================
Version 2.2.0 	
===================

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 	
===================

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  	
===================

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 				  
===================

- 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 				  
===================

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

