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

rtkpos ddidx restamb: rewrite for clarity #516

Open
wants to merge 1 commit into
base: demo5
Choose a base branch
from

Conversation

ourairquality
Copy link

Trying to follow these functions was a challenge, for me anyway, the indexing strides over the state vector, sats are referenced by differences like j-k (aka sat1), and restamb() was brittle and broke if the double diffs order produced by ddidx() changed at all. This should not change the function of these at all, it's just an attempt to clarify the code and make it less brittle.

For ddidx(), replace the baked in striding over the state vector with the use of the IB() macro. This makes the code less fragile if the state vector layout changes and make it easier to explore alternative double difference orderings.

Rewrite restamb() to use the index produced by ddidx() which it must match, rather than striding over the state vector in the same manner as ddidx(). Now many changes to the double difference indexing in ddidx() do not necessarily require matching chances to restamb().

There remains some code in holdamb() striding over the state vector, and that might need to match the indexing in ddidx(), and that is still brittle to changes in ddidx().

For ddidx(), replace the baked in striding over the state vector with
the use of the IB() macro. This makes the code less fragile if the
state vector layout changes and make it easier to explore alternative
double difference orderings.

Rewrite restamb() to use the index produced by ddidx() which it must
match, rather than striding over the state vector in the same manner
as ddidx(). Now many changes to the double difference indexing in
ddidx() do not necessarily require matching chances to restamb().

There remains some code in holdamb() striding over the state vector,
and that might need to match the indexing in ddidx(), and that is
still brittle to changes in ddidx().
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 this pull request may close these issues.

1 participant