Aerospace Blockset for xcos (2012-06-25: Coding week 5).
Created SECULAR_J2 propagator block
This is a block that allows to simulate satellite movement on a predefined orbit. It uses discrete sates and was my most complicated block to date.
Created KEP_TO_CAR block.
This block allows for conversion from keplerian orbit parameters to position and speed vectors. This is an important milestone for creating my Proof Of Concept demo at the end of next week.
Added unit tests for three blocks.
I've created unit tests utilizing Assert library. I did that for : KEPLERIAN_INPUT, SECULAR_J2 and PLOT_GROUNDTRACK blocks. The biggest challange was to write a test for groundtrack plotting. I've created a dedicated xcos diagram and Assert library to launch a simulation, save the plot and compare it with template file.
Added custom script for running unit tests
This script is not intended to be included in release. It serves the purpose of automating some of the jobs during development. It checks if the Aerospace Blockset is loaded (and loads it if it's not). Then it runs all unit tests to make. Now when i make a lot of code changes i can simply recompile blockset and run the script and make sure that nothing was broken in thee process.
Added a common debuging interface for blocks
So far I've been adding some debug messages to each new block to verify if the parameters passing, input/output calculation, etc. goes well throught the simulation. I also used messages to indicate which flag means what. Now I've created a xcos_block_debug function, which does all that for each bloc if scicos_debug is set to 2 or 3. This allowed me to declutter my blocks and run debug on all of them if necessary without addin debuging code to computational functions themselves. I've also updated all previously created blocks to use this interface and cleaned them up from any debugging messages i left before.
Updated PLOT_GROUNDTRACK block
- added additional parameterverification (checking if nuber of passed real parameters is correct)
- added support for inheriting events
- adjusted unit test of a block to compensate for changes above
Updated KEPLERIAN_INPUT block
- now using rpar instead of opar for passing real parameters.
- fixed problem where parameters where not set unless user opened parameter dialog at leas once
- Minor fix of plot_groundtrack_demo.xcos
- Some fixes of typos in code comments
- Code cleanup for various blocks
- Some updates of my template block (DUMMY_BLOCK)
- Added satellite_on_orbit.xcos demo (which now is a nearly end-to-end scenario, missing pnly one coordinate conversion)