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.

  • 6,917 calculations in 1,248 source files
  • 143 exact
  • 6,286 in 64-bit
  • 335 with a 32-bit step
  • Last reviewed

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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • Time factor for a degree of consolidation

    The time factor at which a given share of the settlement is reached.

    Foundation settlement geotech.js
    • CivilCraft
    64-bit
  • Time to reach a degree of consolidation

    The time for a share of the consolidation settlement.

    t = Tv·Hdr² ÷ cv

    Foundation settlement geotech.js
    • CivilCraft
    64-bit
  • Settlement against time

    The settlement curve from zero to a chosen time.

    s(t) = s_final × U(cv·t ÷ Hdr²)

    Foundation settlement geotech.js
    • CivilCraft
    64-bit
  • Secondary compression

    Settlement from secondary compression between two times.

    S = Cα·H ÷ (1 + ep) × log₁₀(t₂ ÷ t₁)

    Foundation settlement geotech.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    32-bit in part
  • 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.js
    • CivilCraft
    32-bit in part
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • Point inside a ring

    Whether a point lies inside a ring.

    GIS feature geometry gis-geom.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • Coordinates through a conversion

    Every vertex of a geometry passed through a function of x and y, keeping z.

    GIS feature geometry gis-geom.js
    • CivilCraft
    64-bit
  • Elevations through a conversion

    The z of every vertex passed through a function, for unit conversion.

    GIS feature geometry gis-geom.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit
  • 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.js
    • CivilCraft
    64-bit

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.