Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
d14efa3
Add the area and CE to CG coordinate values
FireBoyAJ24 Jul 20, 2026
c448b7c
Added all the constants except for keel's z_k for boat_simulator stab…
FireBoyAJ24 Jul 20, 2026
c261a13
Add metacentric height and refactoring
FireBoyAJ24 Jul 23, 2026
a4652c6
Fix the hull sign errors
FireBoyAJ24 Jul 23, 2026
ff720e9
Fix hull force negative signs
FireBoyAJ24 Jul 23, 2026
98565a9
Merge branch 'main' into user/jay/remove_magic_constants
FireBoyAJ24 Jul 23, 2026
8b968b2
Note on a test
FireBoyAJ24 Jul 23, 2026
66d4c2c
Add substeps to increase integration resolution
FireBoyAJ24 Jul 23, 2026
38c7a0d
Merge branch 'user/jay/remove_magic_constants' of github.com:UBCSailb…
FireBoyAJ24 Jul 23, 2026
4fbc5c0
Fix the publish gps message and the gps message in kinematics
FireBoyAJ24 Jul 23, 2026
3d86a8e
Linting
FireBoyAJ24 Jul 23, 2026
4422457
Add rudder heading for pathfinding integration
FireBoyAJ24 Jul 23, 2026
7ccb6f3
Change info for fluid forces and kinematic calculations to debug
FireBoyAJ24 Jul 23, 2026
b8f1f92
Update codeowners
FireBoyAJ24 Jul 23, 2026
d9d62cf
Improve sim stdout and fix the keel constant
FireBoyAJ24 Jul 23, 2026
8dd3f89
Add variable reynolds number
FireBoyAJ24 Jul 23, 2026
3835825
Update the chord length
FireBoyAJ24 Jul 23, 2026
8402561
Updating comments
FireBoyAJ24 Jul 23, 2026
6d309b5
Switch reynolds number selection to closest one rather than log reynold
FireBoyAJ24 Jul 24, 2026
c02c765
Add test case to find the nearest reynolds number
FireBoyAJ24 Jul 24, 2026
3dcb7f7
Add trim tab and rudder angle to the logs
FireBoyAJ24 Jul 24, 2026
5e83cd9
How to run the building of airfoils_polars.py file
FireBoyAJ24 Jul 24, 2026
234cac4
Merge branch 'main' into user/jay/coefficients_of_lift_and_drag
FireBoyAJ24 Jul 24, 2026
ee7d4a9
Merge branch 'main' into user/jay/coefficients_of_lift_and_drag
FireBoyAJ24 Jul 28, 2026
94c4b20
Add bound_to_180 import statement
FireBoyAJ24 Jul 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions src/boat_simulator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,33 @@ ros2 launch boat_simulator main_launch.py [OPTIONS]...
To see a list of options for simulator configuration, add the `-s` flag at the
end of the above command.

## Regenerating airfoil coefficient data

The simulator's lift and drag forces depend on each foil's coefficients, which
vary with both the angle of attack, the Reynolds number (`Re = |v| * chord /
kinematic_viscosity`) and the mach number. For our calculations, we will consider the Reynolds number and angle of
attack Rather than a single hand-tuned curve per foil, the coefficients live in
[`common/airfoil_polars.py`](./boat_simulator/common/airfoil_polars.py) as a set of real airfoil polars
— one per Reynolds number — that the force computation selects from at runtime by picking the closest
tabulated Reynolds number.

That module is **generated**, not edited by hand. The
[`scripts/build_airfoil_polars.py`](./scripts/build_airfoil_polars.py) script downloads XFOIL polars from
[airfoiltools.com](http://airfoiltools.com) for each foil's NACA section
(keel and rudder use NACA 0012; wingsail and trim tab use NACA 0018) at Reynolds numbers 50k–1M,
resamples the pre-stall branch to whole-degree angles of attack, and extends each polar out to 90° with the
Viterna–Corrigan post-stall model
([More details on Viterna extrapolation](https://www.simis.io/docs/aerodynamic-loads-viterna-extrapolation))
(a sail sits near 90° when running dead downwind, well beyond XFOIL's ~±18° range).

Regenerate the data module after changing which foils, sections, Reynolds
numbers, or aspect ratios are modeled (all configured near the top of the
script). It requires network access and is never imported at runtime:

``` shell
python3 src/boat_simulator/scripts/build_airfoil_polars.py
```

## Test

Run the `test` task in the Sailbot Workspace. See
Expand Down
Loading
Loading