AIRCentre / SARProcessing.jl

MIT License
29 stars 3 forks source link

Create a function that returns a fifth degree precies orbit interpolater #15

Closed lupemba closed 1 year ago

lupemba commented 1 year ago

Could look something like this

function getInterpolaterFunction(stateVectors::Array{OrbitsState}, startTime::DateTime, EndTime::)
    # Select the relevant OrbitsState from the stateVectors
    # Convert to arrays and normalize the position and velocity.
     # Maybe convert the time to some sort of float
    # fit 5 degree polynomial 

    #Create the actual interpolater function
    function interpolater(time::DateTime )
          #corvet the time to some sort of float
         #  use the 5 degree polynomial to compute normalized position and velocity
          # Covert to actual position and velocity 
         # return position and velocity as a orbit state
    end

     #A julia function can return another function like it was a variable.
     # Returning the interpolater function means that we can fit the polynomial once and then use the returned function for all the 
      # coregistation computations 
    return interpolater
end

For inspiration on logic see satellite_trajectory and polyval_state_vectors in https://github.com/lupemba/syntese/blob/master/ToolBox/src/Geometry.jl.

felixcremer commented 1 year ago

There might be some functionality in the JuliaSpace organisation which we could use for that. As far as I know, they also deal with orbit computations.

lupemba commented 1 year ago

Hi @felixcremer

I have looked at the package. It contains orbit propagators but that is a bit overkill for insar with sentinel 1. ESA already gives high-quality state vectors along the entire orbit so interpolation is enough. We will skip that for now but it might be relevant when we extend the package to other satellite missions.

JuliaSpace has some nice functions for coordinate transformations but I do not know if we should include the package just for those. Could solve issue https://github.com/AIRCentre/SARProcessing.jl/issues/9 https://github.com/JuliaSpace/SatelliteToolbox.jl/blob/master/src/transformations/geodetic_geocentric.jl