mirror of
https://github.com/nasa/trick.git
synced 2025-02-23 10:10:21 +00:00
Create README for SIM_cannon_analytic
This commit is contained in:
parent
d558dbd73d
commit
9035286609
trick_sims/SIM_cannon_analytic
48
trick_sims/SIM_cannon_analytic/README.md
Normal file
48
trick_sims/SIM_cannon_analytic/README.md
Normal file
@ -0,0 +1,48 @@
|
||||
#SIM\_cannon\_analytic
|
||||
---
|
||||
This is first of eight Trick-based simulations that one builds in the Trick
|
||||
Tutorial (Section 3). It's purpose is to introduce the fundamentals of building
|
||||
a Trick simulation.
|
||||
|
||||
Here we simulate the flight of a cannon ball, given an initial position, and
|
||||
velocity subject to the following assumptions and limitations:
|
||||
|
||||
* The **only** force acting on the cannon ball is gravity.
|
||||
* The acceleration of gravity (g) is constant and equal to -9.81 meters per
|
||||
second squared.
|
||||
* The ground is flat, and here, defined as where y=0.
|
||||
|
||||

|
||||
|
||||
--
|
||||
### Approach
|
||||
|
||||
Since this problem has a closed-form solution, that's what we use :
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
The time when the cannon ball impacts the ground is:
|
||||
|
||||

|
||||
|
||||
--
|
||||
### Inputs
|
||||
Variable | Type | Units
|
||||
-----------------------|----------------|-------
|
||||
dyn.cannon.pos0 | double[2] | m
|
||||
dyn.cannon.init\_angle | double | r
|
||||
dyn.cannon.init\_speed | double | m/s
|
||||
|
||||
The initial velocity is :
|
||||
|
||||
,
|
||||

|
||||
|
||||
--
|
||||
### Outputs
|
||||
Variable | Type | Units
|
||||
-----------------------|----------------|--------
|
||||
dyn.cannon.pos | double[2] | m
|
||||
dyn.cannon.vel | double[2] | m/s
|
BIN
trick_sims/SIM_cannon_analytic/images/CannonInit.png
Normal file
BIN
trick_sims/SIM_cannon_analytic/images/CannonInit.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 44 KiB |
BIN
trick_sims/SIM_cannon_analytic/images/initial_vel_x.png
Normal file
BIN
trick_sims/SIM_cannon_analytic/images/initial_vel_x.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 1.1 KiB |
BIN
trick_sims/SIM_cannon_analytic/images/initial_vel_y.png
Normal file
BIN
trick_sims/SIM_cannon_analytic/images/initial_vel_y.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 1.1 KiB |
BIN
trick_sims/SIM_cannon_analytic/images/solution_x.png
Normal file
BIN
trick_sims/SIM_cannon_analytic/images/solution_x.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 846 B |
BIN
trick_sims/SIM_cannon_analytic/images/solution_y.png
Normal file
BIN
trick_sims/SIM_cannon_analytic/images/solution_y.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 1.2 KiB |
BIN
trick_sims/SIM_cannon_analytic/images/time_of_impact.png
Normal file
BIN
trick_sims/SIM_cannon_analytic/images/time_of_impact.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 1.5 KiB |
Loading…
x
Reference in New Issue
Block a user