-- Assemble all of the mathematical expressions here, to promote re-use
--
-- This is supposed to always be imported qualified, since we're purposefully
-- overloading the names.
module Drasil.Projectile.Expressions where

import Prelude hiding (cos, sin)

import Language.Drasil
import qualified Data.Drasil.Quantities.Physics as QP (iSpeed,
  constAccel, xConstAccel, yConstAccel, ixPos, iyPos)
import Data.Drasil.Quantities.Physics (gravitationalAccel, gravitationalAccelConst,
  ixVel, iyVel, xPos, yPos, time, iPos, scalarPos, xVel, yVel, xAccel, yAccel, position, 
  velocity, acceleration, constAccelV, speed)
import Drasil.Projectile.Unitals (launAngle, launSpeed, targPos, tol, landPos, offset)

flightDur', iyPos, yConstAccel, iSpeed :: PExpr
flightDur' :: PExpr
flightDur' = Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2 r -> r -> r
forall r. ExprC r => r -> r -> r
$* ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
launSpeed r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
launAngle) r -> r -> r
forall r. ExprC r => r -> r -> r
$/ ConstQDef -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstQDef
gravitationalAccelConst
iyPos :: PExpr
iyPos = Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
0                              -- launchOrigin
yConstAccel :: PExpr
yConstAccel = r -> r
forall r. ExprC r => r -> r
neg (r -> r) -> r -> r
forall a b. (a -> b) -> a -> b
$ ConstQDef -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstQDef
gravitationalAccelConst  -- accelYGravity
iSpeed :: PExpr
iSpeed = ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
launSpeed

offset' :: PExpr
offset' :: PExpr
offset' = ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
landPos r -> r -> r
forall r. ExprC r => r -> r -> r
$- ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
targPos

message :: PExpr
message :: PExpr
message = [(r, r)] -> r
forall r. ExprC r => [(r, r)] -> r
completeCase [(r, r)
case1, (r, r)
case2, (r, r)
case3]
  where case1 :: (r, r)
case1 = (String -> r
forall r. LiteralC r => String -> r
str String
"The target was hit.",        r -> r
forall r. ExprC r => r -> r
abs_ (ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
offset r -> r -> r
forall r. ExprC r => r -> r -> r
$/ ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
targPos) r -> r -> r
forall r. ExprC r => r -> r -> r
$< ConstQDef -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstQDef
tol)
        case2 :: (r, r)
case2 = (String -> r
forall r. LiteralC r => String -> r
str String
"The projectile fell short.", ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
offset r -> r -> r
forall r. ExprC r => r -> r -> r
$< Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
0)
        case3 :: (r, r)
case3 = (String -> r
forall r. LiteralC r => String -> r
str String
"The projectile went long.",  ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
offset r -> r -> r
forall r. ExprC r => r -> r -> r
$> Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
0)

--
speed' :: PExpr
speed' :: PExpr
speed' = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
QP.iSpeed 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
QP.constAccel 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
time)

scalarPos' :: PExpr
scalarPos' :: PExpr
scalarPos' = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
iPos 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
QP.iSpeed 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
time r -> r -> r
forall r. ExprC r => r -> r -> r
$+ r -> r
forall r. (ExprC r, LiteralC r) => r -> r
half (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
QP.constAccel 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
time)))

rectNoTime :: PExpr
rectNoTime :: PExpr
rectNoTime = 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
speed) 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
QP.iSpeed) 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
QP.constAccel 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
scalarPos 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
iPos))

--
velVecExpr :: PExpr
velVecExpr :: PExpr
velVecExpr = r -> r -> r
forall r. ExprC r => r -> r -> r
vec2D (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
ixVel 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
QP.xConstAccel 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
time)) (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
iyVel 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
QP.yConstAccel 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
time))

--
posVecExpr :: PExpr
posVecExpr :: PExpr
posVecExpr = r -> r -> r
forall r. ExprC r => r -> r -> r
vec2D
              (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
QP.ixPos 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
ixVel 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
time) r -> r -> r
forall r. ExprC r => r -> r -> r
$+ r -> r
forall r. (ExprC r, LiteralC r) => r -> r
half (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
QP.xConstAccel 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
time)))
              (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
QP.iyPos 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
iyVel 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
time) r -> r -> r
forall r. ExprC r => r -> r -> r
$+ r -> r
forall r. (ExprC r, LiteralC r) => r -> r
half (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
QP.yConstAccel 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
time)))

--
landPosExpr :: PExpr
landPosExpr :: PExpr
landPosExpr = 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, LiteralC r) => r -> r
square (ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
launSpeed) r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
sin (ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
launAngle) r -> r -> r
forall r. ExprC r => r -> r -> r
$* r -> r
forall r. ExprC r => r -> r
cos (ConstrConcept -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
launAngle) r -> r -> r
forall r. ExprC r => r -> r -> r
$/ ConstQDef -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstQDef
gravitationalAccelConst

