control_points
Description
control_points (written by A. Y. / JCU, July 1990) refines the orbital navigation geometry stored in a landsat_rec scanline file (created by addheader) using two Ground Control Points (GCPs) with known pixel (x, y) and geographic (latitude, longitude) coordinates. It solves for the true satellite track heading (track_angle), along-track line spacing (track_pixel_size), across-track sample spacing (scan_pixel_size), and per-scanline center coordinates.
CLI Options & Usage
control_points -in <in_landsat> -control <gcp_file> -out <out_landsat> [-scan_pixel <m>]
-in <in_landsat>: Inputlandsat_recfile (2340rows Ã3240columns).-control <gcp_file>: ASCII file containing two lines:x1 y1 lat1 lon1andx2 y2 lat2 lon2.-out <out_landsat>: Outputlandsat_recfile with updated per-scanline headers.-scan_pixel <m>: Fixes the across-track pixel size to<m>meters instead of solving for bothscan_pixel_sizeandtrack_pixel_sizesimultaneously.
Algorithm
- Computes the true geodetic distance
distand forward azimuthanglebetween GCP 1(lat1, lon1)and GCP 2(lat2, lon2)usinggeog_dist(). - Solves the 2D transformation between scanline/pixel offsets
(x2 - x1, y2 - y1)and geodetic vector(dist, angle)to determinetrack_angle,track_pixel_size, andscan_pixel_size. - Projects from GCP 1 to the top-center pixel
(x = 1620, y = 0)viageog_posn(), then steps down all2340scanlines alongtrack_angle, writing updated(lat, lon, azi, scan_pixel_size, track_pixel_size)headers into<out_landsat>.