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
-
Crossover between parallel tracks
The straight between two turnouts that join parallel tracks, and the overall length.
straight = (spacing − 2g) ÷ sin θ; length = 2 × lead + straight × cos θ
Railway turnouts, crossovers and clearance envelopes turnout.js64-bit- CivilCraft
-
Speed on the diverging route
The speed for a radius, cant and cant deficiency.
V = √(R·(E + D) ÷ (rail ÷ 127.12)) km/h; rail = 1500 mm gives 11.8
Railway turnouts, crossovers and clearance envelopes turnout.js64-bit- CivilCraft
-
Vehicle throw on a curve
How far the middle of a vehicle moves in and its ends move out on a curve.
inside = b² ÷ (8R); outside = (L² − b²) ÷ (8R)
Railway turnouts, crossovers and clearance envelopes turnout.js64-bit- CivilCraft
-
Clearance outline on a canted curve
The vehicle or structure outline tilted by the cant and widened by the curve throw.
tilt = asin(min(1, cant ÷ base)); rotate each point about the low rail; shift by the inside or outside throw
Railway turnouts, crossovers and clearance envelopes turnout.js64-bit- CivilCraft
-
Least track spacing for two outlines
The smallest center spacing at which two clearance outlines do not overlap.
bisection on the shift between 0 and 20, 60 halvings
Railway turnouts, crossovers and clearance envelopes turnout.js64-bit- CivilCraft
-
Turn angle at a junction
The angle a main turns through at a junction of two pipes.
turn = |atan2 of the leg after − atan2 of the leg before|, folded to 0 to 180 degrees
Water mains as objects: depths, fittings and take-off water-objects.js64-bit- CivilCraft
-
Pipe depths and derived fittings
The elevation of each pipe end, the position of placed objects along pipes, and the fittings the layout implies.
z = ground − cover; on a pipe: p = a + (b − a)·t; length = stated, else √(Δx² + Δy²); bend angle rounded to 0.1°
Water mains as objects: depths, fittings and take-off water-objects.js64-bit- CivilCraft
-
Take-off of pipes and fittings
The count of each fitting by kind and size and the count and total length of pipe by size.
length per size = Σ pipe lengths
Water mains as objects: depths, fittings and take-off water-objects.js64-bit- CivilCraft
-
Take-off as CSV
Writes the take-off list to a CSV file.
length = round(length × 100) ÷ 100; size to 1 decimal
Water mains as objects: depths, fittings and take-off water-objects.js64-bit- CivilCraft
-
Ground elevation of a new node
The elevation stored on a junction, reservoir or tank when it is placed on the plan.
z = round(ground × 100) ÷ 100; reservoir head = z + 30 (m) or 100 (ft)
Water mains as objects: depths, fittings and take-off water-ui.js64-bit- CivilCraft
-
Signed polygon area
The signed area of a closed outline.
A = −½ Σ (xⱼ + xᵢ)(yⱼ − yᵢ)
Outline minus holes: area and boundary lengths landscape/areas.js64-bit- CivilCraft
-
Point inside a polygon
Whether a point lies inside an outline, used to keep or drop each boundary piece.
count edges with (aᵧ > y) ≠ (bᵧ > y) and x < x on the edge at height y
Outline minus holes: area and boundary lengths landscape/areas.js64-bit- CivilCraft
-
Where two segments cross
The position along one edge where another edge crosses or touches it.
t = ((c − a) × s) ÷ (r × s); u = ((c − a) × r) ÷ (r × s)
Outline minus holes: area and boundary lengths landscape/areas.js64-bit- CivilCraft
-
Area by slabs
The area of the outline with every hole removed, overlaps counted once.
area = Σ over slabs of (width inside the outline and outside all holes at mid-height) × slab height
Outline minus holes: area and boundary lengths landscape/areas.js64-bit- CivilCraft
-
Outline and cut lengths
The pieces of the outline that remain and the pieces of the holes that cut it, with their total lengths.
length = Σ |b − a| over kept pieces; a = e.a + t₀(e.b − e.a), b = e.a + t₁(e.b − e.a)
Outline minus holes: area and boundary lengths landscape/areas.js64-bit- CivilCraft
-
Fingerprint of the source points
A short code that changes when the source linework moves, so the linked object knows to update.
hash of round(x × 10⁶), round(y × 10⁶) for every point
Linework checks for linked landscape objects landscape/links.js64-bit- CivilCraft
-
Clean and check a line or outline
Drops repeated points, closes an outline and refuses linework that is too short, too far away, open or self-crossing.
Linework checks for linked landscape objects landscape/links.js64-bit- CivilCraft
-
Self-crossing test
Whether any two edges of the line cross away from their ends.
Linework checks for linked landscape objects landscape/links.js64-bit- CivilCraft
-
Meters per project unit
The length of one project unit in meters, used by every landscape calculation that works in meters.
1 ft = 1200 ÷ 3937 m (US survey foot); 1 m = 1
Planting: bed and hedge fills, planted areas and their quantities landscape/planting.jsExact- CivilCraft
-
Bed area
The plan area of a bed outline.
A = |Σ (xⱼ + xᵢ)(yⱼ − yᵢ)| ÷ 2
Planting: bed and hedge fills, planted areas and their quantities landscape/planting.js64-bit- CivilCraft
-
Spacing from the plant list
The spacing a bed or hedge is filled at when none is typed: the species' spacings weighted by their share.
s = Σ (pct × spacing) ÷ Σ pct
Planting: bed and hedge fills, planted areas and their quantities landscape/planting.js64-bit- CivilCraft
-
Plants in a bed
The position of every plant in a bed at the given spacing and pattern, and the count per species.
grid step s, row pitch s (square) or s·√3 ÷ 2 (triangular); keep when inside and at least s ÷ 2 − 1e-9 from the edge
Planting: bed and hedge fills, planted areas and their quantities landscape/planting.js64-bit- CivilCraft
-
Plants along a hedge
The number and positions of plants along a hedge line in one or two rows.
n = ⌊length ÷ s + 1e-9⌋ + 1; first plant at (length − (n − 1)·s) ÷ 2
Planting: bed and hedge fills, planted areas and their quantities landscape/planting.js64-bit- CivilCraft
-
Offset of an open line
A line moved sideways by a distance with mitred corners, used for hedge and path edges, obstacle footprints and IFC bodies.
corner = p + m × d ÷ max(0.25, m·n₁), m = normalized sum of the two edge normals
Planting: bed and hedge fills, planted areas and their quantities landscape/planting.js64-bit- CivilCraft
-
Default build-up depths
The topsoil and mulch depths a new planted area starts with, in project units.
feet = round(meters ÷ 0.3048 × 100) ÷ 100
Planting: bed and hedge fills, planted areas and their quantities landscape/planted.js64-bit- CivilCraft
-
Plants in a clipped planted area
The plants of a planted area after paving, walls and steps are cut out of it.
keep when inside what is left and at least s ÷ 2 − 1e-9 from a cut edge
Planting: bed and hedge fills, planted areas and their quantities landscape/planted.js64-bit- CivilCraft
-
Planted area quantities
The net area, perimeter, edging length, topsoil and mulch volumes and plant count of a planted area.
topsoil = net area × topsoil depth; mulch = net area × mulch depth; edging = outline length left after clipping
Planting: bed and hedge fills, planted areas and their quantities landscape/planted.js64-bit- CivilCraft
-
Planted area quantities for takeoff
The area, topsoil, mulch, membrane and edging quantities passed to TakeoffCraft.
qty = round(v × 100) ÷ 100; cubic yards = cubic feet ÷ 27
Planting: bed and hedge fills, planted areas and their quantities landscape/planted.js64-bit- CivilCraft
-
Formula evaluation
The value of a parsed formula for one row.
+ − × ÷ % ^ in 64-bit; round(x, d) = round(x × 10ᵈ) ÷ 10ᵈ
Worksheets: formulas, column rounding and totals landscape/worksheet.js64-bit- CivilCraft
-
Numbers to and from text inside a formula
How a value is read as a number, and how a number is written when it is joined into text.
text of a number = round(v × 10⁹) ÷ 10⁹
Worksheets: formulas, column rounding and totals landscape/worksheet.js64-bit- CivilCraft
-
Rounding a cell to its column's decimals
Applies the column's decimals setting to a cell.
cell = Number(v.toFixed(dec))
Worksheets: formulas, column rounding and totals landscape/worksheet.js64-bit- CivilCraft
-
Sum, count, average, minimum and maximum
The total of a column over a group or the whole worksheet.
sum = Σ cells; average = Σ cells ÷ n
Worksheets: formulas, column rounding and totals landscape/worksheet.js64-bit- CivilCraft
-
Rows, groups, subtotals and totals
Builds the worksheet's rows from the objects, grouped and sorted, with subtotals and a total line.
Worksheets: formulas, column rounding and totals landscape/worksheet.js64-bit- CivilCraft
-
Route length
The plan length of a cable route in project units.
L = Σ √(Δx² + Δy²)
Underground cable routes: cover, crossings, joints and trench quantities powerline/underground.js64-bit- CivilCraft
-
Cover and cable band of a trench
The cover over the cable and the thickness of the band the cable or its ducts occupy, in meters.
cover = trench cover, or max(0, depth − bedding − band); band = duct diameter, or cable diameter
Underground cable routes: cover, crossings, joints and trench quantities powerline/underground.js64-bit- CivilCraft
-
Cable profile and cover check
The ground and the top of the cable along the route, and whether the cover meets the minimum.
cable = ground − cover ÷ m per unit; samples every L ÷ 100 by default
Underground cable routes: cover, crossings, joints and trench quantities powerline/underground.js64-bit- CivilCraft
-
Crossing of two plan segments
Where two straight segments cross in plan, as a position along each.
t = ((p − a) × e) ÷ (d × e); u = ((p − a) × d) ÷ (d × e)
Underground cable routes: cover, crossings, joints and trench quantities powerline/underground.js64-bit- CivilCraft
-
Crossings along the route
Every place a segment crosses the route, with its chainage.
ch = chainage of the vertex before + t × segment length
Underground cable routes: cover, crossings, joints and trench quantities powerline/underground.js64-bit- CivilCraft
-
Separation from a pipe at a crossing
The clear vertical gap between the cable and a pipe where they cross.
invert = (inv up + (inv down − inv up)·u) × m per unit; pipe top = invert + diameter; cable top = ground − cover; gap = max(cable bottom − pipe top, invert − cable top)
Underground cable routes: cover, crossings, joints and trench quantities powerline/underground.js64-bit- CivilCraft
-
Separation from another cable route
The clear vertical gap between two cable routes that cross, each at its own cover under the same ground.
gap between [−cover A − band A, −cover A] and [−cover B − band B, −cover B]
Underground cable routes: cover, crossings, joints and trench quantities powerline/underground.js64-bit- CivilCraft
-
Cables and pipes under an overhead line
The cable routes and pipes an overhead line crosses in plan, with the line's chainage and the level of the top of each.
cable top = ground − cover ÷ m per unit; pipe top = invert at the crossing + diameter
Underground cable routes: cover, crossings, joints and trench quantities powerline/underground.js64-bit- CivilCraft
-
Joints from the drum length
How many joints each cable needs and where along the route they fall.
run = length × (1 + slack %); joints per cable = ⌈run ÷ drum⌉ − 1; at = k × drum ÷ (1 + slack %)
Underground cable routes: cover, crossings, joints and trench quantities powerline/underground.js64-bit- CivilCraft
-
Trench quantities
Trench length, excavation, bedding and backfill volumes, duct length and cable length of a route.
excavation = width × depth × length; bedding = width × bedding × length; backfill = excavation − bedding − ducts × π(d ÷ 2)² × length; cable = (length × slack + 2 × depth) × count
Underground cable routes: cover, crossings, joints and trench quantities powerline/underground.js64-bit- CivilCraft
-
Cubic meters per cubic yard
The factor used to give volumes in cubic yards in a feet project.
1 yd³ = 0.764554857984 m³
Power line tables, quantities and GIS export powerline/outputs.jsExact- CivilCraft
-
Stringing table rows
Tension, span length, sag and conductor length per section and temperature, in project units.
length ÷ m per unit; force ÷ 10 for daN or ÷ 4.4482216152605 for lbf
Power line tables, quantities and GIS export powerline/outputs.js64-bit- CivilCraft
-
Stringing table CSV
The stringing table as CSV text.
lengths and sags round(v, 2); tension round(v, 1)
Power line tables, quantities and GIS export powerline/outputs.js64-bit- CivilCraft
-
Support table rows
Ground, attachment, load, nominal load, foundation and swing per support, in project units.
attach height = attach z − ground z; load = worst F_eq in daN or lbf
Power line tables, quantities and GIS export powerline/outputs.js64-bit- CivilCraft
-
Conductor length to buy
The conductor length of a line with an allowance for jumpers and waste.
length = Σ catenary lengths × phases × circuits × 1.02 ÷ m per unit
Power line tables, quantities and GIS export powerline/outputs.js64-bit- CivilCraft
-
Lengths and volumes in project units
Converts meters and cubic meters to feet and cubic yards for the quantity rows.
LF = m ÷ 0.3048; CY = m³ ÷ 0.764554857984
Power line tables, quantities and GIS export powerline/outputs.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.