-- Helper expressions that represent the vectors of quantities as components
positionXY, velocityXY, accelerationXY, constAccelXY :: PExpr
positionXY :: PExpr
positionXY     = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
position     r -> r -> r
forall r. ExprC r => r -> r -> r
$= r -> r -> r
forall r. ExprC r => r -> r -> r
vec2D (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
xPos)           (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
yPos)
velocityXY :: PExpr
velocityXY     = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
velocity     r -> r -> r
forall r. ExprC r => r -> r -> r
$= r -> r -> r
forall r. ExprC r => r -> r -> r
vec2D (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
xVel)           (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
yVel)
accelerationXY :: PExpr
accelerationXY = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
acceleration r -> r -> r
forall r. ExprC r => r -> r -> r
$= r -> r -> r
forall r. ExprC r => r -> r -> r
vec2D (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
xAccel)         (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
yAccel)
constAccelXY :: PExpr
constAccelXY   = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
constAccelV  r -> r -> r
forall r. ExprC r => r -> r -> r
$= r -> r -> r
forall r. ExprC r => r -> r -> r
vec2D (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
QP.xConstAccel) (UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
QP.yConstAccel)

-- Expressions for Lesson
horizVel, horizPos :: PExpr
horizVel :: PExpr
horizVel = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
xVel 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
ixVel
horizPos :: PExpr
horizPos = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
xPos 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
QP.ixPos 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
ixVel 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
time)

vertVel, vertPos, vertNoTime :: PExpr
vertVel :: PExpr
vertVel = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
yVel 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
iyVel 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 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
time)
vertPos :: PExpr
vertPos = UnitalChunk -> r
forall c. (HasUID c, HasSymbol c) => c -> r
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
yPos 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
QP.iyPos 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
iyVel 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
time) 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 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
time) r -> r -> r
forall r. ExprC r => r -> r -> r
$/ Integer -> r
forall r. LiteralC r => Integer -> r
exactDbl Integer
2)
vertNoTime :: PExpr
vertNoTime = 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
yVel) 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
iyVel) 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
gravitationalAccel 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
yPos 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
QP.iyPos)) 

lcrectVel, lcrectPos, lcrectNoTime, lchorizVel, lchorizPos, lcvertVel, lcvertPos, lcvertNoTime :: LabelledContent
lcrectVel :: LabelledContent
lcrectVel = ModelExpr -> Reference -> LabelledContent
lbldExpr (UnitalChunk -> ModelExpr
forall c. (HasUID c, HasSymbol c) => c -> ModelExpr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
speed ModelExpr -> ModelExpr -> ModelExpr
forall r. ExprC r => r -> r -> r
$= ModelExpr
PExpr
speed') (String -> Reference
makeEqnRef String
"rectVel")
lcrectPos :: LabelledContent
lcrectPos = ModelExpr -> Reference -> LabelledContent
lbldExpr (UnitalChunk -> ModelExpr
forall c. (HasUID c, HasSymbol c) => c -> ModelExpr
forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
scalarPos ModelExpr -> ModelExpr -> ModelExpr
forall r. ExprC r => r -> r -> r
$= ModelExpr
PExpr
scalarPos') (String -> Reference
makeEqnRef String
"rectPos")
lcrectNoTime :: LabelledContent
lcrectNoTime = ModelExpr -> Reference -> LabelledContent
lbldExpr ModelExpr
PExpr
rectNoTime (String -> Reference
makeEqnRef String
"rectNoTime")
lchorizVel :: LabelledContent
lchorizVel = ModelExpr -> Reference -> LabelledContent
lbldExpr ModelExpr
PExpr
horizVel (String -> Reference
makeEqnRef String
"horizVel")
lchorizPos :: LabelledContent
lchorizPos = ModelExpr -> Reference -> LabelledContent
lbldExpr ModelExpr
PExpr
horizPos (String -> Reference
makeEqnRef String
"horizPos")
lcvertVel :: LabelledContent
lcvertVel = ModelExpr -> Reference -> LabelledContent
lbldExpr ModelExpr
PExpr
vertVel (String -> Reference
makeEqnRef String
"vertVel")
lcvertPos :: LabelledContent
lcvertPos = ModelExpr -> Reference -> LabelledContent
lbldExpr ModelExpr
PExpr
vertPos (String -> Reference
makeEqnRef String
"vertPos")
lcvertNoTime :: LabelledContent
lcvertNoTime = ModelExpr -> Reference -> LabelledContent
lbldExpr ModelExpr
PExpr
vertNoTime (String -> Reference
makeEqnRef String
"vertNoTime")

-- References --
eqnRefs :: [Reference]
eqnRefs :: [Reference]
eqnRefs = (LabelledContent -> Reference) -> [LabelledContent] -> [Reference]
forall a b. (a -> b) -> [a] -> [b]
map LabelledContent -> Reference
forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Reference
ref [LabelledContent
lcrectVel, LabelledContent
lcrectPos, LabelledContent
lcrectNoTime, LabelledContent
lchorizVel, LabelledContent
lchorizPos, LabelledContent
lcvertVel, LabelledContent
lcvertPos, LabelledContent
lcvertNoTime]