Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

BUG: Fix geostationary projection (Fixes #799) #870

Merged
merged 1 commit into from
Jun 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ public class GEOSTransform {

double sub_lon;
double sub_lon_degrees;
double sat_height;

public String scan_geom = GEOS;

Expand Down Expand Up @@ -148,6 +149,7 @@ private void init(double subLonDegrees, String scan_geom, Geoid geoid) {
} else if (scan_geom.equals(GOES)) {
h = h_goesr;
}
this.sat_height = h - r_eq;

d = h * h - r_eq * r_eq;
}
Expand All @@ -156,6 +158,7 @@ private void init(double subLonDegrees, String scan_geom, Geoid geoid, double pe
this.sub_lon_degrees = subLonDegrees;
this.sub_lon = sub_lon_degrees * DEG_TO_RAD;
this.scan_geom = scan_geom;
this.sat_height = perspective_point_height;

r_pol = geoid.r_pol;
r_eq = geoid.r_eq;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ private void makePP() {
addParameter(CF.GRID_MAPPING_NAME, NAME);
addParameter(CF.LONGITUDE_OF_PROJECTION_ORIGIN, navigation.sub_lon_degrees);
addParameter(CF.LATITUDE_OF_PROJECTION_ORIGIN, 0.0);
// addParameter(CF.PERSPECTIVE_POINT_HEIGHT, navigation.sub_lon_degrees); LOOK NOT USED ??
addParameter(CF.PERSPECTIVE_POINT_HEIGHT, navigation.sat_height * 1000.0);
addParameter(CF.SWEEP_ANGLE_AXIS, navigation.scan_geom.equals(GEOSTransform.GOES) ? "x" : "y");
addParameter(CF.SEMI_MAJOR_AXIS, navigation.r_eq * 1000.0);
addParameter(CF.SEMI_MINOR_AXIS, navigation.r_pol * 1000.0);
Expand Down