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
-
Elastic settlement under a corner
The settlement of the corner of a flexible loaded rectangle on an elastic half-space.
w = q·(1 − ν²) ÷ (π·E) × [a·ln((b + d) ÷ a) + b·ln((a + d) ÷ b)], d = √(a² + b²)
Foundation settlement geotech.js64-bit- CivilCraft
-
Settlement of a layered soil
Consolidation and immediate settlement under a footing, sub-layer by sub-layer.
clay: s = Cc·Δz ÷ (1 + e₀) × log₁₀(σ′f ÷ σ′₀), with Cs below σ′c; sand: s = Δσ ÷ Es × Δz
Foundation settlement geotech.js64-bit- CivilCraft
-
Degree of consolidation
The share of the final consolidation settlement reached at a time factor.
U = 1 − Σ (2 ÷ M²)·exp(−M²·Tv), M = π·(2m + 1) ÷ 2
Foundation settlement geotech.js64-bit- CivilCraft
-
Time factor for a degree of consolidation
The time factor at which a given share of the settlement is reached.
Foundation settlement geotech.js64-bit- CivilCraft
-
Time to reach a degree of consolidation
The time for a share of the consolidation settlement.
t = Tv·Hdr² ÷ cv
Foundation settlement geotech.js64-bit- CivilCraft
-
Settlement against time
The settlement curve from zero to a chosen time.
s(t) = s_final × U(cv·t ÷ Hdr²)
Foundation settlement geotech.js64-bit- CivilCraft
-
Secondary compression
Settlement from secondary compression between two times.
S = Cα·H ÷ (1 + ep) × log₁₀(t₂ ÷ t₁)
Foundation settlement geotech.js64-bit- CivilCraft
-
Elevation grid from a surface
The elevation at the center of every grid cell, row by row from the north.
x₀ = ⌊minX ÷ cell⌋·cell; y₀ = ⌈maxY ÷ cell⌉·cell; center = (x₀ + (c + 0.5)·cell, y₀ − (r + 0.5)·cell)
Surface exported as a GeoTIFF elevation grid geotiff-write.js32-bit in part- CivilCraft
-
Elevations written to the file
The tiles or strips of elevation values as they go into the TIFF.
Surface exported as a GeoTIFF elevation grid geotiff-write.js32-bit in part- CivilCraft
-
Grid origin and cell size in the file
The pixel scale and the tie point that place the grid.
pixel scale = (cell, cell, 0); tie point = pixel (0, 0) at (x₀, y₀)
Surface exported as a GeoTIFF elevation grid geotiff-write.js64-bit- CivilCraft
-
Default cell size
The mean plan length of the surface's triangle edges, offered as the cell size.
Σ |edge| ÷ number of edges
Surface exported as a GeoTIFF elevation grid geotiff-write.js64-bit- CivilCraft
-
Signed area of a ring
The area of a ring, positive when it runs counter-clockwise.
area = Σ (xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ) ÷ 2
GIS feature geometry gis-geom.js64-bit- CivilCraft
-
Point inside a ring
Whether a point lies inside a ring.
GIS feature geometry gis-geom.js64-bit- CivilCraft
-
Rings sorted into polygons and holes
Which rings are outlines and which are holes, and which outline each hole belongs to.
GIS feature geometry gis-geom.js64-bit- CivilCraft
-
Coordinates through a conversion
Every vertex of a geometry passed through a function of x and y, keeping z.
GIS feature geometry gis-geom.js64-bit- CivilCraft
-
Elevations through a conversion
The z of every vertex passed through a function, for unit conversion.
GIS feature geometry gis-geom.js64-bit- CivilCraft
-
Layers moved to a new coordinate system
Every GIS layer's coordinates converted when the project's system changes.
project → grid of the old system → grid of the new system → project
GIS feature geometry gis-layers.js64-bit- CivilCraft
-
Attribute value as a label
The text drawn on the plan for a feature's attribute value.
number shown = +v.toFixed(3)
GIS feature geometry gis-layers.js64-bit- CivilCraft
-
Label point of a polygon
The centroid of a polygon's largest ring, where its label is placed.
cx = Σ (xᵢ + xᵢ₊₁)·cᵢ ÷ (3·Σ cᵢ), cᵢ = xᵢ·yᵢ₊₁ − xᵢ₊₁·yᵢ
GIS feature geometry gis-layers.js64-bit- CivilCraft
-
Pad elevation and area
The ELEV and AREA attributes of an exported pad.
AREA = |shoelace area of the pad's corners|
Project objects exported as GIS layers gis-export.js64-bit- CivilCraft
-
Alignment line and length
An alignment's exported linework and its LENGTH, STA_START and STA_END attributes.
chords of at most π ÷ 360 (0.5°) of turn
Project objects exported as GIS layers gis-export.js64-bit- CivilCraft
-
Pipe attributes
A pipe's exported inverts, slope in percent and length.
SLOPE = slope × 100; LENGTH = checked length, else √(Δx² + Δy²)
Project objects exported as GIS layers gis-export.js64-bit- CivilCraft
-
Surface edge as polygons with holes
The surface's outline loops arranged as outer rings and holes for the boundary export.
Project objects exported as GIS layers gis-export.js64-bit- CivilCraft
-
Features in grid coordinates
Every exported feature's coordinates passed through the project's grid transform, with the N and E attributes of survey points set to match.
Project objects exported as GIS layers gis-export.js64-bit- CivilCraft
-
Elevations to meters for GeoJSON and KML
The factor applied to elevations when the export is in longitude and latitude.
z in meters = z × meters per project unit
Project objects exported as GIS layers gis-export.js64-bit- CivilCraft
-
Number box
The text of a property box turned into the value handed to the model.
typed sum of lengths → Number(value.toFixed(9))
Values typed or picked in the main window civilcraft.js64-bit- CivilCraft
-
PI coordinates box
The easting and northing of an alignment's point of intersection as shown and as stored from the box.
Values typed or picked in the main window civilcraft.js64-bit- CivilCraft
-
First design profile from the ground
The two profile points a new design profile starts with, at the ends of the ground profile.
z stored = Number(z.toFixed(2))
Values typed or picked in the main window civilcraft.js64-bit- CivilCraft
-
Profile point added by a click
The station and elevation of a profile point placed in the profile view.
station = Number(sta.toFixed(2)), clamped to the alignment; z = Number(z.toFixed(2))
Values typed or picked in the main window civilcraft.js64-bit- CivilCraft
-
Profile point moved by dragging
The station and elevation of a profile point while it is dragged, as stored when released.
station and z = Number(v.toFixed(2)); station kept 0.01 inside its neighbors
Values typed or picked in the main window civilcraft.js64-bit- CivilCraft
-
Elevation of a newly drawn pad
The elevation a new pad starts at.
z = Number(ground(mean of corners).toFixed(1))
Values typed or picked in the main window civilcraft.js64-bit- CivilCraft
-
Default curve radius at a new PI
The radius given to each bend of a newly drawn alignment.
r = min(R, ⌊half the shorter leg ÷ tan(Δ ÷ 2)⌋)
Values typed or picked in the main window civilcraft.js64-bit- CivilCraft
-
Ground elevation at a station
The existing ground elevation read out at the cursor's station in the profile view.
z = z_a + (z_b − z_a) × (s − s_a) ÷ (s_b − s_a)
Values typed or picked in the main window civilcraft.js64-bit- CivilCraft
-
Project units per file unit
The factor that turns a spacing typed in project units into the file's own units.
k = |f(c + d) − f(c)| ÷ d, c = middle of the file
Terrain import and GeoTIFF export settings gis-terrain-ui.js64-bit- CivilCraft
-
Default thinning spacing
The spacing the dialog proposes so the import stays under the point limit.
grid: cell × ⌈√(n ÷ (0.98 × cap))⌉; LiDAR: max(1.5 × √(area ÷ points), 1.1 × √(area ÷ cap)) rounded to a 1-2-5 step
Terrain import and GeoTIFF export settings gis-terrain-ui.js64-bit- CivilCraft
-
Points a grid import will make
The number of cells read and of points or triangles made, shown before the import runs.
count = ⌈columns ÷ step⌉ × ⌈rows ÷ step⌉; triangles = 2 × (⌈columns ÷ step⌉ − 1) × (⌈rows ÷ step⌉ − 1)
Terrain import and GeoTIFF export settings gis-terrain-ui.js64-bit- CivilCraft
-
LiDAR point into project coordinates
Each kept LiDAR point's position and elevation as stored in the project.
(x, y) → f(x, y); z → z × z factor
Terrain import and GeoTIFF export settings gis-terrain-ui.js64-bit- CivilCraft
-
Default GeoTIFF cell size
The cell size proposed when a surface is exported as an elevation grid.
cell = average triangle edge ÷ 2.5, rounded to a 1-2-5 step
Terrain import and GeoTIFF export settings gis-terrain-ui.js64-bit- CivilCraft
-
GeoTIFF grid size estimate
The number of columns and rows the dialog says the export will have.
nx = ⌈width ÷ cell⌉ + 1; ny = ⌈height ÷ cell⌉ + 1
Terrain import and GeoTIFF export settings gis-terrain-ui.js64-bit- CivilCraft
-
One slope line to the ground
The point where a cut or fill slope leaving the pad edge meets the surface.
f(d) = z + g·d − ground(p₀ + u·d); g = rate ÷ cut or −rate ÷ fill; find d with f(d) = 0
Pad daylight lines and the graded surface grading.js64-bit- CivilCraft
-
Rays round the pad
The start, direction and climb rate of every slope line: square to each edge, fanned at convex corners, along the bisector at concave corners.
turn = atan2(n₁ × n₂, n₁ · n₂); concave rate = cos(|turn| ÷ 2); wall mitre = thickness ÷ max(0.25, cos(|turn| ÷ 2))
Pad daylight lines and the graded surface grading.js64-bit- CivilCraft
-
Rays trimmed at a concave corner
Drops edge rays that would reach past the line where two slopes meet in an inside corner.
side(x, y) = b_x·(y − v_y) − b_y·(x − v_x); drop when the ray's ends have opposite signs
Pad daylight lines and the graded surface grading.js64-bit- CivilCraft
-
Pad, slopes and daylight line as breaklines
The lines that go into the proposed surface for one pad: its edge, its daylight line and every slope line longer than 1e-6.
Pad daylight lines and the graded surface grading.js64-bit- CivilCraft
-
Proposed surface from ground and graded items
Removes ground points and breaklines inside each graded region, adds the item's own, and triangulates again.
Pad daylight lines and the graded surface grading.js64-bit- CivilCraft
-
Do two segments cross
The yes-or-no test used for self-crossing pads, self-crossing daylight lines and breaklines that cross a region.
o(p, q, r) = (q − p) × (r − p); cross when both pairs of signs are opposite
Pad daylight lines and the graded surface grading.js64-bit- CivilCraft
-
Distance from a point to a polygon edge
Whether a ground point lies on a daylight line.
t = clamp((p − a)·(b − a) ÷ |b − a|², 0, 1); distance = |p − a − t·(b − a)|
Pad daylight lines and the graded surface grading.js64-bit- CivilCraft
-
Cut, fill and net volume
The volumes reported between the existing and the proposed surface.
fill = Σ (z₁ − z₀)·c² where z₁ > z₀; cut = Σ (z₀ − z₁)·c² otherwise; net = fill − cut; area = cells × c²
Cut and fill volumes by the grid method grading.js64-bit- CivilCraft
-
Default cell size
Rounds the automatic cell size to 1, 2, 5 or 10 times a power of ten.
p = 10^⌊log₁₀ v⌋; cell = {1, 2, 5, 10} × p
Cut and fill volumes by the grid method grading.js64-bit- CivilCraft
-
Elevation of a contour line
The one elevation a line carries: its own z, or the z all its vertices share.
Ground surface from contour lines and points ground-surface.js64-bit- CivilCraft
-
Elevations by picking lines in order
Gives the k-th picked line the elevation start + k × interval.
z_k = start + k × interval
Ground surface from contour lines and points ground-surface.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.