module Drasil.DblPend.Expressions where

import Prelude hiding (sin, cos, sqrt)
import Language.Drasil

import Data.Drasil.Quantities.Physics (gravitationalAccel, gravitationalMagnitude)
import Drasil.DblPend.DataDefs (positionXEqn_1)
import Drasil.DblPend.Unitals (lenRod_1, lenRod_2, massObj_1, massObj_2,
  xVel_1, yVel_1, xAccel_1, yAccel_1, angularAccel_1, angularAccel_2,
  tension_1, tension_2, angularVel_1, angularVel_2,
  pendDisAngle_1, pendDisAngle_2)

-- Velocity X/Y First Object
velXExpr_1, velYExpr_1 :: PExpr
velXExpr_1 :: PExpr
velXExpr_1 = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1)
velYExpr_1 :: PExpr
velYExpr_1 = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r
PExpr
positionXEqn_1

-- Velocity X/Y Second Object
velXExpr_2, velYExpr_2 :: PExpr
velXExpr_2 :: PExpr
velXExpr_2 = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
xVel_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$+ (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2))
velYExpr_2 :: PExpr
velYExpr_2 = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
yVel_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$+ (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2))

-- Acceleration X/Y First Object
accelXExpr_1, accelYExpr_1 :: PExpr
accelXExpr_1 :: PExpr
accelXExpr_1 = r -> r
forall r. ExprC r => r -> r
neg (r -> r
forall r. (ExprC r, LiteralC r) => r -> r
square (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_1) r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1))
                r -> r -> r
forall r. ExprC r => r -> r -> r
$+ (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularAccel_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1))
accelYExpr_1 :: PExpr
accelYExpr_1 = (r -> r
forall r. (ExprC r, LiteralC r) => r -> r
square (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_1) r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1))
                r -> r -> r
forall r. ExprC r => r -> r -> r
$+ (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularAccel_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1))

-- Acceleration X/Y Second Object
accelXExpr_2, accelYExpr_2 :: PExpr
accelXExpr_2 :: PExpr
accelXExpr_2 = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
xAccel_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$-
                (r -> r
forall r. (ExprC r, LiteralC r) => r -> r
square (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_2) r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2))
                r -> r -> r
forall r. ExprC r => r -> r -> r
$+ (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularAccel_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2))
accelYExpr_2 :: PExpr
accelYExpr_2 = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
yAccel_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$+
                (r -> r
forall r. (ExprC r, LiteralC r) => r -> r
square (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_2) r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2))
                r -> r -> r
forall r. ExprC r => r -> r -> r
$+ (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularAccel_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2))

-- Horizontal/Vertical force acting on the first object
xForceWithAngle_1 :: PExpr
xForceWithAngle_1 :: PExpr
xForceWithAngle_1 = r -> r
forall r. ExprC r => r -> r
neg (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
tension_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1)) r -> r -> r
forall r. ExprC r => r -> r -> r
$+
                    (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
tension_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2))

yForceWithAngle_1 :: PExpr
yForceWithAngle_1 :: PExpr
yForceWithAngle_1 = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
tension_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1) r -> r -> r
forall r. ExprC r => r -> r -> r
$- 
                    (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
tension_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2)) r -> r -> r
forall r. ExprC r => r -> r -> r
$- 
                    (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
gravitationalAccel)

-- Horizontal/Vertical force acting on the second object
xForceWithAngle_2 :: PExpr
xForceWithAngle_2 :: PExpr
xForceWithAngle_2 = r -> r
forall r. ExprC r => r -> r
neg (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
tension_2) r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2)

yForceWithAngle_2 :: PExpr
yForceWithAngle_2 :: PExpr
yForceWithAngle_2 = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
tension_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2) r -> r -> r
forall r. ExprC r => r -> r -> r
$- 
                    (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
gravitationalAccel)

-- Angular acceleration acting on the first object
angularAccelExpr_1 :: PExpr
angularAccelExpr_1 :: PExpr
angularAccelExpr_1 = r -> r
forall r. ExprC r => r -> r
neg(UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
gravitationalMagnitude) r -> r -> r
forall r. ExprC r => r -> r -> r
$* 
                   (Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$+ UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_2) r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1 ) r -> r -> r
forall r. ExprC r => r -> r -> r
$-
                   (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
gravitationalMagnitude r -> r -> r
forall r. ExprC r => r -> r -> r
$* 
                   r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$- (Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2))) r -> r -> r
forall r. ExprC r => r -> r -> r
$-
                   ((Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$- UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2 )) r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* 
                   (
                       r -> r
forall r. (ExprC r, LiteralC r) => r -> r
square (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_2) r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$+ 
                       (r -> r
forall r. (ExprC r, LiteralC r) => r -> r
square (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_1) r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$- UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2))
                   ))
                   r -> r -> r
forall r. ExprC r => r -> r -> r
$/
                   UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* 
                   (
                       Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$+ UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$- 
                       (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* 
                       r -> r
forall r. ExprC r => r -> r
cos (Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$- (Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2)))
                   )

-- Angular acceleration acting on the first object
angularAccelExpr_2 :: PExpr
angularAccelExpr_2 :: PExpr
angularAccelExpr_2 = Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$- UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2) r -> r -> r
forall r. ExprC r => r -> r -> r
$* 
                   (
                       r -> r
forall r. (ExprC r, LiteralC r) => r -> r
square (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_1) r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$* (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$+ UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_2 ) r -> r -> r
forall r. ExprC r => r -> r -> r
$+
                       (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
gravitationalMagnitude r -> r -> r
forall r. ExprC r => r -> r -> r
$* (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$+ UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_2 ) r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1)) r -> r -> r
forall r. ExprC r => r -> r -> r
$+
                       (r -> r
forall r. (ExprC r, LiteralC r) => r -> r
square (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
angularVel_2) r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* 
                       r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$- UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2 ))
                   )
                   r -> r -> r
forall r. ExprC r => r -> r -> r
$/
                   UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
lenRod_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* 
                   (
                       Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$+ UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$- 
                       (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
massObj_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* 
                       r -> r
forall r. ExprC r => r -> r
cos (Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1 r -> r -> r
forall r. ExprC r => r -> r -> r
$- (Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2)))
                   )

-- Angular acceleration support equations in IM
forceDerivExpr1 :: PExpr
forceDerivExpr1 :: PExpr
forceDerivExpr1 = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
tension_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2)
forceDerivExpr2 :: PExpr
forceDerivExpr2 :: PExpr
forceDerivExpr2 = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
tension_2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2)

cosAngleExpr1 :: PExpr
cosAngleExpr1 :: PExpr
cosAngleExpr1 = r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1)
sinAngleExpr1 :: PExpr
sinAngleExpr1 :: PExpr
sinAngleExpr1 = r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_1)

cosAngleExpr2 :: PExpr
cosAngleExpr2 :: PExpr
cosAngleExpr2 = r -> r
forall r. ExprC r => r -> r
cos (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2)
sinAngleExpr2 :: PExpr
sinAngleExpr2 :: PExpr
sinAngleExpr2 = r -> r
forall r. ExprC r => r -> r
sin (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
pendDisAngle_2)