I used a direct method.  Part 2 shown.

   SPEED  NB. m/s in flight
8 13 20 12 9 10 3 9 37

   T0     NB. "on" duty cycle in seconds
8 4 7 4 5 4 37 12 1

   T1     NB. "off" duty cycle also in seconds
53 49 132 43 38 37 76 97 36

   T      NB. period of duty cycle, T0 + T1
61 53 139 47 43 41 113 109 37

   NB.distance =  rate *               time

   NB.                    full periods  +   "on" remainder
   +/(e.>./)"1   SPEED*"1(T0*"1<.TF%/T) +"1 T0<."1 |:T|/TF=:>:i.2503
1059 5 887 13 414 0 22 153 1

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to