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
-
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
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
Perimeter
The length round the parcel.
perimeter = Σ line distances + Σ curve lengths
Parcels: deed calls, closure, area and legal description parcels.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
Legal description
A draft description: the point of beginning, each course, and the area.
Parcels: deed calls, closure, area and legal description parcels.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.js64-bit- CivilCraft
-
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.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
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.