Coordinates transformations#

COORD_TRANS_VEC#

Generic coordinates transformation from one geophysical or heliospheric coordinate system to another.

Inputs:
  • ntime (integer) – number of time points

  • sysaxesIN (integer) – key for the input coordinate system (see Coordinate systems)

  • sysaxesOUT (integer) – key for the output coordinate system (see Coordinate systems)

  • iyear (array of ntime integer) – the year

  • idoy (array of ntime integer) – the day of year (January 1st is idoy=1)

  • UT (array of ntime double) – the time in seconds

  • xIN (array of [3, ntime] double) – position in input coordinates system

Outputs:
  • xOUT (array of [3, ntime] double) – position in output coordinates system

Calling sequence:
From MATLAB#
Y=onera_desp_lib_coord_trans(X,rotation,matlabd)
From IDL#
result = call_external(lib_name, 'coord_trans_vec', ntime,sysaxesIN,sysaxesOUT,iyr,idoy,secs,xIN,xOUT, /f_value)
From FORTRAN#
call coord_trans_vec1(ntime,sysaxesIN,sysaxesOUT,iyr,idoy,secs,xIN,xOUT)

Geographic coordinates transformations#

GEO2GSM#

Transforms GEO to GSM coordinates.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xGEO (array of 3 double) – cartesian position in GEO (Re)

Outputs:
  • psi (double) – angle for GSM coordinate

  • xGSM (array of 3 double) – cartesian position in GSM (Re)

Calling sequence:
From MATLAB#
xGSM = onera_desp_lib_rotate(xGEO,'geo2gsm',matlabd);
[xGSM,psi] = onera_desp_lib_rotate(xGEO,'geo2gsm',matlabd);
From IDL#
result = call_external(lib_name, 'geo2gsm', iyr,idoy,secs,psi,xGEO,xGSM, /f_value)
From FORTRAN#
call geo2gsm1(iyr,idoy,secs,psi,xGEO,xGSM)
GSM2GEO#

Transforms GSM to GEO coordinates.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xGSM (array of 3 double) – cartesian position in GSM (Re)

Outputs:
  • psi (double) – angle for GSM coordinate

  • xGEO (array of 3 double) – cartesian position in GEO (Re)

Calling sequence:
From MATLAB#
xGEO = onera_desp_lib_rotate(xGSM,'gsm2geo',matlabd);
[xGEO,psi] = onera_desp_lib_rotate(xGSM,'gsm2geo',matlabd);
From IDL#
result = call_external(lib_name, 'gsm2geo', iyr,idoy,secs,psi,xGSM,xGEO, /f_value)
From FORTRAN#
call gsm2geo1(iyr,idoy,secs,psi,xGSM,xGEO)
GEO2GSE#

Transforms GEO to GSE coordinates.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xGEO (array of 3 double) – cartesian position in GEO (Re)

Outputs:
  • xGSE (array of 3 double) – cartesian position in GSE (Re)

Calling sequence:
From MATLAB#
xGSE = onera_desp_lib_rotate(xGEO,'geo2gse',matlabd);
From IDL#
result = call_external(lib_name, 'geo2gse', iyr,idoy,secs,xGEO,xGSE, /f_value)
From FORTRAN#
call geo2gse1(iyr,idoy,secs,xGEO,xGSE)
GSE2GEO#

Transforms GSE to GEO coordinates.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xGSE (array of 3 double) – cartesian position in GSE (Re)

Outputs:
  • xGEO (array of 3 double) – cartesian position in GEO (Re)

Calling sequence:
From MATLAB#
xGEO = onera_desp_lib_rotate(xGSE,'gse2geo',matlabd);
From IDL#
result = call_external(lib_name, 'gse2geo', iyr,idoy,secs,xGSE,xGEO, /f_value)
From FORTRAN#
call gse2geo1(iyr,idoy,secs,xGSE,xGEO)
GEO2GDZ#
Transforms :ref:`GEO <GEO>` to  :ref:`GDZ <GDZ>` coordinates.#
Inputs:
  • xx (double) – xGEO (Re)

  • yy (double) – yGEO (Re)

  • zz (double) – zGEO (Re)

Outputs:
  • lati (double) – latitude (deg)

  • longi (double) – East longitude (deg)

  • alti (double) – altitude (km)

