Repository navigation
refactor!: remove the bundled catalogs and read APC files directly - #22
Merged
Merged
Conversation
The package carried 15 MB of motor and propeller catalogs. PyThrust now ships no catalog data: users bring their own files and PyThrust reads them. - pythrust.io.read_apc reads an APC PER3_*.dat performance file into a TablePropeller, in place of the JSON + CSV conversion. - TablePropeller holds its diameter and coefficient table itself; scaled() gives the propeller at another diameter. - MotorSpec moves to pythrust.motor; motor constants come from a datasheet. - Tests read one APC file from tests/data/ and keep motor values in the test code. Results match the golden values unchanged. - The Data Files page replaces Component Databases. BREAKING CHANGE: PropellerDatabase, PropellerEntry, PropellerMetadata, MotorDatabase, MotorEntry and the pythrust.motors package are removed, with the bundled motor and propeller data and scripts/convert_apc_dat.py. Import MotorSpec from pythrust.motor instead of pythrust.propulsion. Build a table propeller with read_apc(path) or TablePropeller(diameter_m, data_by_rpm) instead of TablePropeller(entry). PropulsionComponent's prop_entry option is now propeller. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PyThrust shipped 15 MB of motor and propeller catalogs inside the package. It now ships no catalog data: users bring their own files and PyThrust reads them. The motor catalog moved to Setuav/motor-data.
pythrust.io.read_apc(path)reads an APCPER3_*.datperformance file into aTablePropeller. It replaces the JSON + CSV format andscripts/convert_apc_dat.py.TablePropellerholds its diameter and coefficient table itself.scaled(diameter_m)gives the propeller at another diameter.MotorSpecmoves topythrust.motor. Motor constants come from a datasheet.tests/data/PER3_13x65E.dat, and keep motor values in the test code.Breaking changes
PropellerDatabase,PropellerEntry,PropellerMetadata,MotorDatabase,MotorEntry, thepythrust.motorspackage, the bundled motor and propeller data, andscripts/convert_apc_dat.py.MotorSpecfrompythrust.motorinstead ofpythrust.propulsion.read_apc(path)orTablePropeller(diameter_m, data_by_rpm)instead ofTablePropeller(entry).PropulsionComponent'sprop_entryoption is nowpropeller.Verification
read_apc.mkdocs build --strictpasses.rate_map_battery_mission.pyprints the same output as before.Notes
🤖 Generated with Claude Code