Skip to content

add ra4, gI, gA drag tables and sources where available#8

Merged
deicon merged 7 commits intodeicon:developfrom
lukepighetti:lukepighetti/more-drag-tables
Sep 8, 2025
Merged

add ra4, gI, gA drag tables and sources where available#8
deicon merged 7 commits intodeicon:developfrom
lukepighetti:lukepighetti/more-drag-tables

Conversation

@lukepighetti
Copy link
Contributor

@lukepighetti lukepighetti commented Sep 5, 2025

This pull request adds support for several new drag models to the drag.dart module, expanding the set of ballistic drag tables available. It introduces new drag table identifiers, provides corresponding data tables and curve calculations, and updates the drag function factory to handle these new types.

Support for new drag models:

  • Added new drag table IDs to the DragTableId enum: gI (source: mcgi), gA (airgun pellets), and ra4 (.22 LR), along with comments for documentation.
  • Added data tables and curve calculations for gI, gA, and ra4, including source references for traceability. [1] [2] [3] [4] [5] [6] [7]
  • Updated dragFunctionFactory to support the new drag tables, returning the appropriate function for each and throwing an UnimplementedError for gC (cylinder) as a placeholder.

Documentation and traceability:

  • Added source URLs as comments above each drag table definition for easier verification and maintenance. [1] [2] [3] [4] [5] [6] [7]

Bug fix:

  • Fixed a likely copy-paste bug by ensuring gACurve is calculated from gATable instead of ra4Table.

These changes make the drag model system more comprehensive and maintainable, allowing for more accurate ballistic calculations across a wider range of projectiles.

@deicon
Copy link
Owner

deicon commented Sep 5, 2025

I appreciate the effort you put into this here :) I just ported this lib last year during my vacation and obviously missed some important pieces :)

@deicon deicon requested a review from Copilot September 5, 2025 18:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR expands the drag model system by adding support for three new ballistic drag tables: gI (source: mcgi), gA (airgun pellets), and ra4 (.22 LR), along with comprehensive source documentation for traceability.

  • Adds new drag table identifiers to the DragTableId enum with descriptive comments
  • Implements data tables and curve calculations for the new drag models with source URLs
  • Updates the drag function factory to handle the new drag types and throws UnimplementedError for the unimplemented gC type

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@deicon deicon merged commit 6d75a64 into deicon:develop Sep 8, 2025
1 check passed
@lukepighetti lukepighetti deleted the lukepighetti/more-drag-tables branch September 8, 2025 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments