Unit conversion
[val2] = CL_unitConvert(val1, unit1, unit2)
Converts a quantity expressed in unit1 into unit2. The recognized units are:
m: meter
km: kilometer (1000 meters)
s: second
mn: minute (60 seconds)
h: hour (60 minutes)
day: day (24 hours)
yr: year (365.25 days)
g: gramme
kg: kilogramme (1000 grammes)
au: astronomical unit (%CL_au)
N: newton
Hz: herz
kHz: kiloherz (1000 Hz)
rad: radian
deg: degree (%pi/180 radians)
Notes:
- The consistency between unit1 and unit2 is not checked. Thus CL_unitConvert(1, "kg", "m") generates no error!.
- The case where some existing variable is passed in place of a valid unit is not detected either.
Value of some quantity 'X' expressed in unit1.
Initial unit (string).
Final unit (string).
Value of 'X' expressed in unit2. val2 is [] if the units are not valid.
CNES - DCT/SB (AL)