Repository navigation
Releases
Releases · YoloWingPixie/dcs-harness
Release v1.4.0
Added
- Count the records that share an index value with
IndexedCollection:countAll.
Changed
RingBuffer:get(andDeduplicatingQueue:get) now takes the same time for every position instead of slowing down for items further from the front. Fractional positions still round down.RingBuffer:getandDeduplicatingQueue:getnow returnnilfor a NaN position. They previously returned the front item.IndexedCollection:getAlltakes time proportional to the matching records instead of the whole collection. Records still come back in the order they were added, including afterreplacemoves a record to another index value.
Release v1.3.1
Fixed
IsFiniteVec2andIsFiniteVec3no longer error on every call. In 1.3.0 they called a helper that had been removed, which broke every function that validates a vector.
Release v1.2.0
Added
RingBuffer:rotate,DeduplicatingQueue,IndexedPriorityQueue, andIndexedCollectionprovide reusable queue and collection operations.
Release v1.1.0
Added
CircleUnionArea2Dcalculates the exact analytic union area of validated horizontal circles without polygon approximation.
Fixed
- Repeated bundled loads now preserve namespaced logger instances and their message prefixes.
Removed
- Harness no longer creates the shared global
Log; consumers create and retain a local logger withHarnessLogger(namespace).
Release v1.0.2
Fixed
CreateFireAtPointTasknow projects target Vec3 X/Z coordinates to the DCSFireAtPointVec2 X/Y fields.
Release v1.0.1
Added
GetUnitHealthreturns a validated current and initial life snapshot with derived alive and damaged states for a named unit.
Release v1.0.0
Added
dist/harness.d.luaprovides the generated LuaLS public API definition.HeadingVector2Dreturns the DCS Vec2 unit vector for a heading.GroundTrackFromVelocityreturns track from horizontal Vec3 velocity above a configurable minimum speed.HeadingFrame2Dcreates forward and right axes at a Vec3 origin.ProjectPointToHeadingFrame2Dreturns along and lateral position in a heading frame.ProjectVectorToHeadingFrame2Dreturns forward and lateral vector components in a heading frame.GetReciprocalRunwayNamecalculates the reciprocal designator and swaps L/R suffixes.NormalizeDirectionalRunwaysvalidates raw runway records and emits primary and reciprocal directions.GetDirectionalRunwaysprotects theAirbase:getRunways()compatibility call and normalizes its result.GetRunwayRelativePositionreturns along and lateral position from a runway threshold.GetRunwayRelativeVelocityreturns forward and lateral velocity for a runway.GetRunwayLineupErrorreturns signed centerline error outside a configurable minimum range.GetRunwayGlidepathAnglereturns threshold glidepath angle outside a configurable minimum range.GetHeadwindComponentreturns the wind component opposing a landing heading.SelectRunwayByHeadwindreturns the first runway with the greatest headwind component.FindNearestRunwayreturns the runway with the nearest paved-surface center.GetUnitPosition3returns one protected and fully validated DCS Position3 value.GetAttitudeFromPosition3returns heading, pitch, and bank from Position3 axes.AirRelativeVelocitysubtracts wind velocity from ground velocity.GetAerodynamicAnglesreturns angle of attack, sideslip, and true airspeed.CalculateIsaAtmospherereturns International Standard Atmosphere data from 0 through 20 km.GetAirDatareturns DCS atmosphere data with an ISA fallback.MachFromTrueAirspeedreturns Mach from true airspeed and temperature.TrueAirspeedToCalibratedAirspeedconverts subsonic true airspeed to calibrated airspeed.GetUnitDrawArgumentsreads a caller-supplied argument ID array and reports whether the result is complete.GetAllAirbasesmerges world and coalition airbases, deduplicates them by name, and sorts them.FindAirbasesWithinfilters a caller-supplied airbase list by radius.GetAllPlayerUnitsreturns name-sorted player units from neutral, red, and blue coalitions.GetPlayerIdsreturns the network player ID list.GetPlayerInfosreturns available information for all network player IDs.FindPlayerInfosByNamereturns every exact player-name match and accepts a caller-supplied list.GetWorldEventUnitresolves a named unit from an event initiator or unit field.GetMissionFileCapabilitiesreports whether protected mission file access is available.SanitizeFilenameComponentproduces a bounded safe filename component.EnsureMissionDirectorycreates a validated relative directory belowlfs.writedir().WriteMissionTextFilewrites a new protected text file without overwriting an existing target.WriteUniqueMissionTextFilewrites the first available name within a bounded numeric suffix range.TimeWeightedStatscreates a constant-size duration-weighted statistics accumulator.TimeWeightedStats:addaccepts one value and positive duration and updates the bounded accumulator.TimeWeightedStats:countreturns the accepted sample count.TimeWeightedStats:durationreturns the total accepted duration.TimeWeightedStats:meanreturns the duration-weighted mean.TimeWeightedStats:rmsreturns the duration-weighted root mean square.TimeWeightedStats:minreturns the minimum accepted value.TimeWeightedStats:maxreturns the maximum accepted value.TimeWeightedStats:peakreturns the signed greatest-absolute value and its label.TimeWeightedStats:resetclears all accumulator state.HarnessConstants.AIR_SPECIFIC_HEAT_RATIOdefines the dry-air ratio of specific heats.HarnessConstants.DRY_AIR_GAS_CONSTANT_J_KG_Kdefines the dry-air gas constant.HarnessConstants.SEA_LEVEL_PRESSURE_PAdefines standard sea-level pressure.HarnessConstants.SEA_LEVEL_DENSITY_KG_M3defines standard sea-level density.HarnessConstants.SEA_LEVEL_TEMPERATURE_Kdefines standard sea-level temperature.HarnessConstants.AIR_DATA_SOURCE_DCSidentifies DCS atmosphere data.HarnessConstants.AIR_DATA_SOURCE_ISAidentifies calculated ISA data.
Changed
- Version changed from 0.8.0 to 1.0.0-rc2.
ControllerSetROEnow exports a Selene signature that accepts numeric and named ROE values.ControllerSetAlarmStatenow exports a Selene signature that accepts numeric and named alarm states.GeoGridnow exports its optional cell size and allowed-type table accurately to Selene.EventBusnow exports its key selector as an optional function.GetCoalitionGroupsnow has one authoritative definition and returns an empty array on invalid input or API failure.BuildAirOptionsnow uses ordered option definitions and preserves explicit false RTB overrides._HarnessInternal.cache.addControllernow stores recognized controller metadata when provided.GetUnitControllernow delegates controller metadata storage to the cache owner.GetGroupControllernow delegates controller metadata storage to the cache owner.EstimateTwoBodyCPAnow shares horizontal position calculations without changing its result contract.EstimateInterceptForSpeednow isolates nonnegative root selection without changing its result contract.ProcessDrawingGeometrynow delegates drawing types and polygon modes to private handlers.NormalizeDirectionalRunwaysnow separates raw-record validation from directional runway creation.Vec2now stores DCS{x,y}fields instead of{x,z}.IsVec2now accepts only DCS{x,y}values without a Z component.ToVec2now returns DCS{x,y}and maps Vec3 Z to Vec2 Y.ToVec3now maps Vec2 Y to Vec3 Z and uses its altitude argument for Vec3 Y.VecAddnow adds Vec2 X/Y components.VecSubnow subtracts Vec2 X/Y components.VecScalenow scales Vec2 X/Y components.VecDivnow divides Vec2 X/Y components.VecLengthnow measures Vec2 X/Y components.VecLength2Dnow measures Vec2 X/Y or Vec3 X/Z components.VecDotnow computes Vec2 dot products from X/Y components.Distance2Dnow measures Vec2 X/Y or Vec3 X/Z separation.Distance2DSquarednow measures squared Vec2 X/Y or Vec3 X/Z separation.Bearingnow uses positive world X as north and east as 90 degrees.BearingBetweennow delegates toBearing.FromBearingDistancenow displaces X by cosine and east by sine.DisplacePoint2Dnow delegates toFromBearingDistance.Midpointnow returns Vec2 X/Y midpoints.VecLerpnow interpolates Vec2 X/Y components.Vec2ToStringnow formats Vec2 X/Y fields.Vec2:toVec3now maps Vec2 Y to Vec3 Z and uses its argument for Vec3 altitude.Vec2:lengthnow measures X/Y components.Vec2:normalizednow normalizes X/Y components.Vec2:dotnow computes its dot product from X/Y components.Vec2:distanceTonow measures X/Y separation.Vec2:bearingTonow uses positive X as north and positive Y as east.Vec2:displacenow displaces X by cosine and Y by sine.Vec2:midpointTonow returns an X/Y midpoint.Vec2:angleTonow calculates its angle from X/Y components.Vec2:rotatenow rotates X/Y components.Vec3:toVec2now projects Vec3 X/Z to Vec2 X/Y.Vec3:bearingTonow uses positive X as north and positive Z as east.Vec3:displace2Dnow displaces X by cosine and Z by sine while preserving altitude.MidPointnow accepts and returns DCS Vec2 X/Y values or Vec3 values.RotatePoint2Dnow rotates DCS Vec2 X/Y or Vec3 X/Z coordinates.NormalizeVector2Dnow normalizes DCS Vec2 X/Y or Vec3 X/Z coordinates.DotProduct2Dnow uses DCS Vec2 X/Y or Vec3 X/Z components.AngleBetweenVectors2Dnow uses DCS Vec2 X/Y or Vec3 X/Z components.PointInPolygon2Dnow accepts DCS Vec2 X/Y or Vec3 X/Z points.CircleLineIntersection2Dnow accepts and returns DCS Vec2 or Vec3 coordinates.PolygonArea2Dnow calculates area from DCS Vec2 X/Y or Vec3 X/Z points.PolygonCentroid2Dnow returns a DCS Vec2 or Vec3 centroid matching its input.ConvexHull2Dnow reads DCS Vec2 X/Y or Vec3 X/Z points.GetWindHeadingnow uses the same DCS world convention as unit heading.GetTerrainHeightnow projects Vec3 X/Z to DCS Vec2 X/Y and rejects malformed tables.GetSurfaceTypenow projects Vec3 X/Z to DCS Vec2 X/Y and rejects malformed tables.GetAGLnow gets ground height through the corrected Vec3-to-Vec2 projection.SetAGLnow gets ground height through the corrected Vec3-to-Vec2 projection.GetClosestRoadPointnow returns a DCS Vec2{x,y}.FindRoadPathnow returns DCS Vec2{x,y}points.AddCommandnow forwards caption before path and returns the native Path.AddCommandForCoalitionnow forwards coalition ID, caption, path, handler, and argument.AddCommandForGroupnow forwards group ID, caption, path, handler, and argument.AddSubMenunow forwards caption before path and returns the native Path.AddSubMenuForCoalitionnow forwards coalition ID, caption, and path.AddSubMenuForGroupnow forwards group ID, caption, and path.RemoveItemnow accepts a nil root path.RemoveItemForCoalitionnow accepts a nil root path.RemoveItemForGroupnow accepts a nil root path.GetUnitIDnow accepts names or unit objects and normalizes positive integral numeric strings.GetUnitVelocitynow accepts names or unit objects and returns a validated Vec3.OutTextForUnitnow normalizes positive integral numeric IDs and numeric strings before the unit-scoped DCS call.GetUnitPositionnow derives fromGetUnitPosition3.GetUnitHeading...
Release v0.8.0
Added
HarnessConstantsglobal table consolidating all shared constantsGetTacanFrequencyTACAN frequency calculatorGetWindHeadingandGetWindSpeedatmosphere helpersInverseHeadingreciprocal heading utilityConvertKiasToGroundSpeedandConvertKiasToMpsISA-based airspeed conversionGetAllShipsandGetAllAircraftGroupscoalition-wide queriesIsSuperCarrierunit type detectionGetUnitHeadingnow accepts unit objects in addition to namesGetUnitOrientationandGetUnitPositionAndHeadingcombo queriesDecimalToDMS,GetLatLonOrientation, andCoordToMGRScoordinate formattingBuildGroundWaypointandGoRouteground unit routing helpersIsNotAtMapOriginnon-origin position guardRingBuffer:reverseIternewest-to-oldest iteration with early exit