Resources Numerical accuracy

Calculations

Every calculation under our calculation policies: what it works out, its formula and the precision it runs at. Open one to see its code as it is in the released app.

  • 6,917 calculations in 1,248 source files
  • 143 exact
  • 6,286 in 64-bit
  • 335 with a 32-bit step
  • Last reviewed

Calculations

  • Curve to bulge

    The bulge of a feature-line arc from its start, center and end.

    sweep = (a₁ − a₀) mod 2π; bulge = ± tan(sweep ÷ 4)

    LandXML export and import landxml.js
    • CivilCraft
    64-bit
  • Sump depth of a structure

    The depth of a structure's sump below its lowest pipe invert.

    sump depth = max(0, lowest invert − sump elevation)

    LandXML export and import landxml.js
    • CivilCraft
    64-bit
  • Joining feature-line pieces

    Joins consecutive lines and curves of a plan feature into one line.

    LandXML export and import landxml.js
    • CivilCraft
    64-bit
  • Scaling an import to project units

    Multiplies every coordinate, elevation, station, radius and length of an import by one factor.

    LandXML export and import landxml.js
    • CivilCraft
    64-bit
  • Mass ordinate

    The running total of earth along the alignment, and the cut and fill totals.

    m_i = m_(i−1) + cut_i × factor − fill_i

    Mass-haul diagram masshaul.js
    • CivilCraft
    64-bit
  • Balance points

    The stations where the mass ordinate crosses zero.

    sta = sta_a + (sta_b − sta_a) × m_a ÷ (m_a − m_b)

    Mass-haul diagram masshaul.js
    • CivilCraft
    64-bit
  • Volume moved and average haul

    For each balanced stretch, the volume moved and the average distance it travels.

    volume = |peak| − |end level|; haul = ∫ (|m| − |end level|)⁺ d(sta) ÷ volume

    Mass-haul diagram masshaul.js
    • CivilCraft
    64-bit
  • Totals and what is left over

    Total cut, adjusted cut, fill, the end ordinate, and whether the job wastes, borrows or balances.

    balanced when |end| < 1e-6 × max(1, cut + fill)

    Mass-haul diagram masshaul.js
    • CivilCraft
    64-bit
  • CSV export

    Writes the stations, ordinates and spans as a CSV file in cubic yards or cubic meters.

    cubic yards = cubic feet ÷ 27

    Mass-haul diagram masshaul.js
    • CivilCraft
    64-bit
  • Footprint and floor area of an option

    The footprint area and gross floor area of each alternative, in square meters.

    area (m²) = |A| ÷ 10⁶; gross = area × floors

    Massing options placed on a lot massing-options.js
    • CivilCraft
    64-bit
  • Is the footprint a simple polygon

    Refuses a footprint whose edges cross.

    Massing options placed on a lot massing-options.js
    • CivilCraft
    64-bit
  • Turning and moving a footprint

    Rotates a footprint about its centroid and moves it to a position.

    x′ = t_x + (x − c_x)·cos a − (y − c_y)·sin a; y′ = t_y + (x − c_x)·sin a + (y − c_y)·cos a

    Massing options placed on a lot massing-options.js
    • CivilCraft
    64-bit
  • Placing an option in the envelope

    The position and rotation at which as much of the footprint as possible lies inside the buildable envelope.

    k = 0.001 ÷ meters per project unit; inside = area(envelope ∩ footprint) ÷ area(footprint)

    Massing options placed on a lot massing-options.js
    • CivilCraft
    64-bit
  • Option to a mass

    Makes a project mass from a placed option, with its floor height in project units.

    floor height = mm × 0.001 ÷ meters per project unit

    Massing options placed on a lot massing-options.js
    • CivilCraft
    64-bit
  • Envelope file

    Writes the buildable envelope in millimeters, turned so its longest edge lies along x.

    mm = meters per project unit × 1000; value = round(v × 10) ÷ 10

    Massing options placed on a lot massing-options.js
    • CivilCraft
    64-bit
  • Footprint area

    The signed area of a mass outline.

    A = Σ (x_i·y_j − x_j·y_i) ÷ 2

    Building mass areas, levels and base earthwork massing.js
    • CivilCraft
    64-bit
  • Gross floor area and height

    The floor area of all floors and the height of the mass.

    GFA = |A| × floors; height = floors × floor height

    Building mass areas, levels and base earthwork massing.js
    • CivilCraft
    64-bit
  • Centroid

    The center of area of the outline.

    c_x = Σ (x_i + x_j)·k_ij ÷ 6A, k_ij = x_i·y_j − x_j·y_i

    Building mass areas, levels and base earthwork massing.js
    • CivilCraft
    64-bit
  • Ground under a mass

    The lowest, highest and mean ground elevation under the footprint, and the samples used for earthwork.

    sample (i, j) at x₀ + (i + 0.5)·dx, y₀ + (j + 0.5)·dy; dA = |A| ÷ samples; mean = Σ z ÷ n

    Building mass areas, levels and base earthwork massing.js
    • CivilCraft
    64-bit
  • Ground floor level

    The level the mass is set at: the mean ground, the highest ground (podium) or the lowest (cut in).

    Building mass areas, levels and base earthwork massing.js
    • CivilCraft
    64-bit
  • Cut and fill under a mass

    The earth to remove above the ground floor level and to place below it.

    fill = Σ (z₀ − z)·dA where z < z₀; cut = Σ (z − z₀)·dA otherwise

    Building mass areas, levels and base earthwork massing.js
    • CivilCraft
    64-bit
  • Floor levels

    The elevation of each floor and its top.

    z_i = z₀ + i × floor height

    Building mass areas, levels and base earthwork massing.js
    • CivilCraft
    64-bit
  • Floors for a pulled height

    The floor count nearest to a height set by push and pull.

    floors = clamp(round(H ÷ floor height), 1, 200)

    Building mass areas, levels and base earthwork massing.js
    • CivilCraft
    Exact
  • Triangles of a footprint

    Splits a simple polygon into triangles for the pad top and the roof.

    Building mass areas, levels and base earthwork massing.js
    • CivilCraft
    64-bit
  • Mass prism mesh

    The triangles of the walls and roof of a mass.

    Building mass mesh for the 3D view massing.js
    • CivilCraft
    32-bit, display only
  • Lengths, bearings, grades and area

    Every number the Measure tool shows for a picked line or shape.

    L = hypot(Δx, Δy); bearing = atan2(Δy, Δx); grade % = Δz ÷ L × 100; L₃ = hypot(L, Δz); area = |Σ (x_i·y_j − x_j·y_i)| ÷ 2

    Measure tool measure.js
    • CivilCraft
    64-bit
  • Between two points on a profile

    The horizontal distance, height difference, straight-line distance and grade between two profile points.

    dx = |ch_b − ch_a|; dz = z_b − z_a; slope distance = hypot(dx, dz); grade % = dz ÷ dx × 100

    Measure tool measure.js
    • CivilCraft
    64-bit
  • Overall slope angle

    The overall pit slope from bench height, face angle, berm width and ramp.

    OSA = atan(H ÷ (H ÷ tan α + B + ramp × share))

    Block model, ultimate pit and mine schedule mining.js
    • CivilCraft
    64-bit
  • Block grid

    The block index, block center and block volume of a regular grid.

    center = origin + (i + 0.5) × size; volume = dx × dy × dz

    Block model, ultimate pit and mine schedule mining.js
    • CivilCraft
    64-bit
  • Grade by inverse distance weighting

    Each block's grade from the drill-hole samples around it.

    grade = Σ (g_s ÷ d_s^p) ÷ Σ (1 ÷ d_s^p)

    Block model, ultimate pit and mine schedule mining.js
    • CivilCraft
    64-bit
  • Block value

    The money each block is worth if mined: ore margin less mining cost, or the cost of waste.

    t = volume × density; ore = t × (grade × recovery × price − process cost); value = ore − t × mining cost, or −t × waste cost

    Block model, ultimate pit and mine schedule mining.js
    • CivilCraft
    64-bit
  • Maximum flow

    The maximum flow from which the ultimate pit is read.

    Block model, ultimate pit and mine schedule mining.js
    • CivilCraft
    64-bit
  • Ultimate pit

    The set of blocks to mine for the highest total value within the slope, with its value, ore and waste tonnes.

    reach per layer = dz ÷ tan(slope); blocks above within round(reach ÷ dx), round(reach ÷ dy) and hypot ≤ reach

    Block model, ultimate pit and mine schedule mining.js
    • CivilCraft
    64-bit
  • Grade and tonnage curve

    The tonnes and mean grade of everything at or above each cut-off grade.

    tonnes = Σ t; grade = Σ (t × g) ÷ Σ t

    Block model, ultimate pit and mine schedule mining.js
    • CivilCraft
    64-bit
  • Bench report

    Ore and waste tonnes, mean grade and strip ratio for each bench.

    strip = waste ÷ ore; z = origin_z + (k + 1) × dz

    Block model, ultimate pit and mine schedule mining.js
    • CivilCraft
    64-bit
  • Ramp length

    The length of ramp needed to climb a number of benches at a grade.

    per bench = H ÷ grade; total = per bench × benches

    Block model, ultimate pit and mine schedule mining.js
    • CivilCraft
    64-bit
  • Production schedule and net present value

    Assigns blocks to periods within ore and movement capacities and discounts each period's cash flow.

    PV_t = cash_t ÷ (1 + discount)^t; NPV = Σ PV_t

    Block model, ultimate pit and mine schedule mining.js
    • CivilCraft
    64-bit
  • Angle from degrees, minutes and seconds

    Reads an angle typed as degrees, minutes and seconds or as decimal degrees.

    degrees = d + m ÷ 60 + s ÷ 3600

    Parcels: deed calls, closure, area and legal description parcels.js
    • CivilCraft
    64-bit
  • Bearing to direction

    Turns a quadrant bearing or an azimuth into a direction in radians from east, counter-clockwise.

    direction = (90° − azimuth) × π ÷ 180, wrapped to 0…2π

    Parcels: deed calls, closure, area and legal description parcels.js
    • CivilCraft
    64-bit
  • Central angle of a curve call

    The central angle of a deed curve from its arc length, or as typed.

    Δ = L ÷ R

    Parcels: deed calls, closure, area and legal description parcels.js
    • CivilCraft
    64-bit
  • Traverse and misclosure

    The corners reached by the calls, the gap back to the start, the total length and the precision ratio.

    p ← p + d·(cos θ, sin θ); chord = 2R·sin(Δ ÷ 2); misclosure = |end − start|; precision = length ÷ misclosure

    Parcels: deed calls, closure, area and legal description parcels.js
    • CivilCraft
    64-bit
  • Curve from a bulge

    The radius, length, central angle, chord, tangent directions and center of a curved course.

    Δ = 4·atan|b|; R = chord ÷ (2·sin(Δ ÷ 2)); L = R × Δ; center = start + R·(cos, sin)(dir_in ± 90°)

    Parcels: deed calls, closure, area and legal description parcels.js
    • CivilCraft
    64-bit
  • Courses of a parcel

    Each side of the parcel as a line (direction and distance) or a curve.

    direction = atan2(Δy, Δx); distance = hypot(Δx, Δy)

    Parcels: deed calls, closure, area and legal description parcels.js
    • CivilCraft
    64-bit
  • Parcel area

    The area of the parcel, with curved sides counted exactly.

    2A = Σ (x_i·y_j − x_j·y_i) + Σ ± R²·(Δ − sin Δ); area = |2A| ÷ 2

    Parcels: deed calls, closure, area and legal description parcels.js
    • CivilCraft
    64-bit
  • Perimeter

    The length round the parcel.

    perimeter = Σ line distances + Σ curve lengths

    Parcels: deed calls, closure, area and legal description parcels.js
    • CivilCraft
    64-bit
  • Area in words

    The area as square units with acres or hectares.

    acres = sq ft ÷ 43560; hectares = sq m ÷ 10000

    Parcels: deed calls, closure, area and legal description parcels.js
    • CivilCraft
    64-bit
  • Course and area labels

    The bearing and distance text along each side and the area text at the middle.

    Parcels: deed calls, closure, area and legal description parcels.js
    • CivilCraft
    64-bit
  • Bulge from a typed radius

    Turns a radius typed for one side of a parcel into the stored curve.

    bulge = ± tan(asin(chord ÷ 2R) ÷ 2)

    Parcels: deed calls, closure, area and legal description parcels-ui.js
    • CivilCraft
    64-bit
  • Does the traverse close

    Decides whether typed deed calls return to the start, in which case the last point is dropped and the parcel closes on its first corner.

    closes when misclosure ≤ 0.0005 × max(1, length ÷ 1000)

    Parcels: deed calls, closure, area and legal description parcels-ui.js
    • CivilCraft
    64-bit

A calculation is added only after its source was read. Each statement can be checked in the code shown on its policy's page; the app repositories are public. When a release changes a calculation, its page says so until it has been read again.