-
Notifications
You must be signed in to change notification settings - Fork 2
Things to be aware when developing 2.x
Rafael Araujo Lehmkuhl edited this page Aug 11, 2020
·
1 revision
Welcome to the ADR wiki!
- Change of state should be done explicitly, not is "calc" functions without returns
- Get function should always return something
- Functions should have one purpose only
- Complex functions should be broken into separate simpler functions
- Concerns should be separated
- Functions should not have side effects they are not explicitly about
- Runtime should not create new files without being explicitly asked for
- Runtime should never create new files in the library folder
- Names have meanings
- If something is duplicated, it should be refactored
- Don't hardcode values. If there is some constant in the formula, make it a variable
- Don't ask the user for information you should already have
- If a function uses a value for its calculation and the value can vary, make it a argument of the function
- Make the functions return correctly on the full range of possible values
- Make the aerodynamic surfaces have an arbitrary number of sections
- Have a database of airfoils and all their necessary information (including CLmax if needed)
- Add the possibility to calculate moment of inertia given components CGs and masses
- Things like infinitely linear CLxAlpha curves make optimization impossible
- Simulation analysis (like takeoff) should be able to have their variables manipulated by the user (like the actuation angle and time of the tail)