habsim-0.1.0.0: High Altitude Balloon flight path simulator

Safe HaskellNone
LanguageHaskell2010

Data.HABSim.Internal

Synopsis

Documentation

m :: Double #

Constants

r :: Double #

Constants

er :: Double #

Constants

newVolume :: Pressure -> Volume -> Pressure -> Volume #

Calculate new volume given an initial pressure and volume, and a new pressure

spRadFromVol :: Volume -> SphericalRadius #

Calculate sphereical radius from volume

boyancy :: Double -> Double -> Double -> Double #

Calculate boyancy.

biLinIntp :: Fractional a => a -> a -> a -> a -> a -> a -> a -> a -> a -> a -> a #

roundToClosest :: (Ord a, Num a, Integral b) => a -> Vector b -> b #

Given some number-like thing and a Vector of other number-like things, round the number-like thing to the closest thing in the Vector.

  • NOTE*: The vector must NOT be empty.

We should some day generalize this (Lens?), it seems useful.

latLonBox #

Arguments

:: Latitude 
-> Longitude 
-> Double

Resolution (units? newtype?)

-> (Latitude, Longitude, Latitude, Longitude) 

Take a Longitude and Latitude, multiply it by 1 / resolution, then take the floor and ceiling of both numbers and organize them as (f,f) (f,c) (c,f) (c,c) and report this back as the bounding box.

windFromLatLon :: Latitude -> Longitude -> Int -> HashMap Key GribLine -> Maybe (WindX, WindY) #

Given a Latitude, Longitude, and pressure, find the respective UGRDLine and VGRDLine if we can, from the given HashMap. Otherwise return Nothing.