Segmented Field Specification¶
Overview¶
A segmented field saves space in a range of values
This is done by defining a numeric range of values where:
- There is a low value
- There is a high value
- Some parts of the number range are higher resolution
- Some parts of the number range are lower resolution
More formally
A segmented field is a numeric telemetry field whose legal values are defined by multiple contiguous numeric ranges, where each range may use a different step size.
This is useful when one part of a measurement range needs finer resolution than another part, but the result still needs to behave as one encoded field.
A field may want
-25to-5in steps of5-5to5in steps of15to25in steps of5-2.5to-0.5in steps of0.5-0.5to0.5in steps of0.10.5to2.5in steps of0.5
This page introduces the idea, gives a formal specification, and shows examples.
Motivation¶
Why use a segmented field instead of one fixed step size?
A single step size is often a poor fit for real telemetry.
If the step is too fine, too many encoded values are spent on regions that do not need that precision.
If the step is too coarse, the part of the range that does matter loses useful detail.
Example: Clock Drift¶
Measuring clock-drift errors near zero than large errors farther away from zero
In that case, a segmented field can use:
- Finer steps near zero drift
- Coarser steps farther from zero
Example value ranges and resolutions:
-25to-5uses5 msresolution-5to5uses1 msresolution5to25uses5 msresolution
Legal values are:
Example tooling
Tooling via Field Calculator.
Chart showing number line and resolution of values:

Automatic C/C++ code generation for use in tracker implementations or review:

Canonical JSON Form¶
This specification uses Traquito-format field definition for illustration purposes.
{
"name": "<FieldName>",
"unit": "<UnitName>",
"valueSegmentList": [
[low_1, step_1, high_1],
[low_2, step_2, high_2]
]
}
Formal Specification¶
Field Definition¶
A segmented field definition contains:
valueSegmentList: Ordered list of value segments
Each segment is a 3-element list in canonical order:
where:
lowis the segment minimum (eg0,-2.5)stepis the representable spacing within the segment (eg20,0.5)highis the segment maximum (eg100,2.5)
Segment Validity Rules¶
Each segment must satisfy all of the following:
lowis finitestepis finitehighis finitelow < highstep > 0(high - low) / stepis an integer
The final rule means that the step must exactly tile the segment range.
This applies equally to integer and floating-point segments.
Segment Ordering Rules¶
The segments in valueSegmentList are ordered from low numeric range to high numeric range.
Adjacent segments must satisfy:
This means:
- No gaps between segments
- No overlaps between segments
- One continuous field across the full range
Boundary Ownership¶
Shared segment boundaries are represented only once.
For every segment except the final segment, the legal values are:
For the final segment, the legal values are:
This avoids double-counting a shared boundary such as:
In that field, 100 belongs only once, as the first value of the second segment.
Representable Value Count¶
For a segment:
the number of legal values is:
(high - low) / stepfor a non-final segment(high - low) / step + 1for the final segment
The full field radix is the sum of those counts across all segments.
Encoding And Decoding Model¶
The purpose of a segmented field is to map between:
- A physical numeric value
- A packed integer value in the range
0toradix - 1
Encode¶
Encoding proceeds conceptually as follows:
- Determine which segment contains the input value.
- Quantize the input onto that segment's legal step grid.
- Convert the segment-local step index into a field-global packed value by adding the counts of all earlier segments.
Decode¶
Decoding proceeds conceptually as follows:
- Determine which segment contains the packed integer.
- Convert the packed integer into a segment-local index.
- Reconstruct the field value:
The encode and decode procedures are therefore simple inverses of one another, provided the same field definition is used on both sides.
Quantization Behavior¶
Inputs are interpreted according to the field definition.
Typical behavior
In practice, implementations commonly:
- Clamp values below the field minimum to the field minimum
- Clamp values above the field maximum to the field maximum
- Quantize values within range to the nearest legal representable value
When nearest-value quantization is used, the threshold between two adjacent representable values is the midpoint between them.
For adjacent legal values a and b, the threshold is:
Examples¶
Example 1: Single-Segment Field¶
Legal values:
This is equivalent to an ordinary uniformly stepped field.
Example 2: Two Segments With Different Resolution¶
Legal values become:
- First segment:
0, 10, 20, ..., 90 - Second segment:
100, 150, 200, 250, 300
This gives:
- Fine resolution in the lower range
- Coarse resolution in the upper range
- One continuous encoded field
Example 3: Negative Floating-Point Segmented Field¶
This demonstrates that segmented fields support:
- Negative values
- Floating-point segment bounds
- Floating-point step sizes
- Different resolutions in different parts of the range
Example 4: Negative-Only Segmented Field¶
Legal values become:
- First segment:
-120, -100, -80, -60 - Second segment:
-40, -35, -30, -25, -20, -15, -10, -5, 0
This demonstrates that segmented fields do not need to cross zero. They can represent entirely negative ranges while still changing resolution between segments.
Example 5: Floating-Point Segmented Field¶
Legal values become:
- First segment:
0.0, 0.25, 0.5, 0.75 - Second segment:
1.0, 1.5, 2.0, 2.5, 3.0
This demonstrates that segmented fields support floating-point segment bounds and floating-point step sizes even when the full range is non-negative.
Example 6: Mixed Negative, Positive, Integer, And Decimal Field¶
Legal values become:
- First segment:
-12, -10, -8, -6 - Second segment:
-4.0, -3.5, -3.0, ..., 3.5, 4.0 - Third segment:
4.5, 6.0 - Fourth segment:
6, 8, 10, 12, 14
This demonstrates that a segmented field can combine:
- Negative values
- Positive values
- Integer step sizes
- Decimal step sizes
all within one continuous encoded field.
Practical Notes¶
Segment order matters
Segments are listed in ascending numeric order and are interpreted in that order.
Shared boundaries are structural
If one segment ends at 5, the next must begin at 5.
Negative and floating-point values are allowed
Segmented fields may use negative values and floating-point step sizes, as long as every segment is tiled exactly and adjacent segment boundaries still match exactly.
The field radix is the count of legal values
The total number of representable field values is the number of packed values required to encode the field.
A segmented field is still one field
The segments are an internal definition detail. The encoded result is still one packed field value.
Tools¶
The Field Calculator helps define, inspect, and verify segmented fields
It provides:
- Interactive editing of
valueSegmentList - Field analysis and radix calculation
- Charting of quantization behavior
- Encode/decode code generation in C
- Export helpers for JSON, URLs, and generated code
The Codec Playground supports this field definition structure