|
| 1 | +# Full Derivation |
| 2 | +We start with our basic equation definitions. |
| 3 | + *  |
| 4 | + *  |
| 5 | + *  |
| 6 | + |
| 7 | +## Reformulate |
| 8 | +First we want to reformulate in terms of our new  variable. |
| 9 | + *  |
| 10 | + |
| 11 | +We can rewrite this so we have a new definition of  |
| 12 | + *  |
| 13 | + |
| 14 | +This allows us to derive new values for the other equations. |
| 15 | + *  |
| 16 | + *  |
| 17 | + *  |
| 18 | + *  |
| 19 | + *  |
| 20 | + *  |
| 21 | + *  |
| 22 | + *  |
| 23 | + *  |
| 24 | + *  |
| 25 | + *  |
| 26 | + *  |
| 27 | + |
| 28 | +We're going to call this a new function , so now  is in terms of  |
| 29 | + *  |
| 30 | + |
| 31 | +## Taylor Series Expansion |
| 32 | +For computational efficiency, we are going to compute the Taylor series expansion. So first, we'll need the derivatives of . |
| 33 | + *  |
| 34 | + *  |
| 35 | + |
| 36 | +### 0th Order Taylor |
| 37 | + *  |
| 38 | + *  |
| 39 | + |
| 40 | +### 1st Order Taylor |
| 41 | + *  |
| 42 | + *  |
| 43 | + *  |
| 44 | + *  |
| 45 | + *  |
| 46 | + *  |
| 47 | + |
| 48 | +### 2nd Order Taylor |
| 49 | + *  |
| 50 | + *  |
| 51 | + *  |
| 52 | + *  |
| 53 | + *  |
| 54 | + *  |
| 55 | + *  |
| 56 | + *  |
| 57 | + |
| 58 | + *  |
| 59 | + *  |
| 60 | + |
| 61 | +## Exact coefficients |
| 62 | +Now that we have the general equations for the Taylor series, we can evaluate it at different values of a in the range `[0, 1]`. |
| 63 | + |
| 64 | +|  |  |  |  | |
| 65 | +| ------ | ----------- | ----------- | ----------- | |
| 66 | +| 0.0 | 0.7071 | 0.5000 | -0.1768 | |
| 67 | +| 0.5 | 0.7019 | 0.5270 | -0.2160 | |
| 68 | +| 1.0 | 0.5000 | 1.0000 | -0.5000 | |
| 69 | + |
| 70 | +Historically, the values used by [`navfn`](https://github.com/ros-planning/navigation/blob/1f335323a605b49b4108a845c55a7c1ba93a6f2e/navfn/src/navfn.cpp#L509) are |
| 71 | + |
| 72 | +|  |  |  | |
| 73 | +| ----------- | ----------- | ----------- | |
| 74 | +| 0.7040 | 0.5307 | -0.2301 | |
| 75 | + |
| 76 | +You can see these values plotted [here](https://www.desmos.com/calculator/vbpkey1mt6). |
| 77 | + |
| 78 | +The historical values are pretty close to the values for , although the exact reason for the difference is unknown, but its close enough to not be overly concerning. |
0 commit comments