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.
Calculations
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
Maximum flow
The maximum flow from which the ultimate pit is read.
Block model, ultimate pit and mine schedule mining.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
Pipe slope, cover and structure levels
Length, slope and least cover of each pipe; rim and sump of each structure; and the list of rule problems.
slope = (inv_up − inv_dn) ÷ L; crown(t) = inv_up + (inv_dn − inv_up)·t + D; cover = min over samples (ground − crown); sump = lowest invert − sump depth
Gravity pipe network: slopes, cover and automatic inverts pipes.js64-bit- CivilCraft
-
Automatic inverts
Sets each pipe's upstream and downstream inverts from the ground, the minimum cover, slope and drop.
up = min(ground − cover − D, lowest incoming invert − drop); dn = min(up − s·L, min over samples (up + (ground − cover − D − up) ÷ t))
Gravity pipe network: slopes, cover and automatic inverts pipes.js64-bit- CivilCraft
-
Rounding an invert down
Rounds a computed invert down to two decimals.
⌊v × 100 + 1e-7⌋ ÷ 100
Gravity pipe network: slopes, cover and automatic inverts pipes.js64-bit- CivilCraft
-
Bench outlines, area and perimeter
The closed outlines of the mined area at one level, each with its area and perimeter.
point = origin + index × block size; area = Σ (x_i·y_j − x_j·y_i) ÷ 2; perimeter = Σ edge lengths
Open pit benches, haul ramp and pit surface pit-geom.js64-bit- CivilCraft
-
Pit floor per column
The bottom elevation of the lowest mined block in each column.
floor = origin_z + k × dz
Open pit benches, haul ramp and pit surface pit-geom.js64-bit- CivilCraft
-
Overall slope with a ramp
The overall wall angle when every bench carries a ramp lane.
OSA′ = atan(H ÷ (H ÷ tan(OSA) + w))
Open pit benches, haul ramp and pit surface pit-geom.js64-bit- CivilCraft
-
Outline moved inward
The bench outline moved inside by half the ramp width.
vertex shift = (n₀ + n₁) × d ÷ (1 + n₀ · n₁)
Open pit benches, haul ramp and pit surface pit-geom.js64-bit- CivilCraft
-
Haul ramp route, length and drop
The ramp's 3D line down the pit, its length, its drop, and how many laps each bench needs.
run = dz ÷ grade; z = z_top − dz × min(1, walked ÷ run); length = Σ 3D segment lengths; laps = run ÷ lane perimeter
Open pit benches, haul ramp and pit surface pit-geom.js64-bit- CivilCraft
-
Pit cut into the ground and volume dug
The ground surface with the pit cut in, and the volume between the ground and the pit floor.
node z = min(ground, mean of the 4 columns round it); dug = Σ max(0, ground − floor) × dx × dy
Open pit benches, haul ramp and pit surface pit-geom.js64-bit- CivilCraft
-
Depth of cut and fill by cell
The depth at every cell, the cut and fill volumes, and the deepest cut and highest fill.
dz = design − ground at ((i + 0.5)·c, (j + 0.5)·c); fill = Σ dz·c² (dz > 0); cut = Σ −dz·c² (dz ≤ 0)
Cut and fill map, spot levels, sloped pads and free sections platform.js64-bit- CivilCraft
-
Depth classes
Equal steps of depth for shading the map, with a level band around zero.
n = ⌈depth ÷ step − 1e-9⌉; level when |dz| < step ÷ 20
Cut and fill map, spot levels, sloped pads and free sections platform.js64-bit- CivilCraft
-
Spot levels
Ground level, design level and their difference on a grid, with the deepest cut and highest fill marked.
Cut and fill map, spot levels, sloped pads and free sections platform.js64-bit- CivilCraft
-
Sloped pad as a plane
The elevation of each pad corner on a plane through a point, rising in a direction at a grade.
z = z₀ + grade × ((x − x₀)·cos θ + (y − y₀)·sin θ)
Cut and fill map, spot levels, sloped pads and free sections platform.js64-bit- CivilCraft
-
Ramp strip
The four corners of a ramp between two points, its length and its grade.
L = hypot(Δx, Δy); grade = (z_b − z_a) ÷ L; corners = ends ± normal × width ÷ 2
Cut and fill map, spot levels, sloped pads and free sections platform.js64-bit- CivilCraft
-
Free section
Ground and design cut along a polyline, with cut and fill areas and the distance of each vertex.
Cut and fill map, spot levels, sloped pads and free sections platform.js64-bit- CivilCraft
-
Stretches of a line inside the graded regions
The distances along the section line where it runs inside a graded region.
t = ((p − a) × e) ÷ (d × e); inside tested at the middle of each piece
Cut and fill map, spot levels, sloped pads and free sections platform.js64-bit- CivilCraft
-
Section CSV
Writes the section as distance, ground level and design level rows, then the cut and fill areas.
value = round(v × 100) ÷ 100
Cut and fill map, spot levels, sloped pads and free sections platform.js64-bit- CivilCraft
-
Plot scales
The list of scales and the millimeters on paper per project unit for each.
mm per foot = 25.4 ÷ n (1 in = n ft); mm per meter = 1000 ÷ n (1:n)
Plan sheets and plan-and-profile sheets as PDF plot.jsExact- CivilCraft
-
Scale that fits
The largest standard scale at which the drawing's extents fit the sheet.
Plan sheets and plan-and-profile sheets as PDF plot.js64-bit- CivilCraft
-
Drawing window in project coordinates
The part of the project that a sheet shows at a scale.
half width = frame width ÷ 2 ÷ mm per unit; window = center ± half
Plan sheets and plan-and-profile sheets as PDF plot.js64-bit- CivilCraft
-
Project coordinates to paper
Where each point of the plan lands on the sheet, in millimeters.
x_mm = x·s + o_x, o_x = frame middle − c_x·s
Plan sheets and plan-and-profile sheets as PDF plot.js64-bit- CivilCraft
-
Scale bar length
A round length about 50 mm long on paper for the scale bar.
want = 50 ÷ s; length = largest of {1, 2, 5, 10} × 10^⌊log₁₀ want⌋ not over want
Plan sheets and plan-and-profile sheets as PDF plot.js64-bit- CivilCraft
-
Arcs as Bézier curves
Turns a circular arc into cubic Bézier pieces for the PDF.
n = ⌈|sweep| ÷ 90° − 1e-9⌉; d = sweep ÷ n; k = 4 ÷ 3 × tan(d ÷ 4); control = end ± k·r·tangent
Plan sheets and plan-and-profile sheets as PDF plot.js64-bit- CivilCraft
-
A number in the PDF
Formats every coordinate and width written to the page.
text = v.toFixed(4) with trailing zeros removed
Plan sheets and plan-and-profile sheets as PDF plot.js64-bit- CivilCraft
-
Millimeters to PDF points
The page transform that makes the content's units millimeters.
72 ÷ 25.4 points per millimeter
Plan sheets and plan-and-profile sheets as PDF plot.js64-bit- CivilCraft
-
Stations per sheet
The stretch of alignment each sheet shows and where each sheet starts and ends.
fits = plan window width ÷ mm per unit; length = ⌊fits ÷ round⌋ × round; sheet k starts at start + k × length
Plan sheets and plan-and-profile sheets as PDF pp-sheets.js64-bit- CivilCraft
-
Design profile points on a sheet
The stations at which the design profile is drawn within a sheet's range.
Plan sheets and plan-and-profile sheets as PDF pp-sheets.js64-bit- CivilCraft
-
Vertical exaggeration
The largest standard exaggeration (10, 5, 4, 2 or 1) at which every sheet's elevations fit the profile window.
fits when range × mm per unit × exaggeration ≤ available height; vertical scale = s × exaggeration
Plan sheets and plan-and-profile sheets as PDF pp-sheets.jsExact- CivilCraft
-
Plan turned along the alignment
Where each plan point lands on a plan-and-profile sheet, turned so the stretch runs left to right.
q = R(−θ)·(p − p_a); x_mm = x₀ + q_x·s; y_mm = c_y + (q_y − y_mid)·s
Plan sheets and plan-and-profile sheets as PDF pp-sheets.js64-bit- CivilCraft
-
Profile grid and scales
The station and elevation grid of the profile and the mapping from station and elevation to paper.
X = x₀ + (sta − a)·s; Y = y₀ + (z − z₀)·s·exaggeration; z₀ = ⌊(z_mid − span ÷ 2) ÷ step⌋ × step
Plan sheets and plan-and-profile sheets as PDF pp-sheets.js64-bit- CivilCraft
-
Vertical scale label
The vertical scale printed in the title strip.
meters: 1:round(1000 ÷ s_v); feet: 1 in = (25.4 ÷ s_v) ft to 1 decimal
Plan sheets and plan-and-profile sheets as PDF pp-sheets.js64-bit- CivilCraft
-
Volumes done, remaining and percent complete
For each survey: cut and fill done, what remains, over-cut, over-fill, stockpiles, digs and percent complete.
cut done = Σ clamp(E − A, 0, E − D)·A_cell; fill done = Σ clamp(A − E, 0, D − E)·A_cell; percent = 100 × (cut done + fill done) ÷ planned
Earthwork progress from repeat surveys progress.js64-bit- CivilCraft
-
Forecast finish date
The date the work reaches 100 percent at the pace of the last surveys.
slope = Σ (t − t̄)(p − p̄) ÷ Σ (t − t̄)²; t_end = t_last + (100 − p_last) ÷ slope
Earthwork progress from repeat surveys progress.js64-bit- CivilCraft
-
Scheduled percent on a date
The planned percent complete on a date, between the schedule's points.
p = p₀ + (p₁ − p₀) × (t − t₀) ÷ (t₁ − t₀)
Earthwork progress from repeat surveys progress.js64-bit- CivilCraft
-
Gravity and unit constants
The constants behind cant and unit conversion.
g = 9.81; km/h per mph = 1.609344; meters per foot = 1200 ÷ 3937
Railway cant, cant ramps and track quantities rail.js64-bit- CivilCraft
-
Speed and length conversions
Converts a speed to km/h, a project length to meters and millimeters to project units.
km/h = mph × 1.609344; m = ft × 1200 ÷ 3937; project = mm ÷ 1000 (÷ meters per foot)
Railway cant, cant ramps and track quantities rail.js64-bit- CivilCraft
-
Equilibrium cant
The cant at which a train at the design speed puts equal load on both rails.
E = G × v² ÷ (g × R), v = V ÷ 3.6
Railway cant, cant ramps and track quantities rail.js64-bit- CivilCraft
-
Cant ramp shapes
How the cant rises from 0 to full along a ramp for each transition kind.
linear u; Bloss u²(3 − 2u); Helmert 2u² then 1 − 2(1 − u)²; cosine (1 − cos πu) ÷ 2; sine u − sin(2πu) ÷ 2π
Railway cant, cant ramps and track quantities rail.js64-bit- CivilCraft
-
Steepest slope of each ramp shape
The factor that turns the average cant gradient of a ramp into its steepest gradient.
linear 1; Bloss 1.5; Helmert 2; cosine π ÷ 2; sine 2
Railway cant, cant ramps and track quantities rail.js64-bit- CivilCraft
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.