Skip to content

Weights in least squares estimation #389

Answered by aaron-skydio
tomastel asked this question in Q&A
Discussion options

You must be logged in to vote

Ah, I guess that doesn't really answer your question. If you have a covariance on sun_n_almanac, you could project that to a covariance on the result with something like this I think?

def sun_angle_residual(R_n_b: sm.Rot3, sun_b: sm.V3, sun_n_almanac: sm.V3, sun_n_almanac_cov_diag: sm.V3, epsilon: sm.Scalar):
      sun_n_pred = R_n_b*sun_b
      sun_n_pred_unit = geo.Unit3.from_vector(sun_n_pred)
      sun_n_almanac_unit  = geo.Unit3.from_vector(sun_n_almanac)
      diff = geo.V2(sun_n_almanac_unit.local_coordinates(sun_n_pred_unit))
      diff_D_sun_n_almanac = diff.jacobian(sun_n_almanac)
      diff_cov = diff_D_sun_n_almanac * geo.M33.diag(sun_n_almanac_cov_diag) * diff_D_sun_n_alm
anac.T

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@tomastel
Comment options

@aaron-skydio
Comment options

@aaron-skydio
Comment options

Answer selected by tomastel
@tomastel
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants