How ardupilot/webtools works
Main Components
• Web Server/Static Hosting Environment: This serves all the static files (HTML, JS, CSS) and is the entry point for users.
• Individual Tools/Applications: Each tool (e.g., AnalyticTune, FilterReview, GeofenceGenerator, TelemetryDashboard, etc.) is essentially an independent client-side application, each with its own dedicated HTML file, main JavaScript file(s), and configuration (such as the params.json files).
• Shared Libraries: Represent the Libraries folder that provides common utilities (for math operations, file saving, logging, parameter handling, etc.) which are used across multiple tools.
• Modules: Display the modules folder and its subdirectories as external or third-party dependencies (e.g., JsDataflashParser, luxon, matrix, tabulator) that are used by the tools to handle more complex functionality such as parsing, date management, plotting, or user interface enhancements.
• External Integration Components: For example, the TelemetryDashboard is more complex—it includes integrations such as MAVLink (with its own submodules that handle message packing/unpacking) and widget systems supporting real-time telemetry display. This tool could be illustrated as interfacing with both in-built shared modules and additional external libraries (like TippyJS for tooltips).
Relationships and Interactions
• Data/configuration layering: Show that many tools load a params.json file for configuration, illustrating a pattern where each tool reads its own configuration.
• TelemetryDashboard Specifics: Highlight that this tool has additional interactions—its structure includes separate areas for widgets, examples, and a dedicated MAVLink integration layer (with local modules handling low-level message functionalities).
Architectural Patterns and Design Principles
• Modularity: Emphasize that the repository is structured into many self-contained, modular tools. Each tool can be developed, updated, or deployed independently.
• Reusability: The presence of shared libraries and modules underlines a design choice to reuse code across different tools.
• Client-side Single-Page Components: Since all tools are JavaScript/HTML based, they adhere to client-side patterns (though not a full SPA framework, they share the pattern of a central index.html entry point for navigation).
Technologies
• Core Technologies: HTML, CSS, and JavaScript.
• Development Tools: VSCode launch configurations suggest debugging is done with Chrome/Edge, which reinforces the client-side nature.
• Third-Party Libraries: Identify libraries like Plotly (for graphing), Luxon (for date/time management), and others such as TippyJS. Also, mention the custom modules for handling MavLink in TelemetryDashboard.