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
-
GSI word to a length or angle
The value of a GSI data word from its digits and its unit code.
millimeters ÷ 1000; 1/10 mm ÷ 10⁴; 1/100 mm ÷ 10⁵; gon or degree counts ÷ 10⁵; sexagesimal digits split into D, M, S
Data collector files and polar reduction collector.js64-bit- CivilCraft
-
Polar reduction
Northing, easting and elevation of every shot from its setup.
orientation = atan2(ΔE, ΔN) to the backsight − circle reading; hd = sd·sin(vz)·scale; N = N₀ + hd·cos(az), E = E₀ + hd·sin(az); Z = Z₀ + sd·cos(vz) + hi − hr
Data collector files and polar reduction collector.js64-bit- CivilCraft
-
Shots as adjustment observations
Directions and horizontal distances with their standard deviations, and starting coordinates for the free points.
σ(direction) = 5″ = (5 ÷ 3600) × π ÷ 180; σ(distance) = 0.005
Data collector files and polar reduction collector.js64-bit- CivilCraft
-
Section stations
The stations at which the corridor is built.
s = ⌈from ÷ step⌉·step, then s += step; each rounded to 6 decimals
Corridor cross sections and pavement quantities corridor.js64-bit- CivilCraft
-
Lane edge and shoulder point (simple assembly)
The edge of pavement and the shoulder's outer edge on one side of one section, with any width or elevation target applied.
edge z = z₀ − lane width × slope; shoulder z = edge z − shoulder width × shoulder slope
Corridor cross sections and pavement quantities corridor.js64-bit- CivilCraft
-
One side of a section from its parts
Every point of a side from the centerline out: lanes, gutter, curb, strip, walk, then the daylight point.
t += width; z −= width × slope (curb: z += height)
Corridor cross sections and pavement quantities corridor.js64-bit- CivilCraft
-
Where a section meets a target line
The distance out along a section to the first crossing of a 3D polyline, and the line's elevation there.
t = (w × d) ÷ (u × d); z = z_a + s·(z_b − z_a)
Corridor cross sections and pavement quantities corridor.js64-bit- CivilCraft
-
Do two sections cross
Whether neighboring sections intersect, which happens inside a curve tighter than the corridor is wide.
Corridor cross sections and pavement quantities corridor.js64-bit- CivilCraft
-
Pavement course area and volume
The plan area and the volume of each pavement course along the corridor.
area = Σ (w₁ + w₂) ÷ 2 × Δstation; volume = area × thickness
Corridor cross sections and pavement quantities corridor.js64-bit- CivilCraft
-
Systems the coordinates fit
The catalog systems in which a project point falls inside the system's area of use.
Coordinate system helpers crs-pick.js64-bit- CivilCraft
-
Latitude and longitude as degrees, minutes, seconds
The status bar text for a latitude or longitude.
seconds = round(|v| × 360000) ÷ 100, then split into D, M, S
Coordinate system helpers crs-pick.js64-bit- CivilCraft
-
Latitude and longitude as decimal degrees
The status bar text in decimal degrees.
Coordinate system helpers crs-pick.js64-bit- CivilCraft
-
Typed latitude or longitude
A typed angle, decimal or in degrees, minutes and seconds, with a sign or a hemisphere letter.
value = ±(D + M ÷ 60 + S ÷ 3600)
Coordinate system helpers crs-pick.js64-bit- CivilCraft
-
Local fit: project to grid
Grid coordinates of a project point through a scale, rotation and shift.
grid = to + scale · R(rotation) · (p − from)
Coordinate system helpers crs-pick.js64-bit- CivilCraft
-
Misclosure of a third control point
How far a two-point fit puts a third known point from its grid coordinates, as a distance and in parts per million.
ppm = distance ÷ span × 10⁶
Coordinate system helpers crs-pick.js64-bit- CivilCraft
-
Converting a project's coordinates
Every stored x and y of the project (points, breaklines, boundary, alignment PIs, pads, structures) passed through a conversion.
Coordinate system helpers crs-pick.js64-bit- CivilCraft
-
Runoff depth by curve number
The depth of runoff from a depth of rain.
S = 25400 ÷ CN − 254; Q = (P − 0.2S)² ÷ (P + 0.8S) for P > 0.2S
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
Runoff hydrograph (triangular unit hydrograph)
Flow against time from a catchment for a storm, with its peak and volume.
Tp = Δt ÷ 2 + 0.6·Tc; qp = 0.208·A ÷ Tp; base = 2.67·Tp; Q(t) = Σ ΔQₖ·u(t − k·Δt)
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
Runoff hydrograph (rational method)
A trapezoid hydrograph from the rational method peak.
Qp = C·i·A ÷ 360 (i in mm/h, A in hectares, Q in m³/s)
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
Stage and storage table
Water surface area and stored volume at each level of the pond.
slopes: area = A₀ + P₀·m·h + π·m²·h²; storage = A₀·h + P₀·m·h² ÷ 2 + π·m²·h³ ÷ 3; table: V += h ÷ 3·(A₁ + A₂ + √(A₁·A₂))
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
Storage of a low place in the ground
Area and volume below each level inside a polygon on the ground surface.
storage(z) = Σ cells below z of (z − ground) × cell area
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
Flow through one outlet
Discharge of an orifice, pipe, weir, spillway, V-notch or riser at a water level.
orifice: Cd·A·√(2g·(h − D/2)); weir: Cw·(L − 0.2·n·H)·H^1.5; V-notch: (8 ÷ 15)·Cd·√(2g)·tan(θ/2)·H^2.5
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
Table interpolation
A value read from a table between two rows, used for storage, level and outflow.
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
Modified Puls routing
Storage and outflow at each time step from the inflow hydrograph.
2S₂ ÷ Δt + O₂ = I₁ + I₂ + (2S₁ ÷ Δt − O₁)
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
Pond routing results
Peak inflow and outflow, the highest level, the greatest storage, attenuation, draw-down time and the volumes in and out.
attenuation = 1 − peak out ÷ peak in; volume = Σ (q₁ + q₂) ÷ 2 × Δt
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
Orifice diameter for a target outflow
The orifice diameter at which the peak outflow just reaches the allowed flow.
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
Pond checks
Overtopping, peak above the target, no attenuation, slow draw-down and a dry pond.
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
A saved pond in project units
Converts a saved pond to SI, runs it, and converts the results back for display.
1 ft = 0.3048 m; 1 ft² = 0.09290304 m²; 1 acre = 4046.8564224 m²; 1 in = 25.4 mm; 1 ft³/s = 0.028316846592 m³/s
Detention pond hydrology and routing detention.js64-bit- CivilCraft
-
Sun azimuth and altitude
The sun's direction and height above the horizon at a moment and a place.
JD = ms ÷ 86 400 000 + 2 440 587.5; T = (JD − 2 451 545) ÷ 36 525; cos Z = sin φ·sin δ + cos φ·cos δ·cos H
Sun position drive.js64-bit- CivilCraft
-
Atmospheric refraction
The lift of the sun's apparent altitude by the atmosphere, added to the geometric altitude.
h > 5°: 58.1 ÷ tan h − 0.07 ÷ tan³h + 0.000086 ÷ tan⁵h seconds of arc
Sun position drive.js64-bit- CivilCraft
-
Unit vector toward the sun
The sun's direction as east, north and up components.
(cos h·sin a, cos h·cos a, sin h)
Sun position drive.js64-bit- CivilCraft
-
Ground samples inside the area
A grid of ground elevations inside the polygon, each standing for one cell of ground.
cell = √(bounding box area ÷ 20 000) unless given
Earthwork balance and haul plan earthwork.js64-bit- CivilCraft
-
Cut and fill volumes
Cut, fill, usable cut and the net at a design level.
fill = area × Σ max(design − ground, 0); cut = area × Σ max(ground − design, 0); net = cut × factor − fill
Earthwork balance and haul plan earthwork.js64-bit- CivilCraft
-
Balanced level
The design level at which usable cut equals fill.
Earthwork balance and haul plan earthwork.js64-bit- CivilCraft
-
Design plane
The design elevation at a point for a level and two grades.
z = z₀ + gx·(x − cx) + gy·(y − cy)
Earthwork balance and haul plan earthwork.js64-bit- CivilCraft
-
Free-haul moment
The volume moved times the distance between the centroid of cut and the centroid of fill.
moment = min(cut × factor, fill) × |centroid(cut) − centroid(fill)|
Earthwork balance and haul plan earthwork.js64-bit- CivilCraft
-
Best tilt
The level and tilt, within the grade limit, that balance with the least haul moment.
Earthwork balance and haul plan earthwork.js64-bit- CivilCraft
-
Blocks of cut and fill
Cells grouped into blocks, each with its volume and its volume-weighted center.
center = Σ (p × v) ÷ Σ v
Earthwork balance and haul plan earthwork.js64-bit- CivilCraft
-
Minimum-cost transport
How much goes from each block of cut to each block of fill at the least total volume times distance.
Earthwork balance and haul plan earthwork.js64-bit- CivilCraft
-
Haul plan totals
Volume moved on site, total haul, average haul distance, and what is left to take away or bring in.
haul = Σ volume × distance; average = haul ÷ moved
Earthwork balance and haul plan earthwork.js64-bit- CivilCraft
-
Earthwork balancer run
The volumes at the pad's present level, the balanced level, the tilt and the haul plan for one pad.
factor = 1 + percent ÷ 100; cell area = cell²
Earthwork, route and pond tools: values stored and exported eg-ui.js64-bit- CivilCraft
-
Balanced level written to the pad
The pad's level, and its corner elevations when it tilts, as stored in the project.
z stored = Number(z.toFixed(3))
Earthwork, route and pond tools: values stored and exported eg-ui.js64-bit- CivilCraft
-
Haul plan CSV
The haul flows exported as a CSV file.
Earthwork, route and pond tools: values stored and exported eg-ui.js64-bit- CivilCraft
-
Alignment from a found route
The PIs of a new alignment from the route's points, with a curve radius at each bend.
r = min(R, min(l₁, l₂) ÷ (2·tan(Δ/2))), stored to 2 decimals
Earthwork, route and pond tools: values stored and exported eg-ui.js64-bit- CivilCraft
-
Route ends picked in the plan
The start and end of a route search as taken from two picked points.
x, y = Number(v.toFixed(3))
Earthwork, route and pond tools: values stored and exported eg-ui.js64-bit- CivilCraft
-
Sized orifice written to the pond
The orifice diameter found for the target outflow, as stored in the pond.
diameter stored = Number((d ÷ L).toFixed(3))
Earthwork, route and pond tools: values stored and exported eg-ui.js64-bit- CivilCraft
-
Pond hydrograph CSV
Inflow, outflow and stage against time exported as a CSV file.
Earthwork, route and pond tools: values stored and exported eg-ui.js64-bit- CivilCraft
-
Survey points for progress checks
Ground points read from a LAS, LAZ, CSV or text file and turned into a surface.
LAS thinning cell = max(0.5, √(extent area ÷ 400 000)) unless a spacing is given
Earthwork, route and pond tools: values stored and exported eg-ui.js64-bit- CivilCraft
-
Three-decimal rounding of tool results
The rounding applied to nearly every number a tool returns to an assistant or script.
r3(v) = round(v × 1000) ÷ 1000
Earthwork, route and pond tools: values stored and exported eg-agent.js64-bit- CivilCraft
-
Volumes in report units
Volumes converted to cubic yards or cubic meters for a tool's answer.
cubic yards = cubic feet ÷ 27; from cubic meters: ÷ 0.028316846592 ÷ 27
Earthwork, route and pond tools: values stored and exported eg-agent.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.