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
State interface with automatic coordinate transformations #237
Conversation
…e, use state interface in navigation instead
Providing test function (e.g. isPosValid(),...) should be enough for the critical parts to test themselves if they should start or go to some critical/safety mode
add a set(*format1, *format2, ...) function that can set all formats and only set the one that are not pointers to NULL ?
I think it would be good to merge this as soon as possible. It looks that the major parts needed to use it on rotorcraft are done and must be tested by as much people as possible (eg: merge into master) |
Since this is supposed to become a very stable API, we should make sure we choose the name wisely. |
I'm fine with replacing I think we can keep the current casing. Maybe the question is do we keep |
I think I would keep the |
body_rate_d is computed by the controller now, but it is not divided by the period yet, so the gain may change for different frequencies. it was not really computed before anyway... I doubt someone was really using this.
compiling but not tested
- INS interface build for FW and Rotorcraft on the same basis as AHRS - For FW, most of the old estimator (vertical kalman filter) as been moved to the new ins_float. Some triggers are missing for main_ap, especially the baro_event since the Baro interface is not done here. - Some more integration is needed to remove old estimator.c - INS modules should follow the general interface - FW main_ap is not very clear concerning the INS (nor the AHRS) because of the freq scaling part from CDW
So we can trigger ins_baro_update. Start to solve issue #106
need to handle baro measures coming from modules
Some modules can be used directly, some needs some more changes or adaptation
State interface with automatic coordinate transformations
A general state interface that holds all the most important vehicle states like position, speed, attitude, etc. for fixedwings and rotorcrafts alike. So any subsystem/module that needs to know any of these states should not get it directly from the ahrs, gps, airspeed sensors or whatever and just read it from the state interface. It will also do the appropriate coordinate and fixed/floating point conversions automatically and only when needed. This should decouple e.g. estimation and control more and also the "consumers" of vehicle states don't need to worry about where the data is actually coming from and in what format it was estimated or measured.
Current status:
stateSetPositionNed_i(pos_ned_i)
to set the position in fixed-point NED coordinatesstateGetPositionLla_f()
and only then the LLA float position representation is calculated and returned on the fly. It's also only calculated once, until a new position is set.There are however some open questions that need addressing before we go further:
See feature request #101