-
Notifications
You must be signed in to change notification settings - Fork 370
Ipf trig #2478
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
base: master
Are you sure you want to change the base?
Ipf trig #2478
Conversation
….0-RC3 Update SITL binaries for 9.0.0-RC3
Branch Targeting SuggestionYou've targeted the
If This is an automated suggestion to help route contributions to the appropriate branch. |
PR Compliance Guide 🔍All compliance sections have been disabled in the configurations. |
| abs: { | ||
| type: 'function', | ||
| desc: 'Return absolute value', | ||
| params: ['value'], | ||
| returns: 'number', | ||
| inavOperation: 32 // OPERATION.ABS | ||
| returns: 'number' | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Restore the inavOperation: OPERATION.ABS property for the abs function definition, as it was likely removed by mistake and is necessary for correct transpilation. [possible issue, importance: 9]
| abs: { | |
| type: 'function', | |
| desc: 'Return absolute value', | |
| params: ['value'], | |
| returns: 'number', | |
| inavOperation: 32 // OPERATION.ABS | |
| returns: 'number' | |
| }, | |
| abs: { | |
| type: 'function', | |
| desc: 'Return absolute value', | |
| params: ['value'], | |
| returns: 'number', | |
| inavOperation: OPERATION.ABS | |
| }, |
| 57: { | ||
| name: "Trigonometry: ACos", | ||
| operandType: "Maths", | ||
| hasOperand: [true, true], | ||
| output: "raw" | ||
| }, | ||
| 58: { | ||
| name: "Trigonometry: ASin", | ||
| operandType: "Maths", | ||
| hasOperand: [true, true], | ||
| output: "raw" | ||
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion: Update the hasOperand property for ACOS and ASIN in js/logicConditionOperators.js from [true, true] to [true, false] to correctly reflect that they are single-argument functions. [general, importance: 6]
| 57: { | |
| name: "Trigonometry: ACos", | |
| operandType: "Maths", | |
| hasOperand: [true, true], | |
| output: "raw" | |
| }, | |
| 58: { | |
| name: "Trigonometry: ASin", | |
| operandType: "Maths", | |
| hasOperand: [true, true], | |
| output: "raw" | |
| }, | |
| 57: { | |
| name: "Trigonometry: ACos", | |
| operandType: "Maths", | |
| hasOperand: [true, false], | |
| output: "raw" | |
| }, | |
| 58: { | |
| name: "Trigonometry: ASin", | |
| operandType: "Maths", | |
| hasOperand: [true, false], | |
| output: "raw" | |
| }, |
User description
Add support for arc function IPF LCs (see iNavFlight/inav#11179)
PR Type
Enhancement, New Feature
Description
Add support for inverse trigonometric functions (acos, asin, atan2)
Replace hardcoded operation numbers with named constants for maintainability
Update error messages and diagnostics to reflect new supported functions
Define new logic operators 57, 58, 59 for arc trigonometry operations
Diagram Walkthrough
File Walkthrough
5 files
Add arc trig functions and refactor operation constantsImplement code generation for arc trigonometric functionsDefine new logic operators for arc trigonometryUpdate diagnostics to support arc trigonometric functionsAdd operation constants for arc trigonometric functions1 files
Add TypeScript type declarations for arc functions3 files