Calling sequence:
From MATLAB#
xGDZ = onera_desp_lib_rotate([xx(:) yy(:) zz(:)],'geo2gdz');
alti = xGDZ(:,1); lati = xGDZ(:,2); longi = xGDZ(:,3);
From IDL#
result = call_external(lib_name, 'geo2gdz', xx,yy,zz,lati,longi,alti, /f_value)
From FORTRAN#
call geo_gdz(xx,yy,zz,lati,longi,alti)
GDZ2GEO#
Transforms :ref:`GDZ <GDZ>` to  :ref:`GEO <GEO>` coordinates.#
Inputs:
  • lati (double) – latitude (deg)

  • longi (double) – East longitude (deg)

  • alti (double) – altitude (km)

Outputs:
  • xx (double) – xGEO (Re)

  • yy (double) – yGEO (Re)

  • zz (double) – zGEO (Re)

Calling sequence:
From MATLAB#
xGEO = onera_desp_lib_rotate([alti(:), lati(:), longi(:)],'gdz2geo');
xx = xGEO(:,1); yy = xGEO(:,2); zz = xGEO(:,3);
From IDL#
result = call_external(lib_name, 'gdz2geo', lati,longi,alti,xx,yy,zz, /f_value)
From FORTRAN#
call gdz_geo(lati,longi,alti,xx,yy,zz)
GEO2GEI#

Transforms GEO to GEI coordinates.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xGEO (array of 3 double) – cartesian position in GEO (Re)

Outputs:
  • xGEI (array of 3 double) – cartesian position in GEI (Re)

Calling sequence:
From MATLAB#
xGEI = onera_desp_lib_rotate(xGEO,'geo2gei',matlabd);
From IDL#
result = call_external(lib_name, 'geo2gei', iyr,idoy,secs,xGEO,xGEI, /f_value)
From FORTRAN#
call geo2gei1(iyr,idoy,secs,xGEO,xGEI)
GEI2GEO#

Transforms GEI to GEO coordinates.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xGEI (array of 3 double) – cartesian position in GEI (Re)

Outputs:
  • xGEO (array of 3 double) – cartesian position in GEO (Re)

Calling sequence:
From MATLAB#
xGEO = onera_desp_lib_rotate(xGEI,'gei2geo',matlabd);
From IDL#
result = call_external(lib_name, 'gei2geo', iyr,idoy,secs,xGEI,xGEO, /f_value)
From FORTRAN#
call gei2geo1(iyr,idoy,secs,xGEI,xGEO)
GEO2SM#

Transforms GEO to SM coordinates.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xGEO (array of 3 double) – cartesian position in GEO (Re)

Outputs:
  • xSM (array of 3 double) – cartesian position in SM (Re)

Calling sequence:
From MATLAB#
xSM = onera_desp_lib_rotate(xGEO,'geo2sm',matlabd);
From IDL#
result = call_external(lib_name, 'geo2sm', iyr,idoy,secs,xGEO,xSM, /f_value)
From FORTRAN#
call geo2sm1(iyr,idoy,secs,xGEO,xSM)
SM2GEO#

Transforms SM to GEO coordinates.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xSM (array of 3 double) – cartesian position in SM (Re)

Outputs:
  • xGEO (array of 3 double) – cartesian position in GEO (Re)

Calling sequence:
From MATLAB#
xGEO = onera_desp_lib_rotate(xSM,'sm2geo',matlabd);
From IDL#
result = call_external(lib_name, 'sm2geo', iyr,idoy,secs,xSM,xGEO, /f_value)
From FORTRAN#
call sm2geo1(iyr,idoy,secs,xSM,xGEO)
GSM2SM#

Transforms GSM to SM coordinates.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xGSM (array of 3 double) – cartesian position in GSM (Re)

Outputs:
  • xSM (array of 3 double) – cartesian position in SM (Re)

Calling sequence:
From MATLAB#
xSM = onera_desp_lib_rotate(xGSM,'gsm2sm',matlabd);
From IDL#
result = call_external(lib_name, 'gsm2sm', iyr,idoy,secs,xGSM,xSM, /f_value)
From FORTRAN#
call gsm2sm1(iyr,idoy,secs,xGSM,xSM)
SM2GSM#

Transforms SM to GSM coordinates.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xSM (array of 3 double) – cartesian position in SM (Re)

Outputs:
  • xGSM (array of 3 double) – cartesian position in GSM (Re)

