Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a way to compute e,n,u components from residuals #149

Closed
lsetiawan opened this issue Aug 25, 2023 · 8 comments · Fixed by #174
Closed

Add a way to compute e,n,u components from residuals #149

lsetiawan opened this issue Aug 25, 2023 · 8 comments · Fixed by #174
Assignees

Comments

@lsetiawan
Copy link
Member

No description provided.

@lsetiawan
Copy link
Member Author

lsetiawan commented Aug 25, 2023

@johnbdesanto could you paste here:

  1. a transponders xyz
  2. array center coordinates used
  3. enu computed
  4. the azimuth angle computed
  5. the look angle computed

If you can point me to a resource on how you computed these azimuth and look angles that would be really great! Additionally, the formula for residuals (cm) -> e,n,u components. Thank you so much!

@lsetiawan
Copy link
Member Author

From your script with gmtmath. I think I found that the equation is the following to compute the enu components from the residuals

def calc_enu_comp(residuals, az, el):
    # az is the azimuth angle in degrees
    # el is the look angle or elevation in degrees
    res_north = np.mean(residuals * np.sin(np.radians(az)) * np.sin(np.radians(el)))
    res_east = np.mean(residuals * np.cos(np.radians(az)) * np.cos(np.radians(el)))
    res_vert = np.mean(residuals * np.cos(np.radians(el)))

    return np.array([res_east, res_north, res_vert])

Please let me know if this is correct. One thing to note is that I did not divide by 2 here since the residuals are already a one way travel time residual value rather than 2. I assume that is the purpose of the division by 2? Please correct me if I'm wrong @johnbdesanto. Thanks!

@johnbdesanto
Copy link
Collaborator

The formula you posted are correct. You are also right in getting rid of the factor of 2, which is there because I assumed the residuals were two way. We have since shown that not to be the case, so it should be removed.

@johnbdesanto
Copy link
Collaborator

For calculating the angles, say that t_n, t_e, and t_d are the north, east, and depth (positive down) of the transponder in meters and c_n, c_e are the north and east of the array center, also in meters (assume 0 depth for the center since it's at sea level). Then,

az = ATAN[ (t_n-c_n)/(t_e-c_e) ], alternatively ATAN2[ (t_n-cn), (t_e-c_e) ]
el = ATAN[ SQRT[ (t_n-c_n)^2 + (t_e-c_e)^2 ]/t_d ], alternatively ATAN2[ SQRT[ (t_n-c_n)^2 + (t_e-c_e)^2 ], t_d ]

There is no real reference for this, just basic trig that I drew out. In the past, I have calculated t_n, t_e, c_n, c_e by converting the a priori coordinates to UTM. However, with the python tools we have we should be able to directly compute t_n-c_n and t_e-c_e by converting the transponder a priori position to ENU coordinates with the array center as the origin.

@johnbdesanto
Copy link
Collaborator

For a sanity check, consider NCL1, whose transponders and center have the following a priori:

 0    08       45.302064471    -124.978181346    -1176.5866     0.200000d0       1480.767
 1    12       45.295207747    -124.958752845    -1146.5881     0.320000d0       1480.816
 2    22       45.309643593    -124.959348875    -1133.7305     0.440000d0       1480.850

45.3023d0 -124.9656d0 ! Latitude/Longitude array center (decimal degrees)

For this array, I calculated the following azimuth and look angles for the transponders:

#Fetch 08 Azi Angle: -179.9, Look Angle: 39.99
#Fetch 12 Azi Angle: -57.16, Look Angle: 39.74
#Fetch 22 Azi Angle: 57.61, Look Angle: 40.02

@lsetiawan
Copy link
Member Author

@madhavmk I'll share with you some implementation code so you can implement the routine.

@lsetiawan
Copy link
Member Author

Update: @madhavmk I just went ahead and implemented the routine and plotting code for this on PR #174.

@lsetiawan lsetiawan linked a pull request Oct 19, 2023 that will close this issue
@madhavmk
Copy link
Collaborator

Thanks for the PR pointers @lsetiawan . I am taking a look at them.

@madhavmk madhavmk assigned madhavmk and lsetiawan and unassigned madhavmk Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants