Description
Compute turn as floor((reference-longitude+180)/360), add 360 times turn to longitude, and return that unwrapped representative.
Longitude is an angular coordinate with a seam and equivalent values separated by full turns. Interval direction, endpoint inclusion, and half-turn policy must be fixed before comparing or averaging longitudes.
Compute turn as floor((reference-longitude+180)/360), add 360 times turn to longitude, and return that unwrapped representative.
When to use this tool
Use Longitude Signed Unwrapped Representative when you need a longitude normalization, interval, or seam-policy calculation.
How to use the tool and how it works
- Enter longitude, reference. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read longitude, turn. Use the output convention below.
Compute turn as floor((reference-longitude+180)/360), add 360 times turn to longitude, and return that unwrapped representative.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| longitude | Longitude | Required. Finite number. |
| reference | Caller-supplied reference under the formula or token convention above. | Required. Finite number. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| longitude | Longitude | Required. Finite number. |
| turn | Integer number of 360-degree turns added; half-turn tie chooses the +180 difference. | Required. Safe integer. |
{
"input": {
"longitude": -170,
"reference": 170
},
"output": {
"longitude": 190,
"turn": 1
}
} Limitations and assumptions
- Output minus reference belongs to (-180, 180], so an exact half-turn tie chooses positive 180. Inputs are not restricted to conventional longitude bounds and no reference frame is inferred.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use a full spherical or ellipsoidal geometry method for routes and areas. Retain an explicit seam and endpoint policy when splitting, sorting, or averaging geographic data.
References
Similar or alternative tools
- Geography: Longitude Seam Endpoint Policy
Normalize modulo 360, mapping the seam to +180 under positive policy or -180 otherwise.
- Longitude Halfturn Tie Direction Label
Wrap to minus from modulo 360.