I want to extend functionality of some open-source programs which decode APT and LRPT images (wxapt and glrpt). More specifically I want to add possibility to overlay geographical data such as land borders, administrative borders, rivers etc on the resulting images after rectification. The same functionality exists in WXtoIMG software and it works only if you have updated Keplers list. I assume that received APT data (e. g. recorded with GQRX and then processes in Audacity) contains some timestamps (or may be GPS coordinates) and smart programs like WXtoIMG are possible to process this hidden metadata together with TLE data and draw geo objects in overlay.
However I can't find very much info about APT/LRPT protocols. The only thing that I found is that LRPT packets could contain APID 70 data which is satellite's onboard time. Does APT suggests the same data or I should rely on exact computer time and updated TLE?
Another problem is that I can't figure out (yet) how to bind together timestamp info, TLE data and get geographical data for pixels. My suggestion is to find one basis point/pixel on my image which is my ground station (GPS coordinates for ground station are always available) and then, knowing rectified image dimensions and resolution, I could draw geographical data (for example from GADM) in overlay. Is it right approach? I think I can catch moment when satellite transmits image line for my latitude (may be derive it from TLE parameters) but I don't know how to find longitude...
Can anyone suggest something?
EDIT 1. Here is my thoughts about how to perform pixel geotagging. Let's assume the following:
Let's take that satellite is passing from South to North at certain angle. It scans Earth surface and sends data as image lines with even interval. So at every time moment $t_i$ we obtain a bunch of image lines, let's say that for time interval $\Delta t = t_{i+1}-t_i$ we have four rows of pixels. This resolution should stay constant during satellite working cycle (I believe it's 4 km/px for NOAA and 1 km/px for Meteor-M series). After image rectification procedure we should get image with even pixel spacing so every pixel shift in image corresponds to the same distance shift in kilometers on Earth surface. Pixels which are nearest to the satellite's pass track projection (dashed red line with "Flight direction" label) will stay (almost) untouched during rectification. Knowing exact timestamps $t_i$ and TLE data we can calculate latitude and longitude of satellite projection on Earth (green pixels on scheme). Then we can calculate latitude and longitude for every pixel in image (orange pixels) with respect to our basis pixels (satellite's projection) and map coordinates to them. After that we just take geographical objects for this area from database and draw borders, rivers etc by just mapping geo coordinates to pixel coordinates. Am i right in these suggestions?