Converting from heliocentric coordinate system with coordinates in arcsec to coordinates in longitude latitude
Created: 2011-02-18 11:38:40
Last updated: 2011-02-18 11:51:29
Preview
Run
Run this Workflow in the Taverna Workbench...
Workflow Components
Authors (1)
Titles (3)
Converting from heliocentric coordinate system with coordinates in arcsec to coordinates in longitude latitude |
Converts arcsec from heliocentric coordinates to heliographic coordinates |
Converts arcsec from heliocentric coordinates to heliographic coordinates
Heliocentric Earth Equatorial Coordinate System to
Heliographic Coordinate System |
Descriptions (3)
Converting from heliocentric coordinate system with coordinates in arcsec to coordinates in longitude latitude
Based on the IDL script xy2lonlat.pro
http://hesperia.gsfc.nasa.gov/ssw/gen/idl/solar/xy2lonlat.pro |
Converting from heliocentric coordinate system with coordinates in arcsec to coordinates in longitude latitude |
Converting from heliocentric coordinate system with coordinates in arcsec to coordinates in longitude latitude
Based on the IDL script xy2lonlat.pro |
Dependencies (0)
Inputs (3)
Name |
Description |
x |
X coordinate
X coordinate
vector of same length as dateTime and y
|
y |
Y coordinate
Y coordinate
vector of same length as x and dateTime
|
dateTime |
dateTime for which the conversion is to be done
vector of same length as x and y
dateTime for which the conversion is to be done
|
Processors (2)
Name |
Type |
Description |
ARC2LON |
beanshell |
Scriptdouble x = Double.parseDouble(xString);
double y = Double.parseDouble(yString);
double b0 = Double.parseDouble(b0String);
double sunr = Double.parseDouble(sunrString);
debug = "inputs: x, y, b0, sunr " + x + " " + y + " " + b0+ " " + sunr +"\n" ;
double rho = Math.hypot(x,y);
if(rho > sunr){
rho=sunr;
}
debug = debug + "rho" + rho + "\n";
double outrho = rho / sunr;
double arcsec2rad = 4.84813681e-6;
debug = debug + "arcsec2rad" + arcsec2rad + "\n";
rho = Math.asin(Math.sin(rho*arcsec2rad)/Math.sin(sunr*arcsec2rad)) - rho* arcsec2rad;
debug = debug + "rho" + rho + "\n";
double theta = Math.atan2(x,y);
debug = debug + "theta" + theta + "\n";
double srho = Math.sin(rho);
debug = debug + "srho" + srho + "\n";
double crho = Math.cos(rho);
debug = debug + "crho" + crho + "\n";
double ctheta = Math.cos(theta);
debug = debug + "ctheta" + ctheta + "\n";
double sb0 = Math.sin(b0);
debug = debug + "sb0" + sb0 + "\n";
double cb0 = Math.cos(b0);
debug = debug + "cb0" + cb0 + "\n";
double slat = sb0*crho +cb0* srho*ctheta;
if(slat>1.0){
slat =1.0;
}
if(slat<-1.0){
slat = -1.0;
}
debug = debug + "slat" + slat + "\n";
double radeg = 180/Math.PI;
lat = Math.asin(slat)*radeg;
lon = (Math.atan2(srho*Math.sin(theta), (crho*cb0-srho*sb0*ctheta)))*radeg;
debug = debug + "\n" + (srho*Math.sin(theta)) + " " + (crho*cb0-srho*sb0*ctheta); |
Calculate_Sun_data_from_date__time_factor_of_input_is_ignored_ |
workflow |
|
Beanshells (2)
Name |
Description |
Inputs |
Outputs |
ARC2LON |
|
xString
yString
b0String
sunrString
|
lon
lat
debug
|
sun_data |
|
dateTime
|
b0
sun_radius
position_angle
|
Outputs (2)
Name |
Description |
ARC2LON_lat |
calculated latitude
|
ARC2LON_long |
calculated longitude
|
Datalinks (7)
Source |
Sink |
x |
ARC2LON:xString |
y |
ARC2LON:yString |
Calculate_Sun_data_from_date__time_factor_of_input_is_ignored_:sun_radius |
ARC2LON:sunrString |
Calculate_Sun_data_from_date__time_factor_of_input_is_ignored_:b0 |
ARC2LON:b0String |
dateTime |
Calculate_Sun_data_from_date__time_factor_of_input_is_ignored_:sun_data_dateTime |
ARC2LON:lat |
ARC2LON_lat |
ARC2LON:lon |
ARC2LON_long |
Uploader
License
All versions of this Workflow are
licensed under:
Version 1
(of 1)
Credits (1)
(People/Groups)
Attributions (0)
(Workflows/Files)
None
Shared with Groups (1)
Featured In Packs (0)
None
Log in to add to one of your Packs
Attributed By (0)
(Workflows/Files)
None
Favourited By (0)
No one
Statistics
Other workflows that use similar services
(0)
There are no workflows in myExperiment that use similar services to this Workflow.
Comments (1)
Log in to make a comment
For a more effictient use (if date is constant for several coordinates) - splitt this workflow in two parts the calculations of the sun data and the cacluations of the coordinates