module Drasil.Projectile.DataDefs (dataDefs, speedIX, speedIY) where
import Prelude hiding (sin, cos)
import Language.Drasil
import qualified Language.Drasil.Sentence.Combinators as S
import Theory.Drasil (DataDefinition, ddENoRefs)
import Data.Drasil.Quantities.Physics (iSpeed, ixVel, iyVel)
import Data.Drasil.Theories.Physics (vecMag)
import Drasil.Projectile.Figures (figLaunch)
import Drasil.Projectile.Unitals (launAngle)
dataDefs :: [DataDefinition]
dataDefs :: [DataDefinition]
dataDefs = [DataDefinition
vecMag, DataDefinition
speedIX, DataDefinition
speedIY]
speedIX, speedIY :: DataDefinition
speedIX :: DataDefinition
speedIX = SimpleQDef
-> Maybe Derivation -> String -> [Sentence] -> DataDefinition
ddENoRefs SimpleQDef
speedIXQD forall a. Maybe a
Nothing String
"speedIX" [Sentence
speedRef, Sentence
figRef]
speedIY :: DataDefinition
speedIY = SimpleQDef
-> Maybe Derivation -> String -> [Sentence] -> DataDefinition
ddENoRefs SimpleQDef
speedIYQD forall a. Maybe a
Nothing String
"speedIY" [Sentence
speedRef, Sentence
figRef]
speedIXQD, speedIYQD :: SimpleQDef
speedIXQD :: SimpleQDef
speedIXQD = forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef UnitalChunk
ixVel forall a b. (a -> b) -> a -> b
$ forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
iSpeed forall r. ExprC r => r -> r -> r
`mulRe` forall r. ExprC r => r -> r
cos (forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
launAngle)
speedIYQD :: SimpleQDef
speedIYQD = forall c e. (Quantity c, MayHaveUnit c) => c -> e -> QDefinition e
mkQuantDef UnitalChunk
iyVel forall a b. (a -> b) -> a -> b
$ forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy UnitalChunk
iSpeed forall r. ExprC r => r -> r -> r
`mulRe` forall r. ExprC r => r -> r
sin (forall r c. (ExprC r, HasUID c, HasSymbol c) => c -> r
sy ConstrConcept
launAngle)
speedRef :: Sentence
speedRef :: Sentence
speedRef = forall c. (HasUID c, HasSymbol c) => c -> Sentence
ch UnitalChunk
iSpeed Sentence -> Sentence -> Sentence
`S.is` String -> Sentence
S String
"from" Sentence -> Sentence -> Sentence
+:+. forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence
refS DataDefinition
vecMag
figRef :: Sentence
figRef :: Sentence
figRef = forall c. (HasUID c, HasSymbol c) => c -> Sentence
ch ConstrConcept
launAngle Sentence -> Sentence -> Sentence
`S.is` String -> Sentence
S String
"shown in" Sentence -> Sentence -> Sentence
+:+. forall r.
(HasUID r, HasRefAddress r, HasShortName r) =>
r -> Sentence
refS LabelledContent
figLaunch