Hello, everyone
I’m trying to geolocalize my satellite images. I have the PV coordinates, the quaternions and the data needed to calculate the line of sight.
However, my points always fall near the longitude of ±180°. I’m almost one hundred percent sure that the error is related to the generation of my satellite’s LOS.
For now, I’m generating my LOS taking into account focal length, XYZ positions of the satellite body frame, and also the pixel size, which is 1e-5m.
pan_px = 6000. # pixels in pan
ms_px = pan_px / 4 # pixels in multispectral
nadir = 0.0 # nadir angle
n_sensors = 2
sensor_1_focal_plan = 0.058872197 #in meters
sensor_2_focal_plan = 0.001150 # in meters
focal_length = 5.768604 #in metersm
focal_distance = sensor_1_focal_plan - sensor_2_focal_plan #in meters
px_size = 1e-5 #in meters
x_pan_pixel_pos = 14905.137e-5
y_pan_pixel_pos = 58872.197e-5
fov = fov_pan(pan_px, px_size, focal_distance, focal_length)
print(f'FoV in Rad: {fov}') #1.16rad
raw_dirs = []
for i in range(int(pan_px)):
raw_dirs.append(Vector3D(-x_pan_pixel_pos, -(i * px_size + y_pan_pixel_pos), focal_length))
Could someone help me by pointing out what I am missing?
I rodreras,
LOS convention are detailled in direct location tutorial.
Could it be possible to explain what is sensor_X_focal_plan and X_pan_pixel_pos it is not straitforward for me
Using these values it gives ([-0.14905137, -0.58872197, 5.768604 ]) , i.ie [-0.02583838, -0.10205623, 1. ] using unit vector along Z, for the first los. Is it what you want ?
Could it be possible to give the geolocation for the nadir LOS (with Vector3D.PLUS_K
)
Hello, jonathan.guinet,
I am already using this tutorial as the primary source of information. A lot of what I could build was due to it.
Regarding the variables, it turns out that it was a mistake from my side. Both of them mean the same thing. If you look at it, you’ll see that they have the same values. x_pan_pixel_position
is the first pixel position from the sensor in relation to the spacecraft frame. The same for y_pan_pixel_position
. I use them to calculate the field of view of the satellite.
My line of thought was that I needed to use these positions in the spacecraft in order to generate the LOS. However, due to the errors I’ve been getting, I don’t think this is the most correct approach.
These variables have as result the exact vector you showed above. Nonetheless, I wonder how you managed to generate this second vector? I think this might be the solution I need.
Furthermore, I tried using the Vector3D.PLUS_K
, which it returns {0,0,1} vector, and I still get the points to fall in extreme longitudes.
I am plotting the spacecraft position with geodetic points in order to understand where it is passing, and based on it, I can tell that my issue is related to the construction of the LOS.
Thanks for the help so far!
It turns out that I managed to solve the issue. I had to perform a propagation from my satellite’s starting coordinates, and then I was able to plot the LOS with {0,0,1}.
I don’t know why I couldn’t use the coordinates and angles straight from the Orbit and Attitude files. Yet, I found this workaround.
2 Likes