Created
June 19, 2013 05:50
-
-
Save vaivads/5811951 to your computer and use it in GitHub Desktop.
GEO lat and GSE xyz conversion
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% generate random time series | |
t=irf_time(now,'datenum2epoch')+[1:10]; t=t(:); | |
frGSE = [t rand(numel(t),1)-0.5 rand(numel(t),1)-0.5 rand(numel(t),1)-0.5]; | |
% example of conversion to GSM | |
frGSM = irf_gse2gsm(frGSE); | |
% example of conversion to GEO using irf routine | |
frGEO = irf.geocentric_coordinate_transformation(frGSE,'GSE>GEO'); | |
% example of conversion to GEO using onera routine | |
timeDatenum=irf_time(frGSE(:,1),'epoch2datenum'); | |
frGEO = onera_desp_lib_coord_trans(frGSE(:,2:4),'gse2geo',timeDatenum); | |
frGEO = [frGSE(:,1) frGEO]; | |
% conversion xyz to r/lat/long | |
frGEOsph = [frGSE(:,1) onera_desp_lib_coord_trans(frGSE(:,2:4),'car2sph')]; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment