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
-
Module DC power
The power of one module at a given irradiance and cell temperature.
P = Wp × G ÷ 1000 × (1 + γ × (T_cell − 25))
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Loss chain
The share of the DC energy left after soiling, mismatch, wiring, downtime and the inverter.
chain = (1 − soiling) × (1 − mismatch) × (1 − wiring) × (1 − availability) × inverter efficiency
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Power in one hour
The light on the array, the cell temperature and the DC and AC power for one hour of a month's representative day.
G = beam × (1 − shade) + sky + ground; P = n × max(0, module power); AC before clipping = P ÷ 1000 × chain
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Monthly figures
A month's light, shade loss and DC energy from its representative day.
month = day × days in month; shade loss % = (unshaded − shaded) ÷ unshaded × 100
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Inverter clipping and monthly AC energy
The AC energy of each month after the inverter's rating limits the hourly power.
scale = P_ac ÷ Σ P when Σ P > P_ac; month AC = Σₕ P × scale × days, rounded to 0.1 kWh
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Annual energy, specific yield and performance ratio of an array
An array's yearly DC and AC energy, kWh per kWp and performance ratio.
AC = Σ rounded months; specific yield = AC ÷ kWp; PR = AC ÷ (kWp × POA)
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Plant totals
The energy, specific yield, performance ratio, clipping and shade loss of all arrays together.
PR = Σ AC ÷ Σ(kWp × POA); clipped % = clipped ÷ unclipped × 100
Solar yield estimate pv-yield.js64-bit- BimCraft
- CivilCraft
-
Mesh handed to the solid kernel
Welds the mesh's corners and passes it to manifold-3d.
weld grid = 10⁻⁶ × max(Δx, Δy, Δz); positions → Float32Array
IFC openings, clippings and half-space cuts ifc/geo-bool.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Boolean of two solids
The difference, union or intersection of two element meshes.
c = center of a's box; R = (a − c) OP (b − c); result = R + c
IFC openings, clippings and half-space cuts ifc/geo-bool.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Element minus all its openings
Subtracts every opening from an element, one after another.
A₀ = base − c; Aᵢ = Aᵢ₋₁ − (cutterᵢ − c); result = Aₙ + c
IFC openings, clippings and half-space cuts ifc/geo-bool.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Face planes of a convex cutter
Finds the outward planes of a cutter and decides whether it is convex.
n = (b − a) × (c − a) ÷ |…|; d = n · a; convex when n · p − d ≤ 10 ε for every corner p
IFC openings, clippings and half-space cuts ifc/geo-bool.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Polygon split by a plane
Cuts a convex polygon into the part in front of a plane and the part behind it.
t = dₐ ÷ (dₐ − d_b); x = a + (b − a) t
IFC openings, clippings and half-space cuts ifc/geo-bool.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Mesh clipped by a plane
Keeps the part of a mesh on one side of a plane and closes the cut.
dᵢ = (pᵢ − p) · n; ε = 10⁻⁹ × (d_max − d_min); cut point = a + (b − a) dₐ ÷ (dₐ − d_b)
IFC openings, clippings and half-space cuts ifc/geo-bool.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Cap of a cut
Joins the cut segments into loops, sorts outer loops from holes and fills them.
key = round(x ÷ tol), round(y ÷ tol), round(z ÷ tol); area = ½ |Σ (xᵢ yᵢ₊₁ − xᵢ₊₁ yᵢ)|
IFC openings, clippings and half-space cuts ifc/geo-bool.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Half-space cut
Removes the part of an element behind a plane, optionally only inside a polygon boundary.
L = 4 × max(1, box diagonal) + |P₀ − box min|; prism height = 2 L
IFC openings, clippings and half-space cuts ifc/geo-bool.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Vertex data of one geometry
Returns a geometry's positions and normals for drawing and for measuring.
IFC geometry handed to the apps ifc/api.js32-bit in part- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Placement matrix of each piece
The matrix that takes a geometry's vertices to model space in meters, Y up.
M = C × Y-up × scale(u) × placement
IFC geometry handed to the apps ifc/api.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Shift to the origin
Finds the translation that brings the model near the origin.
c = (box min + box max) ÷ 2 of the first element; C = translate(−(Y-up × scale(u) × placement × c))
IFC geometry handed to the apps ifc/api.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
File units to meters, Z up to Y up
Scales a placement by the file's length unit and turns its axes.
M′ = Y-up × scale(u) × M
IFC geometry handed to the apps ifc/api.js64-bit- BimCraft
- TakeoffCraft
- CivilCraft
- DetailCraft
-
Unit sizes in meters
The length of a meter, a foot and a US survey foot used for elevations.
ft = 0.3048 m; US survey ft = 1200 ÷ 3937 m
GIS import: reprojection and elevation units gis-read.jsExact- CivilCraft
-
Features placed in the project
Reprojects every vertex of every layer and scales its elevation.
z′ = z × (source unit in m ÷ project unit in m)
GIS import: reprojection and elevation units gis-read.js64-bit- CivilCraft
-
Middle of the data in longitude and latitude
Finds where the imported data lies, to suggest a coordinate system near it.
c = (min + max) ÷ 2 of the bounding box
GIS import: reprojection and elevation units gis-read.js64-bit- CivilCraft
-
Survey points given as latitude and longitude
Converts point-file rows in degrees to project coordinates.
GIS import: reprojection and elevation units gis-read.js64-bit- CivilCraft
-
Default thresholds
The heights the filter uses when the caller gives none.
h₀ = 0.3 × cell; h_max = 6 × cell; low noise = slope × cell × 3 + 3 × h₀
Ground points from an unclassified point cloud ground-classify.js64-bit- CivilCraft
-
Lowest point per cell
Sorts the points into grid cells and keeps the lowest of each.
column = ⌊(x − minₓ) ÷ cell⌋; row = ⌊(y − min_y) ÷ cell⌋
Ground points from an unclassified point cloud ground-classify.js64-bit- CivilCraft
-
Stray low points
Drops single points that lie far below their neighbors.
stray when median(neighbors) − z > low-noise limit
Ground points from an unclassified point cloud ground-classify.js64-bit- CivilCraft
-
Opening with growing windows
Marks cells that stand above the opened surface as objects, round by round.
wₖ = 2ᵏ + 1; dhₖ = min(h_max, slope × (wₖ − wₖ₋₁) × cell + h₀); object when z − opened > dhₖ
Ground points from an unclassified point cloud ground-classify.js64-bit- CivilCraft
-
Morphological opening
The minimum, then the maximum, over a square window around each cell.
Ground points from an unclassified point cloud ground-classify.js64-bit- CivilCraft
-
Coordinates read from a row
Takes the northing, easting and elevation of one line of a point file.
Survey point files: reading and writing points.js64-bit- CivilCraft
-
Points written as a PNEZD file
Writes point number, northing, easting, elevation and description, comma separated.
N, E and Z written with dec decimals (3 by default)
Survey point files: reading and writing points.js64-bit- CivilCraft
-
Point count per group
Counts the points of each description group.
Survey point files: reading and writing points.jsExact- CivilCraft
-
Grades and vertical curves
Builds the grades between PVIs and the curve at each interior PVI.
g = Δz ÷ Δsta; A = (g₂ − g₁) × 100; L = K × |A|; z_BVC = z_PVI − g₁ × L ÷ 2; x_high/low = −g₁ × L ÷ (g₂ − g₁)
Vertical profile: grades and parabolic curves profile.js64-bit- CivilCraft
-
Design elevation at a station
The profile's elevation at any station.
z = z_BVC + g₁ × x + (g₂ − g₁) × x² ÷ (2L), x = sta − BVC; on a tangent z = zᵢ + g × (sta − staᵢ)
Vertical profile: grades and parabolic curves profile.js64-bit- CivilCraft
-
Grade at a station
The profile's slope at any station.
g = g₁ + (g₂ − g₁) × (sta − BVC) ÷ L
Vertical profile: grades and parabolic curves profile.js64-bit- CivilCraft
-
Existing ground along the alignment
Samples the surface's elevation at regular stations and at the alignment's key stations.
step = length ÷ 1000, at least 0.5; stations: start, start + step, …, end, plus key stations
Vertical profile: grades and parabolic curves profile.js64-bit- CivilCraft
-
Stand-in ground for a road with no survey
The elevation and extent of the flat ground a corridor is drawn on when the project has no surface.
z = mean of the PVI elevations, rounded to 0.01; margin = (60 m or 200 ft) + 6 × (z_max − z_min)
Project: stand-in ground, volumes and saved points project.js64-bit- CivilCraft
-
Cut and fill inside the daylight lines
The total cut and fill and the figures per graded item.
Project: stand-in ground, volumes and saved points project.js64-bit- CivilCraft
-
Points in the project file
Writes each survey point to the .civilcraft.json file.
Project: stand-in ground, volumes and saved points project.js64-bit- CivilCraft
-
Default rate table
The rates by radius and the relative gradient a new corridor starts with.
Superelevation: runoff, runout and lane slopes superelev.js64-bit- CivilCraft
-
Rate for a radius
Looks up the superelevation rate of a curve.
Superelevation: runoff, runout and lane slopes superelev.js64-bit- CivilCraft
-
Runoff, runout and transition stations
The lengths and stations of the transition into and out of each curve.
L_r = lane × e ÷ Δ; L_t = (NC ÷ e) × L_r; without a spiral: level at TS − ⅔L_r, full at TS + ⅓L_r
Superelevation: runoff, runout and lane slopes superelev.js64-bit- CivilCraft
-
Outside lane slope through a transition
The cross slope of the outside lane at a station.
runout: NC − NC × (x − nc₀) ÷ L_t; runoff: −e × (x − lc₀) ÷ L_r; result = max(up, down, −e)
Superelevation: runoff, runout and lane slopes superelev.js64-bit- CivilCraft
-
Lane slopes at a station
The fall-away slope of the left and right lanes.
inside = max(NC, −outside)
Superelevation: runoff, runout and lane slopes superelev.js64-bit- CivilCraft
-
Line taken from the team
Turns shared geometry into feature line points in the drawing's unit.
k = 1 (same unit), 0.3048 (ft → m) or 1 ÷ 0.3048 (m → ft); p′ = p × k
Shared feature lines: units and geometry team-lines.js64-bit- CivilCraft
-
Line sent to the team
Turns a feature line into the points that are shared.
Shared feature lines: units and geometry team-lines.js64-bit- CivilCraft
-
One point into its cell
Decides whether an incoming point is kept, replaces the cell's point, or is dropped.
i = ⌊(x − oₓ) ÷ cell⌋; key = i × 2³² + (j + 2³¹); nearest: d² = (fₓ − i − ½)² + (f_y − j − ½)²
Thinning point clouds to a spacing thin.js64-bit- CivilCraft
-
The thinned points
Returns one point per occupied cell.
average mode: x̄ = Σx ÷ n, ȳ = Σy ÷ n, z̄ = Σz ÷ n
Thinning point clouds to a spacing thin.js64-bit- CivilCraft
-
Grid step for a spacing
How many grid nodes to skip so an elevation grid is thinned to about the spacing asked for.
n = max(1, round(spacing ÷ cell size))
Thinning point clouds to a spacing thin.js64-bit- CivilCraft
-
Estimate of points kept
Tells the import dialog about how many points a thinning will keep.
kept ≈ Σ min(points × f, cell area × f ÷ spacing² + 1), f = part of the coarse cell inside the area
Thinning point clouds to a spacing thin.js64-bit- CivilCraft
-
Value of a number row
The number handed to the app when a person changes a number box.
v = min(max, max(min, typed value))
Numbers typed into the property grid app-propgrid.js Every app64-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.