Calling sequence:
From MATLAB#
xGSM = onera_desp_lib_rotate(xSM,'sm2gsm',matlabd);
From IDL#
result = call_external(lib_name, 'sm2gsm', iyr,idoy,secs,xSM,xGSM, /f_value)
From FORTRAN#
call sm2gsm1(iyr,idoy,secs,xSM,xGSM)
GEO2MAG#

Transforms GEO to MAG coordinates.

Inputs:
  • iyr (integer) – the year

  • xGEO (array of 3 double) – cartesian position in GEO (Re)

Outputs:
  • xMAG (array of 3 double) – cartesian position in MAG (Re)

Calling sequence:
From MATLAB#
xMAG = onera_desp_lib_rotate(xGEO,'geo2mag',matlabd);
From IDL#
result = call_external(lib_name, 'geo2mag', iyr,idoy,secs,xGEO,xMAG, /f_value)
From FORTRAN#
call geo2mag1(iyr,xGEO,xMAG)
MAG2GEO#

Transforms MAG to GEO coordinates.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xMAG (array of 3 double) – cartesian position in MAG (Re)

Outputs:
  • xGEO (array of 3 double) – cartesian position in GEO (Re)

Calling sequence:
From MATLAB#
xGEO = onera_desp_lib_rotate(xMAG,'mag2geo',matlabd);
From IDL#
result = call_external(lib_name, 'mag2geo', iyr,idoy,secs,xMAG,xGEO, /f_value)
From FORTRAN#
call mag2geo1(iyr,xMAG,xGEO)
SPH2CAR#

Routine to transform spherical coordinates to cartesian.

Inputs:
  • r (double) – radial distance (arbitrary unit)

  • lati (double) – latitude (deg)

  • longi (double) – East longitude (deg)

Outputs:
  • x (array of 3 double) – cartesian coordinates (same unit as r)

Calling sequence:
From MATLAB#
xCAR = onera_desp_lib_rotate([r(:), lati(:), longi(:)],'sph2car');
From IDL#
result = call_external(lib_name, 'sph2car', r,lati,longi,x, /f_value)
From FORTRAN#
call SPH_CAR(r,lati,longi,x)
CAR2SPH#

Routine to transform cartesian coordinates to spherical.

Inputs:
  • x (array of 3 double) – cartesian coordinates (arbitrary unit)

Outputs:
  • r (double) – radial distance (same unit as x)

  • lati (double) – latitude (deg)

  • longi (double) – East longitude (deg)

Calling sequence:
From MATLAB#
xSPH = onera_desp_lib_rotate(xCAR,'car2sph');
r = xSPH(:,1); lati = xSPH(:,2); longi = xSPH(:,3);
From IDL#
result = call_external(lib_name, 'car2sph',x,r,lati,longi, /f_value)
From FORTRAN#
call CAR_SPH(x,r,lati,longi)
RLL2GDZ#

Transforms RLL to GDZ

Inputs:
  • r (double) – radial distance (Re)

  • lati (double) – latitude (deg)

  • longi (double) – East longitude (deg)

Outputs:
  • alti (double) – altitude (km)

Calling sequence:
From MATLAB#
xGDZ = onera_desp_lib_rotate([r(:), lati(:), longi(:)],'rll2gdz');
alti = xGDZ(:,1); lati = xGDZ(:,2); longi = xGDZ(:,3);
From IDL#
result = call_external(lib_name, 'rll2gdz', r,lati,longi,alti, /f_value)
From FORTRAN#
call RLL_GDZ(r,lati,longi,alti)

Geographic to heliospheric and vice versa coordinates transformations#

GSE2HEE#

Routine to transform geocentric coordinates GSE to heliospheric coordinates HEE (Heliocentric Earth Ecliptic also sometime known as Heliospheric Solar Ecliptic (HSE)).

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xGSE (array of 3 double) – cartesian position in GSE (Re)

Outputs:
  • xHEE (array of 3 double) – cartesian position in HEE (AU)

Calling sequence:
From MATLAB#
xHEE = onera_desp_lib_rotate(xGSE,'gse2hee',matlabd);
From IDL#
result = call_external(lib_name, 'gse2hee', iyr,idoy,UT,xGSE,xHEE, /f_value)
From FORTRAN#
call gse2hee1(iyr,idoy,UT,xGSE,xHEE)
HEE2GSE#

