User:Dora Gustafson/wind motor core

From Second Life Wiki
< User:Dora Gustafson
Revision as of 11:20, 10 December 2016 by Dora Gustafson (talk | contribs) (Created page with " == Wind motor core == ==== For use in virtual sailboats in SL ==== This wind motor uses four '''vectors''' to calculate boat velocity: # '''''v''''': boat velocity # '''''win...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Wind motor core

For use in virtual sailboats in SL

This wind motor uses four vectors to calculate boat velocity:

  1. v: boat velocity
  2. wind: wind velocity, direction at wind's eye
  3. head: boat heading, normalized vector
  4. n: sail normal, normalized vector. It doesn't matter which one of two normals is used
v = head∙(-n∙(v + wind)*n)*head

The tricky thing in a wind motor is that v is a function of v and it can not be isolated
Therefor v is calculated by iteration, i.e. repeated calculations using the previous result
Notes

  1. head and n are normalized vectors
  2. It does not matter if the positive or negative sail normal n is used in the equation
  3. wind is pointing the wind's eye so the wind blows opposite. Thus the minus sign in the equation
  4. The magnitude of wind is the wind speed
  5. The magnitude of v is the boat speed