Fixed #1136: rocket trajectory example broken

This commit is contained in:
jos 2018-07-04 10:10:28 +02:00
parent 4052d59fea
commit 41febe2bc1
2 changed files with 8 additions and 2 deletions

View File

@ -1,5 +1,11 @@
# History
## not yet released, version 5.0.2
- Fixed #1136: rocket trajectory example broken (since v4.0.0).
## 2018-07-01, version 5.0.1
- Improved error messaging when converting units. Thanks @gap777.

View File

@ -68,9 +68,9 @@
// Define the equations of motion. It is important to maintain the same argument order for each of these functions.
sim.eval("drdt(r, v, m, phi, gamma) = v sin(gamma)")
sim.eval("dvdt(r, v, m, phi, gamma) = -mu / r^2 sin(gamma) + T / m")
sim.eval("dvdt(r, v, m, phi, gamma) = -mu / r^2 * sin(gamma) + T / m")
sim.eval("dmdt(r, v, m, phi, gamma) = -T/g0/isp")
sim.eval("dphidt(r, v, m, phi, gamma) = v/r cos(gamma) * rad")
sim.eval("dphidt(r, v, m, phi, gamma) = v/r * cos(gamma) * rad")
sim.eval("dgammadt(r, v, m, phi, gamma) = (1/r * (v - mu / (r v)) * cos(gamma)) * rad")
// Again, remember to maintain the same variable order in the call to ndsolve.