Routine to transform heliospheric coordinates HEE (Heliocentric Earth Ecliptic, also sometime known as Heliospheric Solar Ecliptic (HSE)) to geocentric coordinates GSE.

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xHEE (array of 3 double) – cartesian position in HEE (AU)

Outputs:
  • xGSE (array of 3 double) – cartesian position in GSE (Re)

Calling sequence:
From MATLAB#
xGSE = onera_desp_lib_rotate(xHEE,'hee2gse',matlabd);
From IDL#
result = call_external(lib_name, 'hee2gse', iyr,idoy,UT,xHEE,xGSE, /f_value)
From FORTRAN#
call hee2gse1(iyr,idoy,UT,xHEE,xGSE)

Heliospheric coordinates transformations#

HEE2HAE#

Routine to transform heliospheric coordinates HEE (Heliocentric Earth Ecliptic also sometime known as Heliospheric Solar Ecliptic (HSE)) to heliospheric coordinates HAE (Heliocentric Aries Ecliptic also sometime known as Heliospheric Solar Ecliptic (HSE))

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xHEE (array of 3 double) – cartesian position in HEE (AU)

Outputs:
  • xHAE (array of 3 double) – cartesian position in HAE (AU)

Calling sequence:
From MATLAB#
onera_desp_lib_rotate(xHEE,'hee2hae',matlabd);
From IDL#
result = call_external(lib_name, 'hee2hae', iyr,idoy,UT,xHEE,xHAE, /f_value)
From FORTRAN#
call hee2hae1(iyr,idoy,UT,xHEE,xHAE)
HAE2HEE#

Routine to transform heliospheric coordinates HAE (Heliocentric Aries Ecliptic also sometime known as Heliospheric Solar Ecliptic (HSE)) to heliospheric coordinates HEE (Heliocentric Earth Ecliptic also sometime known as Heliospheric Solar Ecliptic (HSE))

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xHAE (array of 3 double) – cartesian position in HAE (AU)

Outputs:
  • xHEE (array of 3 double) – cartesian position in HEE (AU)

Calling sequence:
From MATLAB#
xHEE = onera_desp_lib_rotate(xHAE,'hae2hee',matlabd);
From IDL#
result = call_external(lib_name, 'hae2hee', iyr,idoy,UT,xHAE,xHEE, /f_value)
From FORTRAN#
call hae2hee1(iyr,idoy,UT,xHAE,xHEE)
HAE2HEEQ#

Routine to transform heliospheric coordinates HAE (Heliocentric Aries Ecliptic also sometime known as Heliospheric Solar Ecliptic (HSE)) to heliospheric coordinates HEEQ (Heliocentric Earth Equatorial also sometime known as Heliospheric Solar (HS))

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xHAE (array of 3 double) – cartesian position in HAE (AU)

Outputs:
  • xHEEQ (array of 3 double) – cartesian position in HEEQ (AU)

Calling sequence:
From MATLAB#
xHEEQ = onera_desp_lib_rotate(xHAE,'hae2heeq',matlabd);
From IDL#
result = call_external(lib_name, 'hae2heeq', iyr,idoy,UT,xHAE,xHEEQ, /f_value)
From FORTRAN#
call hae2heeq1(iyr,idoy,UT,xHAE,xHEEQ)
HEEQ2HAE#

Routine to transform heliospheric coordinates HEEQ (Heliocentric Earth Equatorial also sometime known as Heliospheric Solar (HS)) to heliospheric coordinates HAE (Heliocentric Aries Ecliptic also sometime known as Heliospheric Solar Ecliptic (HSE))

Inputs:
  • iyr (integer) – the year

  • idoy (integer) – the day of year (January 1st is idoy=1)

  • UT (double) – the time in seconds

  • xHEEQ (array of 3 double) – cartesian position in HEEQ (AU)

Outputs:
  • xHAE (array of 3 double) – cartesian position in HAE (AU)

Calling sequence:
From MATLAB#
xHAE = onera_desp_lib_rotate(xHEEQ,'heeq2hae',matlabd);
From IDL#
result = call_external(lib_name, 'heeq2hae', iyr,idoy,UT,xHEEQ,xHAE, /f_value)
From FORTRAN#
call heeq2hae1(iyr,idoy,UT,xHEEQ,xHAE)