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
-
One step forward or reversing
Moves every unit of the vehicle for one step: the tractor behind its front axle, each trailer behind its hitch, or the chain pushed from the last axle when reversing.
heading = atan2(leader − follower); hitch = axle − c·(cos θ, sin θ)
Vehicle swept paths swept.js64-bit- CivilCraft
-
Steering angle and limit checks
The steering angle at each step and the largest steering and articulation angles, checked against the vehicle's limits.
δ = atan(wheelbase × Δheading ÷ ±Δlength); articulation = heading of the unit ahead − heading of the unit, wrapped to (−π, π]
Vehicle swept paths swept.js64-bit- CivilCraft
-
Body corners at a step
The four corners of a unit's body from its rear axle position and heading.
corner = axle + a·(cos θ, sin θ) + b·(−sin θ, cos θ)
Vehicle swept paths swept.js64-bit- CivilCraft
-
Swept area and outline
The area the bodies sweep and its outline.
cell h = narrowest width ÷ 40 (× 1.5 until the grid fits); area = filled cells × h²
Vehicle swept paths swept.js64-bit- CivilCraft
-
Alignment as a path with bulges
Turns an alignment's lines and arcs into the path the vehicle follows.
bulge = ± tan(Δ ÷ 4)
Vehicle swept paths swept.js64-bit- CivilCraft
-
Free-space path loss
The loss in decibels between two antennas in free space.
FSPL = 20·log₁₀(d km) + 20·log₁₀(f MHz) + 32.44
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Fresnel zone radius
The radius of the first (or nth) Fresnel zone at a point along the path.
F = 17.32 × √(n·d₁·d₂ ÷ (f·(d₁ + d₂))) (km, GHz, meters)
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Earth bulge
How far the curve of the earth rises into the line between two points.
h = d₁·d₂ ÷ (12.74·k) (km, meters)
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Line of sight clearance
The clearance of the straight line between the antennas over the terrain at every sample, and its ratio to the Fresnel radius.
line = z_A + (z_B − z_A)·d₁ ÷ D; clearance = line − (terrain + clutter + bulge); ratio = clearance ÷ F₁
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Link budget
The received power and the fade margin of a link.
Pr = Pt + Gt + Gr − cable losses − FSPL − other; margin = Pr − sensitivity
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Mast height for clearance
The lowest tower height at one end that clears a set fraction of the Fresnel zone along the path.
first h = h₀ + 0.5·j with clearance ≥ fraction × F₁
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Fiber loss budget
The loss of a fiber run and the longest run a power budget allows.
loss = L·α + splices·Ls + connectors·Lc + margin; max L = (budget − connectors·Lc − margin − splices·Ls) ÷ α
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Fiber route length and cable to order
The plan length of a route, the cable length with slack and spare loops, and the splice and hand-hole counts.
length = Σ √(Δx² + Δy²); cable = length × (1 + slack) + 2 × spare; splices = ceil(length ÷ spacing) − 1
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Wind on antennas
The wind force on each antenna and the shear and moment at the tower base.
q = ½·ρ·V²; F = q·Cd·A; M = Σ F·h
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Multipath outage of a hop
The share of the worst month and of the year a hop is expected to be out from multipath fading.
P = 2.5 × 10⁻⁶·C·f·d³·10^(−F ÷ 10) (worst month); 6 × 10⁻⁷·C·f·d³·10^(−F ÷ 10) (year); seconds = P × 365.25 × 86400
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Tower base shear, moment and overturning
The wind on the tower shaft and its antennas, and the safety factor of a square footing against overturning.
shaft: Σ over 10 slices of q·Cf·solidity·width·Δz at mid-height; FS = W·1000·footing ÷ 2 ÷ M
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Knife-edge diffraction loss
The extra loss when one obstruction rises into the path.
v = h·√(2(d₁ + d₂) ÷ (λ·d₁·d₂)); J(v) = 6.9 + 20·log₁₀(√((v − 0.1)² + 1) + v − 0.1) for v > −0.78, else 0
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Tower leg forces and buckling
The compression and tension in a tower leg from the wind moment and the weight, and the leg's Euler buckling load.
4 legs: wind = M ÷ (2w); 3 legs: wind = M ÷ (w·√3 ÷ 2); Pcr = π²·E·I ÷ (K·L)²
Radio links, fiber budgets and tower loads telecom.js64-bit- CivilCraft
-
Received power at each grid cell
The received power at every cell around the transmitter and the share of cells at or above the receiver's sensitivity.
Pr = Pt + Gt + Gr − (FSPL + J(v_max) + other); covered = cells with Pr ≥ sensitivity ÷ known cells
Radio coverage over the terrain telecom.js32-bit in part- CivilCraft
-
Diffraction parameter
The parameter that measures how far an obstruction rises into the path, used for the knife-edge loss.
v = h × √(2(d₁ + d₂) ÷ (λ·d₁·d₂))
Radio coverage over the terrain telecom.js64-bit- CivilCraft
-
Length of a polyline
The plan length of a polyline.
L = Σ √(Δx² + Δy²)
Section cut from the ground along any line terrain-section.js64-bit- CivilCraft
-
Point at a distance along a line
The point and direction at a distance along a polyline.
u = (d − length before the segment) ÷ segment length, clamped to [0, 1]; p = a + (b − a)·u
Section cut from the ground along any line terrain-section.js64-bit- CivilCraft
-
Nearest point on a line
The distance along a polyline and the offset to the side of the point nearest to a given point.
u = ((p − a)·(b − a)) ÷ |b − a|², clamped; d = length before + u·|b − a|; offset = ± distance, sign from the cross product
Section cut from the ground along any line terrain-section.js64-bit- CivilCraft
-
Crossing of two segments
Where two segments cross, as fractions along each.
den = r × s; t = ((q − p) × s) ÷ den; u = ((q − p) × r) ÷ den
Section cut from the ground along any line terrain-section.js64-bit- CivilCraft
-
First crossing of two polylines
The first place one polyline crosses another, with the distance along each.
d_a = length before + t·|segment a|; d_b = length before + u·|segment b|
Section cut from the ground along any line terrain-section.js64-bit- CivilCraft
-
Line square to a polyline
A straight line square to a polyline at a distance along it, a set length to each side.
right = (sin dir, −cos dir); p = c − right × left; q = c + right × right length
Section cut from the ground along any line terrain-section.js64-bit- CivilCraft
-
Section along a line
The points of the ground along a line: distance, offset, coordinates and elevation at every triangle edge crossing and line vertex.
d = length before + t·|segment|; o = d − origin; z from the surface at (x, y)
Section cut from the ground along any line terrain-section.js64-bit- CivilCraft
-
Elevation of a section at an offset
The elevation of a cut section at any offset, between its points.
z = z₀ + (z₁ − z₀)·(o − o₀) ÷ (o₁ − o₀)
Section cut from the ground along any line terrain-section.js64-bit- CivilCraft
-
Angular misclosure and leg directions
The angular misclosure of a loop and the direction of each leg after the angles are corrected.
misclosure = ((again − first) mod 360 + 540) mod 360 − 180; per angle = −misclosure ÷ n; az(i) = az(i − 1) + 180 + angle(i) + per angle
Traverse closure and compass adjustment traverse.js64-bit- CivilCraft
-
Station coordinates and linear misclosure
The unadjusted coordinates of each station, the misclosure at the end and the traverse's precision.
x += d·cos(dir); y += d·sin(dir); misclosure = √(Δx² + Δy²); precision = total length ÷ misclosure
Traverse closure and compass adjustment traverse.js64-bit- CivilCraft
-
Compass rule adjustment
Moves each station against the misclosure in proportion to the distance run to reach it.
cx = −Δx × run ÷ length; cy = −Δy × run ÷ length; adjusted = unadjusted + correction
Traverse closure and compass adjustment traverse.js64-bit- CivilCraft
-
Traverse report as CSV
Writes the closure and every station's unadjusted and adjusted coordinates and corrections.
coordinates and corrections to 4 decimals; distances and length to 3; precision as 1 : whole number; angles to whole seconds
Traverse closure and compass adjustment traverse.js64-bit- CivilCraft
-
Frog angle from the frog number
The angle at which the diverging track leaves, from the frog number.
θ = 2·atan(1 ÷ (2N))
Railway turnouts, crossovers and clearance envelopes turnout.js64-bit- CivilCraft
-
Turnout radius, lead and centerline
The closure radius, the lead and the centerline points of the diverging track.
R = (g − s·sin β) ÷ (cos β − cos θ); lead = s·cos β + R·(sin θ − sin β); arc length = R·(θ − β)
Railway turnouts, crossovers and clearance envelopes turnout.js64-bit- CivilCraft
-
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
-
Unit factors
The factors that turn project units (ft, in, gpm, psi or m, mm, L/s, kPa) into the SI values the solver works in.
ft = 0.3048 m; in = 0.0254 m; gpm = 6.30902e-5 m³/s; psi per ft = 0.433527; kPa per m = 9.80665
Water mains network: heads, flows and pressures water.js64-bit- CivilCraft
-
Pump curve fit
Turns one or three pump curve points into the head a pump adds at any flow.
H = H₀ − r·Qⁿ; n = ln((H₀ − H₂) ÷ (H₀ − H₁)) ÷ ln(Q₂ ÷ Q₁); r = (H₀ − H₁) ÷ Q₁ⁿ
Water mains network: heads, flows and pressures water.js64-bit- CivilCraft
-
Hazen-Williams head loss
The friction head loss in a pipe for a given flow, length, diameter and C factor, in SI.
h = 10.67 × L × |Q|^1.852 ÷ (C^1.852 × D^4.871) × sign(Q)
Water mains network: heads, flows and pressures water.js64-bit- CivilCraft
-
Pipe resistance and minor-loss coefficients
The two coefficients each pipe carries into the solver: friction resistance and minor loss.
r = 10.67 × L ÷ (C^1.852 × D^4.871); m = 8K ÷ (π² g D⁴)
Water mains network: heads, flows and pressures water.js64-bit- CivilCraft
-
Head loss and its gradient for one link
The head loss across a pipe, valve or pump at the current flow, and its derivative, for each solver pass.
pipe: f = (r·|q|^0.852 + m·|q|)·q, g = 1.852·r·|q|^0.852 + 2·m·|q|; pump: f = −(H₀ − r·qⁿ), g = r·n·qⁿ⁻¹
Water mains network: heads, flows and pressures water.js64-bit- CivilCraft
-
Node equations for one pass
Builds the linear system for the unknown heads from the link coefficients, demands and fixed heads, and solves it.
Q = P·(Hₐ − H_b) + Y; P = 1 ÷ g; Y = Q − f ÷ g; Σ flows at each node = demand
Water mains network: heads, flows and pressures water.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.