Skip to content

Commit

Permalink
initial fix for longitude miscalculation in atl06 dispatch
Browse files Browse the repository at this point in the history
jpswinski committed Oct 4, 2023
1 parent 4529a12 commit 3b535c5
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions plugins/icesat2/plugin/Atl06Dispatch.cpp
Original file line number Diff line number Diff line change
@@ -793,11 +793,7 @@ Atl06Dispatch::lsf_t Atl06Dispatch::lsf (Atl03Reader::extent_t* extent, result_t
double ph_longitude = ph->longitude;

/* Shift Longitudes */
if(shift_lon)
{
if(longitude < 0.0) longitude = -longitude;
else longitude = 360.0 - longitude;
}
if(shift_lon) ph_longitude = fmod((ph_longitude + 360.0), 360.0);

/* Perform Matrix Operation */
double gig_1 = igtg_11 + (igtg_12_21 * ph->x_atc); // G^-g row 1 element
@@ -810,11 +806,7 @@ Atl06Dispatch::lsf_t Atl06Dispatch::lsf (Atl03Reader::extent_t* extent, result_t
}

/* Check if Longitude Needs to be Shifted Back */
if(shift_lon)
{
if(longitude < 180.0) longitude = -longitude;
else longitude = 360.0 - longitude;
}
if(shift_lon) longitude = fmod((longitude + 180.0), 360.0) - 180.0;

/* Populate Results */
result.elevation.latitude = latitude;

0 comments on commit 3b535c5

Please sign in to comment.