🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.comp.os.windows-10
Article #812

Re: Python analysis of abnormal front tire wear on windy US mountain roads

#812
From: Maria Sophia
Date: Sun, 08 Nov 2026 18:19
1184 lines
41565 bytes
Chris wrote:
> Supply a file. You could have done it far more quickly by now rather then
> repetitively responding to everyone why you aren't.

Here is full code & testcase for the Guardsman Pass suggested by Blaine.
 <https://i.postimg.cc/JnDSSC4x/guardsmanpass.jpg>

 1. Open the appropriate road link for the suggested Angels Crest road.
     <https://gpx.studio/app#13.81/40.61548/-111.52533>
 2. Select File > New.
 3. Select the route-planning tool (pen icon).
 4. Select the appropriate routing mode (e.g., bicycle to stay on asphalt)
 5. Trace the complete road (or just click beginning & ending points).
 6. Select File > Export > Download GPX file.
 7. Save using the suggested road-based below filename.
 8. Run the Python analysis: python mountaincurves.py guardsmanpass.gpx

Loaded 219 raw track points from 'guardsmanpass.gpx'.

--- Road Geometric Analysis: guardsmanpass.gpx ---
Detected sharp/moderate curves (R < 200m): 135
Left-hand turning distribution: 70
Right-hand turning distribution: 65
Minimum corner radius (tightest hairpin): 2.04 meters

--- Top 5 Tightest Hairpins / Curves ---
1. Radius: 2.04m | Direction: Left | Lat/Lon: 40.620587, -111.495800
2. Radius: 2.04m | Direction: Left | Lat/Lon: 40.620605, -111.495784
3. Radius: 2.29m | Direction: Left | Lat/Lon: 40.620597, -111.495796
4. Radius: 2.33m | Direction: Right | Lat/Lon: 40.620464, -111.495741
5. Radius: 2.71m | Direction: Right | Lat/Lon: 40.620569, -111.495601
 =========< cut here for guardsmanpass.gpx >=========
<?xml version="1.0" encoding="UTF-8"?>
<gpx creator="https://gpx.studio" version="1.1" xmlns="http://www.topografix.com/GPX/1/1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd http://www.garmin.com/xmlschemas/GpxExtensions/v3 http://www.garmin.com/xmlschemas/GpxExtensionsv3.xsd http://www.garmin.com/xmlschemas/TrackPointExtension/v1 http://www.garmin.com/xmlschemas/TrackPointExtensionv1.xsd http://www.garmin.com/xmlschemas/PowerExtension/v1 http://www.garmin.com/xmlschemas/PowerExtensionv1.xsd http://www.topografix.com/GPX/gpx_style/0/2 http://www.topografix.com/GPX/gpx_style/0/2/gpx_style.xsd" xmlns:gpxtpx="http://www.garmin.com/xmlschemas/TrackPointExtension/v1" xmlns:gpxx="http://www.garmin.com/xmlschemas/GpxExtensions/v3" xmlns:gpxpx="http://www.garmin.com/xmlschemas/PowerExtension/v1" xmlns:gpx_style="http://www.topografix.com/GPX/gpx_style/0/2">
  <metadata>
    <name>New file 4</name>
    <author>
      <name>gpx.studio</name>
      <link href="https://gpx.studio"/>
    </author>
  </metadata>
  <trk>
    <name>New file 4</name>
    <trkseg>
      <trkpt lat="40.606487" lon="-111.524455">
        <ele>2710.88</ele>
      </trkpt>
      <trkpt lat="40.606261" lon="-111.52343">
        <ele>2709.85</ele>
      </trkpt>
      <trkpt lat="40.606167" lon="-111.523041">
        <ele>2708.7</ele>
      </trkpt>
      <trkpt lat="40.606094" lon="-111.522781">
        <ele>2709.6</ele>
      </trkpt>
      <trkpt lat="40.606013" lon="-111.522582">
        <ele>2710.35</ele>
      </trkpt>
      <trkpt lat="40.605903" lon="-111.522365">
        <ele>2711.6</ele>
      </trkpt>
      <trkpt lat="40.605681" lon="-111.522022">
        <ele>2713.65</ele>
      </trkpt>
      <trkpt lat="40.605541" lon="-111.521725">
        <ele>2713.25</ele>
      </trkpt>
      <trkpt lat="40.605522" lon="-111.521653">
        <ele>2712.7</ele>
      </trkpt>
      <trkpt lat="40.605513" lon="-111.52156">
        <ele>2712.4</ele>
      </trkpt>
      <trkpt lat="40.605531" lon="-111.521422">
        <ele>2712.55</ele>
      </trkpt>
      <trkpt lat="40.605648" lon="-111.521203">
        <ele>2712.3</ele>
      </trkpt>
      <trkpt lat="40.605787" lon="-111.520978">
        <ele>2712.65</ele>
      </trkpt>
      <trkpt lat="40.605931" lon="-111.52063">
        <ele>2714.2</ele>
      </trkpt>
      <trkpt lat="40.60598" lon="-111.520445">
        <ele>2714.85</ele>
      </trkpt>
      <trkpt lat="40.606015" lon="-111.520231">
        <ele>2715.95</ele>
      </trkpt>
      <trkpt lat="40.606024" lon="-111.520075">
        <ele>2716.75</ele>
      </trkpt>
      <trkpt lat="40.606019" lon="-111.519915">
        <ele>2718</ele>
      </trkpt>
      <trkpt lat="40.605985" lon="-111.519536">
        <ele>2720.4</ele>
      </trkpt>
      <trkpt lat="40.605977" lon="-111.519351">
        <ele>2720.85</ele>
      </trkpt>
      <trkpt lat="40.60598" lon="-111.519166">
        <ele>2721.22</ele>
      </trkpt>
      <trkpt lat="40.606085" lon="-111.518173">
        <ele>2721.45</ele>
      </trkpt>
      <trkpt lat="40.6061" lon="-111.517946">
        <ele>2720.5</ele>
      </trkpt>
      <trkpt lat="40.606084" lon="-111.517487">
        <ele>2720.45</ele>
      </trkpt>
      <trkpt lat="40.605989" lon="-111.516289">
        <ele>2722.55</ele>
      </trkpt>
      <trkpt lat="40.605927" lon="-111.515513">
        <ele>2721.1</ele>
      </trkpt>
      <trkpt lat="40.605817" lon="-111.514504">
        <ele>2720.9</ele>
      </trkpt>
      <trkpt lat="40.605768" lon="-111.51374">
        <ele>2717.45</ele>
      </trkpt>
      <trkpt lat="40.605753" lon="-111.512171">
        <ele>2712.2</ele>
      </trkpt>
      <trkpt lat="40.605681" lon="-111.510888">
        <ele>2713.45</ele>
      </trkpt>
      <trkpt lat="40.60562" lon="-111.509951">
        <ele>2718.25</ele>
      </trkpt>
      <trkpt lat="40.605617" lon="-111.509805">
        <ele>2719.05</ele>
      </trkpt>
      <trkpt lat="40.605636" lon="-111.509555">
        <ele>2721.2</ele>
      </trkpt>
      <trkpt lat="40.605691" lon="-111.50929">
        <ele>2723.9</ele>
      </trkpt>
      <trkpt lat="40.605764" lon="-111.509099">
        <ele>2725.35</ele>
      </trkpt>
      <trkpt lat="40.605905" lon="-111.508871">
        <ele>2728.25</ele>
      </trkpt>
      <trkpt lat="40.605997" lon="-111.508753">
        <ele>2728.73</ele>
      </trkpt>
      <trkpt lat="40.606174" lon="-111.508593">
        <ele>2729.24</ele>
      </trkpt>
      <trkpt lat="40.606362" lon="-111.508402">
        <ele>2728.4</ele>
      </trkpt>
      <trkpt lat="40.60644" lon="-111.508275">
        <ele>2727.11</ele>
      </trkpt>
      <trkpt lat="40.606466" lon="-111.508219">
        <ele>2726.1</ele>
      </trkpt>
      <trkpt lat="40.606528" lon="-111.508045">
        <ele>2724.2</ele>
      </trkpt>
      <trkpt lat="40.606721" lon="-111.507446">
        <ele>2719.45</ele>
      </trkpt>
      <trkpt lat="40.606855" lon="-111.507044">
        <ele>2717.65</ele>
      </trkpt>
      <trkpt lat="40.606927" lon="-111.506909">
        <ele>2717.4</ele>
      </trkpt>
      <trkpt lat="40.606988" lon="-111.50682">
        <ele>2716.95</ele>
      </trkpt>
      <trkpt lat="40.607068" lon="-111.506742">
        <ele>2716.2</ele>
      </trkpt>
      <trkpt lat="40.607497" lon="-111.506407">
        <ele>2712.25</ele>
      </trkpt>
      <trkpt lat="40.607625" lon="-111.506299">
        <ele>2712.15</ele>
      </trkpt>
      <trkpt lat="40.607666" lon="-111.50628">
        <ele>2711.7</ele>
      </trkpt>
      <trkpt lat="40.607744" lon="-111.506271">
        <ele>2710.3</ele>
      </trkpt>
      <trkpt lat="40.607776" lon="-111.506278">
        <ele>2710.1</ele>
      </trkpt>
      <trkpt lat="40.607796" lon="-111.506289">
        <ele>2709.95</ele>
      </trkpt>
      <trkpt lat="40.607824" lon="-111.506345">
        <ele>2709.31</ele>
      </trkpt>
      <trkpt lat="40.60782" lon="-111.506405">
        <ele>2708.6</ele>
      </trkpt>
      <trkpt lat="40.607786" lon="-111.506457">
        <ele>2708.25</ele>
      </trkpt>
      <trkpt lat="40.607616" lon="-111.506605">
        <ele>2707</ele>
      </trkpt>
      <trkpt lat="40.607435" lon="-111.506812">
        <ele>2706.15</ele>
      </trkpt>
      <trkpt lat="40.607251" lon="-111.507139">
        <ele>2705</ele>
      </trkpt>
      <trkpt lat="40.60711" lon="-111.507443">
        <ele>2703.25</ele>
      </trkpt>
      <trkpt lat="40.607086" lon="-111.507545">
        <ele>2702.8</ele>
      </trkpt>
      <trkpt lat="40.607078" lon="-111.507626">
        <ele>2702.45</ele>
      </trkpt>
      <trkpt lat="40.607084" lon="-111.507664">
        <ele>2702</ele>
      </trkpt>
      <trkpt lat="40.607116" lon="-111.50773">
        <ele>2700.8</ele>
      </trkpt>
      <trkpt lat="40.607146" lon="-111.507751">
        <ele>2700.26</ele>
      </trkpt>
      <trkpt lat="40.607194" lon="-111.507753">
        <ele>2699.55</ele>
      </trkpt>
      <trkpt lat="40.607221" lon="-111.50774">
        <ele>2699.1</ele>
      </trkpt>
      <trkpt lat="40.607242" lon="-111.507718">
        <ele>2698.6</ele>
      </trkpt>
      <trkpt lat="40.607344" lon="-111.507537">
        <ele>2696.4</ele>
      </trkpt>
      <trkpt lat="40.607435" lon="-111.507427">
        <ele>2694.65</ele>
      </trkpt>
      <trkpt lat="40.607599" lon="-111.507312">
        <ele>2692.55</ele>
      </trkpt>
      <trkpt lat="40.607734" lon="-111.50726">
        <ele>2690.35</ele>
      </trkpt>
      <trkpt lat="40.607909" lon="-111.507215">
        <ele>2687.95</ele>
      </trkpt>
      <trkpt lat="40.60819" lon="-111.507172">
        <ele>2684.75</ele>
      </trkpt>
      <trkpt lat="40.608453" lon="-111.50716">
        <ele>2680.05</ele>
      </trkpt>
      <trkpt lat="40.608618" lon="-111.507119">
        <ele>2677.59</ele>
      </trkpt>
      <trkpt lat="40.608872" lon="-111.507019">
        <ele>2673.15</ele>
      </trkpt>
      <trkpt lat="40.609415" lon="-111.506708">
        <ele>2664.95</ele>
      </trkpt>
      <trkpt lat="40.609596" lon="-111.50665">
        <ele>2662.86</ele>
      </trkpt>
      <trkpt lat="40.609705" lon="-111.506638">
        <ele>2661.4</ele>
      </trkpt>
      <trkpt lat="40.609835" lon="-111.506643">
        <ele>2659.35</ele>
      </trkpt>
      <trkpt lat="40.610508" lon="-111.50674">
        <ele>2647.58</ele>
      </trkpt>
      <trkpt lat="40.610833" lon="-111.506774">
        <ele>2644.15</ele>
      </trkpt>
      <trkpt lat="40.611446" lon="-111.50685">
        <ele>2635.5</ele>
      </trkpt>
      <trkpt lat="40.612041" lon="-111.506885">
        <ele>2626.35</ele>
      </trkpt>
      <trkpt lat="40.612322" lon="-111.506868">
        <ele>2622.8</ele>
      </trkpt>
      <trkpt lat="40.612498" lon="-111.506825">
        <ele>2621</ele>
      </trkpt>
      <trkpt lat="40.612713" lon="-111.506731">
        <ele>2618.35</ele>
      </trkpt>
      <trkpt lat="40.612889" lon="-111.506672">
        <ele>2615.9</ele>
      </trkpt>
      <trkpt lat="40.613516" lon="-111.506642">
        <ele>2605.3</ele>
      </trkpt>
      <trkpt lat="40.613672" lon="-111.506652">
        <ele>2603.45</ele>
      </trkpt>
      <trkpt lat="40.614148" lon="-111.506711">
        <ele>2597.2</ele>
      </trkpt>
      <trkpt lat="40.614357" lon="-111.506778">
        <ele>2594.55</ele>
      </trkpt>
      <trkpt lat="40.614481" lon="-111.506838">
        <ele>2593.15</ele>
      </trkpt>
      <trkpt lat="40.614621" lon="-111.506929">
        <ele>2590.5</ele>
      </trkpt>
      <trkpt lat="40.615024" lon="-111.507273">
        <ele>2583.15</ele>
      </trkpt>
      <trkpt lat="40.615089" lon="-111.507319">
        <ele>2582.36</ele>
      </trkpt>
      <trkpt lat="40.61526" lon="-111.507427">
        <ele>2579.95</ele>
      </trkpt>
      <trkpt lat="40.615365" lon="-111.507474">
        <ele>2578.4</ele>
      </trkpt>
      <trkpt lat="40.615449" lon="-111.507499">
        <ele>2577.5</ele>
      </trkpt>
      <trkpt lat="40.615613" lon="-111.507519">
        <ele>2575.04</ele>
      </trkpt>
      <trkpt lat="40.615958" lon="-111.507499">
        <ele>2570.7</ele>
      </trkpt>
      <trkpt lat="40.616128" lon="-111.507479">
        <ele>2568.4</ele>
      </trkpt>
      <trkpt lat="40.616381" lon="-111.507422">
        <ele>2565.67</ele>
      </trkpt>
      <trkpt lat="40.616584" lon="-111.507168">
        <ele>2566.15</ele>
      </trkpt>
      <trkpt lat="40.616801" lon="-111.50696">
        <ele>2564.05</ele>
      </trkpt>
      <trkpt lat="40.616893" lon="-111.506836">
        <ele>2563.52</ele>
      </trkpt>
      <trkpt lat="40.617091" lon="-111.506636">
        <ele>2560.8</ele>
      </trkpt>
      <trkpt lat="40.617185" lon="-111.506467">
        <ele>2559.85</ele>
      </trkpt>
      <trkpt lat="40.617463" lon="-111.50607">
        <ele>2555.65</ele>
      </trkpt>
      <trkpt lat="40.617609" lon="-111.505711">
        <ele>2553.4</ele>
      </trkpt>
      <trkpt lat="40.617674" lon="-111.505374">
        <ele>2552.75</ele>
      </trkpt>
      <trkpt lat="40.617953" lon="-111.504748">
        <ele>2547.85</ele>
      </trkpt>
      <trkpt lat="40.61803" lon="-111.50445">
        <ele>2547.15</ele>
      </trkpt>
      <trkpt lat="40.618046" lon="-111.504255">
        <ele>2547</ele>
      </trkpt>
      <trkpt lat="40.61818" lon="-111.503684">
        <ele>2543.5</ele>
      </trkpt>
      <trkpt lat="40.618308" lon="-111.503336">
        <ele>2542.7</ele>
      </trkpt>
      <trkpt lat="40.618436" lon="-111.503149">
        <ele>2541.2</ele>
      </trkpt>
      <trkpt lat="40.618497" lon="-111.502922">
        <ele>2540.52</ele>
      </trkpt>
      <trkpt lat="40.618561" lon="-111.502577">
        <ele>2540.05</ele>
      </trkpt>
      <trkpt lat="40.618586" lon="-111.502386">
        <ele>2540.05</ele>
      </trkpt>
      <trkpt lat="40.618602" lon="-111.502058">
        <ele>2539.79</ele>
      </trkpt>
      <trkpt lat="40.618638" lon="-111.502062">
        <ele>2538.65</ele>
      </trkpt>
      <trkpt lat="40.618757" lon="-111.502032">
        <ele>2535.75</ele>
      </trkpt>
      <trkpt lat="40.61898" lon="-111.501913">
        <ele>2530.91</ele>
      </trkpt>
      <trkpt lat="40.619389" lon="-111.50161">
        <ele>2526.9</ele>
      </trkpt>
      <trkpt lat="40.619643" lon="-111.501369">
        <ele>2524.05</ele>
      </trkpt>
      <trkpt lat="40.620054" lon="-111.500935">
        <ele>2519.05</ele>
      </trkpt>
      <trkpt lat="40.620479" lon="-111.500538">
        <ele>2514.5</ele>
      </trkpt>
      <trkpt lat="40.620518" lon="-111.500475">
        <ele>2514.05</ele>
      </trkpt>
      <trkpt lat="40.620545" lon="-111.500412">
        <ele>2513.35</ele>
      </trkpt>
      <trkpt lat="40.620577" lon="-111.500302">
        <ele>2512</ele>
      </trkpt>
      <trkpt lat="40.620621" lon="-111.499842">
        <ele>2508.31</ele>
      </trkpt>
      <trkpt lat="40.620644" lon="-111.499573">
        <ele>2507.1</ele>
      </trkpt>
      <trkpt lat="40.620754" lon="-111.498941">
        <ele>2502.7</ele>
      </trkpt>
      <trkpt lat="40.620786" lon="-111.498714">
        <ele>2500.95</ele>
      </trkpt>
      <trkpt lat="40.620795" lon="-111.498495">
        <ele>2499.5</ele>
      </trkpt>
      <trkpt lat="40.620788" lon="-111.498285">
        <ele>2498.4</ele>
      </trkpt>
      <trkpt lat="40.620765" lon="-111.498046">
        <ele>2496.45</ele>
      </trkpt>
      <trkpt lat="40.620726" lon="-111.497836">
        <ele>2495</ele>
      </trkpt>
      <trkpt lat="40.620664" lon="-111.497586">
        <ele>2493.3</ele>
      </trkpt>
      <trkpt lat="40.620593" lon="-111.497364">
        <ele>2492.15</ele>
      </trkpt>
      <trkpt lat="40.620457" lon="-111.49707">
        <ele>2490.4</ele>
      </trkpt>
      <trkpt lat="40.620332" lon="-111.496828">
        <ele>2488.6</ele>
      </trkpt>
      <trkpt lat="40.620215" lon="-111.49655">
        <ele>2486.3</ele>
      </trkpt>
      <trkpt lat="40.62013" lon="-111.496304">
        <ele>2484.5</ele>
      </trkpt>
      <trkpt lat="40.620026" lon="-111.495861">
        <ele>2480.73</ele>
      </trkpt>
      <trkpt lat="40.620001" lon="-111.495723">
        <ele>2479.73</ele>
      </trkpt>
      <trkpt lat="40.620138" lon="-111.495797">
        <ele>2477.4</ele>
      </trkpt>
      <trkpt lat="40.620317" lon="-111.495872">
        <ele>2473.95</ele>
      </trkpt>
      <trkpt lat="40.62047" lon="-111.495976">
        <ele>2470.85</ele>
      </trkpt>
      <trkpt lat="40.620503" lon="-111.49598">
        <ele>2470.15</ele>
      </trkpt>
      <trkpt lat="40.620514" lon="-111.495968">
        <ele>2469.75</ele>
      </trkpt>
      <trkpt lat="40.620521" lon="-111.495911">
        <ele>2468.93</ele>
      </trkpt>
      <trkpt lat="40.620518" lon="-111.495855">
        <ele>2468.25</ele>
      </trkpt>
      <trkpt lat="40.620466" lon="-111.495783">
        <ele>2468.45</ele>
      </trkpt>
      <trkpt lat="40.620464" lon="-111.495741">
        <ele>2467.95</ele>
      </trkpt>
      <trkpt lat="40.620474" lon="-111.495734">
        <ele>2467.55</ele>
      </trkpt>
      <trkpt lat="40.620526" lon="-111.49575">
        <ele>2466.3</ele>
      </trkpt>
      <trkpt lat="40.620572" lon="-111.49579">
        <ele>2465.75</ele>
      </trkpt>
      <trkpt lat="40.620587" lon="-111.4958">
        <ele>2465.5</ele>
      </trkpt>
      <trkpt lat="40.620597" lon="-111.495796">
        <ele>2465.15</ele>
      </trkpt>
      <trkpt lat="40.620605" lon="-111.495784">
        <ele>2464.75</ele>
      </trkpt>
      <trkpt lat="40.620605" lon="-111.495766">
        <ele>2464.5</ele>
      </trkpt>
      <trkpt lat="40.620562" lon="-111.49564">
        <ele>2463.8</ele>
      </trkpt>
      <trkpt lat="40.620569" lon="-111.495601">
        <ele>2463.1</ele>
      </trkpt>
      <trkpt lat="40.620599" lon="-111.495601">
        <ele>2462.3</ele>
      </trkpt>
      <trkpt lat="40.62067" lon="-111.495675">
        <ele>2461.6</ele>
      </trkpt>
      <trkpt lat="40.620689" lon="-111.495677">
        <ele>2461.15</ele>
      </trkpt>
      <trkpt lat="40.620701" lon="-111.495667">
        <ele>2460.7</ele>
      </trkpt>
      <trkpt lat="40.620717" lon="-111.495621">
        <ele>2459.55</ele>
      </trkpt>
      <trkpt lat="40.620894" lon="-111.495806">
        <ele>2456.9</ele>
      </trkpt>
      <trkpt lat="40.620968" lon="-111.495912">
        <ele>2455.75</ele>
      </trkpt>
      <trkpt lat="40.620981" lon="-111.495923">
        <ele>2455.65</ele>
      </trkpt>
      <trkpt lat="40.621013" lon="-111.49592">
        <ele>2455.21</ele>
      </trkpt>
      <trkpt lat="40.620971" lon="-111.49557">
        <ele>2452.9</ele>
      </trkpt>
      <trkpt lat="40.620945" lon="-111.495442">
        <ele>2451.78</ele>
      </trkpt>
      <trkpt lat="40.620866" lon="-111.495243">
        <ele>2450</ele>
      </trkpt>
      <trkpt lat="40.620717" lon="-111.494983">
        <ele>2448.75</ele>
      </trkpt>
      <trkpt lat="40.620457" lon="-111.4946">
        <ele>2445.75</ele>
      </trkpt>
      <trkpt lat="40.620142" lon="-111.494265">
        <ele>2442</ele>
      </trkpt>
      <trkpt lat="40.620102" lon="-111.494197">
        <ele>2441.45</ele>
      </trkpt>
      <trkpt lat="40.620062" lon="-111.494101">
        <ele>2440.4</ele>
      </trkpt>
      <trkpt lat="40.620045" lon="-111.493991">
        <ele>2439.2</ele>
      </trkpt>
      <trkpt lat="40.620045" lon="-111.49386">
        <ele>2438.45</ele>
      </trkpt>
      <trkpt lat="40.620115" lon="-111.493291">
        <ele>2435.55</ele>
      </trkpt>
      <trkpt lat="40.620116" lon="-111.492995">
        <ele>2434.4</ele>
      </trkpt>
      <trkpt lat="40.620097" lon="-111.492847">
        <ele>2433.8</ele>
      </trkpt>
      <trkpt lat="40.619904" lon="-111.4921">
        <ele>2430.05</ele>
      </trkpt>
      <trkpt lat="40.619896" lon="-111.491992">
        <ele>2430</ele>
      </trkpt>
      <trkpt lat="40.619909" lon="-111.491877">
        <ele>2429.6</ele>
      </trkpt>
      <trkpt lat="40.619948" lon="-111.491761">
        <ele>2428.65</ele>
      </trkpt>
      <trkpt lat="40.619997" lon="-111.491679">
        <ele>2427.95</ele>
      </trkpt>
      <trkpt lat="40.620096" lon="-111.491584">
        <ele>2426.45</ele>
      </trkpt>
      <trkpt lat="40.620187" lon="-111.491548">
        <ele>2425.95</ele>
      </trkpt>
      <trkpt lat="40.620267" lon="-111.491544">
        <ele>2425.35</ele>
      </trkpt>
      <trkpt lat="40.620361" lon="-111.491572">
        <ele>2424.5</ele>
      </trkpt>
      <trkpt lat="40.620423" lon="-111.491615">
        <ele>2424</ele>
      </trkpt>
      <trkpt lat="40.620511" lon="-111.4917">
        <ele>2423.2</ele>
      </trkpt>
      <trkpt lat="40.620562" lon="-111.491807">
        <ele>2422.05</ele>
      </trkpt>
      <trkpt lat="40.620586" lon="-111.491914">
        <ele>2421.4</ele>
      </trkpt>
      <trkpt lat="40.620594" lon="-111.492068">
        <ele>2420.2</ele>
      </trkpt>
      <trkpt lat="40.620564" lon="-111.492544">
        <ele>2417.4</ele>
      </trkpt>
      <trkpt lat="40.62058" lon="-111.492857">
        <ele>2415.9</ele>
      </trkpt>
      <trkpt lat="40.620619" lon="-111.493027">
        <ele>2415.21</ele>
      </trkpt>
      <trkpt lat="40.620665" lon="-111.493155">
        <ele>2414.05</ele>
      </trkpt>
      <trkpt lat="40.620719" lon="-111.493272">
        <ele>2412.9</ele>
      </trkpt>
      <trkpt lat="40.620792" lon="-111.493377">
        <ele>2411.65</ele>
      </trkpt>
      <trkpt lat="40.620888" lon="-111.493475">
        <ele>2409.7</ele>
      </trkpt>
      <trkpt lat="40.620984" lon="-111.49354">
        <ele>2408.25</ele>
      </trkpt>
      <trkpt lat="40.621143" lon="-111.493617">
        <ele>2406.5</ele>
      </trkpt>
      <trkpt lat="40.621739" lon="-111.493865">
        <ele>2398.57</ele>
      </trkpt>
      <trkpt lat="40.622285" lon="-111.494043">
        <ele>2391.57</ele>
      </trkpt>
      <trkpt lat="40.622405" lon="-111.494101">
        <ele>2390.1</ele>
      </trkpt>
      <trkpt lat="40.622599" lon="-111.494214">
        <ele>2387.8</ele>
      </trkpt>
      <trkpt lat="40.622781" lon="-111.494349">
        <ele>2384.9</ele>
      </trkpt>
      <trkpt lat="40.622967" lon="-111.494526">
        <ele>2382.95</ele>
      </trkpt>
      <trkpt lat="40.623093" lon="-111.49467">
        <ele>2381.55</ele>
      </trkpt>
      <trkpt lat="40.623277" lon="-111.494946">
        <ele>2379.37</ele>
      </trkpt>
    </trkseg>
  </trk>
</gpx>
 =========< cut here for mountaincurves.py >=========
# #################################################################
# mountaincurves.py
# GPX road geometry analysis
#
# Calculates:
#  Corner radii
#  Left/right turn directions
#  Curvature statistics
#  Top 5 tightest hairpins
# 
# Use model:
#   python mountaincurves.py [input.gpx]
#
# Examples:
#   python mountaincurves.py mokidugway.gpx
#   python mountaincurves.py shafercanyon.gpx
#   python mountaincurves.py burrtrail.gpx
#   python mountaincurves.py guardsmanpass.gpx
# #################################################################
# Moki Dugway
#  <https://i.postimg.cc/DydH9gFb/mokidugway.jpg>
#  <https://i.postimg.cc/3x8VYvxN/mokidugway.png>
# Shafer Canyon
#  <https://i.postimg.cc/HLjN71MB/shafercanyon.jpg>
#  <https://i.postimg.cc/9M7NJPJ1/shafercanyon.png>
# Burr Trail
#  <https://i.postimg.cc/X7f6VWKC/burrtrail.jpg>
#  <https://i.postimg.cc/CxJyq4Q0/burrtrail.png>
# Guardsman Pass
#  <https://i.postimg.cc/JnDSSC4x/guardsmanpass.jpg>
#  <https://i.postimg.cc/G3DZQR55/guardsmanpass.png>
# #################################################################
# v1.7 20261104 Ran a random control test on Utah mountain roads
# Suggested by Blaine Message-ID: <11cficq$pl38$1@dont-email.me>
# #################################################################
# Four Utah test roads (randomly selected on comp.lang.python)
# 1. Moki Dugway
# 2. Shafer Canyon Road (Shafer Trail)
# 3. Burr Trail
# 4. Guardsman Pass
#  
# Shafer Canyon and Burr Trail have steep switchback sections.
# Moki Dugway has sustained descending switchbacks. 
# Guardsman Pass is a paved-mountain-road comparison.
# ###################################################################
# <https://gpx.studio/>
#   1. Open the appropriate road link below.
#   2. Select File > New.
#   3. Select the route-planning tool (pen icon).
#   4. Select the appropriate routing mode (bicycle).
#   5. Trace the complete road or click beginning & ending points.
#   6. Select File > Export > Download file.
#   7. Save using the suggested filename.
#   8. Run the Python analysis.
#       C:\> python mountaincurves.py [input.gpx]
# -------------------------------------------------------------------
# <https://overpass-turbo.eu/>
#   1. Open the appropriate road link below.
#   2. Delete the existing query in the editor (if any).
#   3. Copy ONE query below into the editor and press the "Run" icon.
#   4. Press the "Search" icon to zoom into the highlighted results.
#   5. Select Export > Data > GPX
#   6. Save using the suggested filename.
#   7. Run the Python analysis.
#       C:\> python mountaincurves.py [input.gpx]
# ###################################################################
# Moki Dugway, Utah State Route 261, Cedar Mesa, Utah.
# I traced the steep switchback section
# <https://gpx.studio/app#14.41/37.27473/-109.93787>
# <https://overpass-turbo.eu/>
#  [out:xml][timeout:60];
#  // Moki Dugway - southern hairpin extension
#  (
#    way["highway"]
#      (37.17,-109.96,37.23,-109.91);
#  );
#  (._;>;);
#  out body;
# Save as mokidugway.gpx
# -------------------------------------------------------------------
# Shafer Canyon Road (Shafer Trail) Canyonlands National Park, Utah
# <https://gpx.studio/app#15/38.45303/-109.82112>
# <https://overpass-turbo.eu/>
#  [out:xml][timeout:60];
#  way["highway"]["name"~"Shafer Trail|Shafer Canyon",i]
#  (38.43,-109.84,38.51,-109.77);
#  (._;>;);
#  out body;
# Save as shafercanyon.gpx
# -------------------------------------------------------------------
# Burr Trail, Boulder, Utah, through Long Canyon and Waterpocket Fold.
# <https://gpx.studio/app#14.55/37.85138/-111.03141>
# <https://overpass-turbo.eu/>
#  [out:xml][timeout:60];
#  // Burr Trail, Boulder, Utah
#  // Long Canyon and Waterpocket Fold
#  (
  #  way["highway"]["name"~"Burr Trail",i]
    #  (37.81,-111.08,37.90,-110.98);
#  );
#  (._;>;);
#  out body;
#
# Save as burrtrail.gpx
# -------------------------------------------------------------------
# Guardsman Pass, Wasatch Mountains, between Brighton & Park City, Utah.
# <https://gpx.studio/app#13.81/40.61548/-111.52533>
# <https://overpass-turbo.eu/>
#  [out:xml][timeout:60];
#  // Guardsman Pass
#  // Wasatch Mountains, between Brighton and Park City, Utah
#  (
  #  way["highway"]["name"~"Guardsman Pass|Guardsman Pass Road",i]
    #  (40.55,-111.62,40.66,-111.48);
#  );
# Save as guardsmanpass.gpx
# ###################################################################
# RUNNING THE FOUR TESTS
# python mountaincurves.py mokidugway.gpx
# python mountaincurves.py shafercanyon.gpx
# python mountaincurves.py burrtrail.gpx
# python mountaincurves.py guardsmanpass.gpx
# ###################################################################
# Results will be inserted here after GPX analysis.
#
# Moki Dugway:
#   Pending GPX analysis.
#
# Shafer Canyon:
#   Pending GPX analysis.
#
# Burr Trail:
#   Pending GPX analysis.
#
# Guardsman Pass:
#   Pending GPX analysis.
#
# ###################################################################

import xml.etree.ElementTree as ET
import math
import sys


def parse_gpx(filename):
    tree = ET.parse(filename)
    root = tree.getroot()

    points = []

    for trkpt in root.iter(
        '{http://www.topografix.com/GPX/1/1}trkpt'
    ):
        lat = float(trkpt.get('lat'))
        lon = float(trkpt.get('lon'))
        points.append((lat, lon))

    return points


def calculate_curvature(p1, p2, p3):

    lat_scale = 111132.92
    lon_scale = 111412.84 * math.cos(math.radians(p2[0]))

    def to_m(p):
        return (
            (p[1] - p2[1]) * lon_scale,
            (p[0] - p2[0]) * lat_scale
        )

    A = to_m(p1)
    B = (0.0, 0.0)
    C = to_m(p3)

    a = math.hypot(B[0]-C[0], B[1]-C[1])
    b = math.hypot(A[0]-C[0], A[1]-C[1])
    c = math.hypot(A[0]-B[0], A[1]-B[1])

    s = (a + b + c) / 2.0
    area_sq = s * (s-a) * (s-b) * (s-c)

    if area_sq <= 0 or a*b*c == 0:
        return float('inf'), "Straight"

    area = math.sqrt(abs(area_sq))
    radius = (a*b*c) / (4.0*area)

    cross = (
        (A[0]-B[0]) * (C[1]-B[1])
        - (A[1]-B[1]) * (C[0]-B[0])
    )

    direction = "Left" if cross > 0 else "Right"

    return radius, direction


if __name__ == "__main__":

    if len(sys.argv) > 1:
        gpx_filename = sys.argv[1]
    else:
        gpx_filename = 'mokidugway.gpx'
        print(
            f"No filename provided. "
            f"Defaulting to '{gpx_filename}'..."
        )

    try:
        pts = parse_gpx(gpx_filename)

    except FileNotFoundError:
        print(
            f"Error: Could not find GPX file "
            f"'{gpx_filename}'."
        )
        sys.exit(1)

    except ET.ParseError:
        print(
            f"Error: Could not parse GPX file "
            f"'{gpx_filename}'."
        )
        sys.exit(1)

    print(
        f"Loaded {len(pts)} raw track points "
        f"from '{gpx_filename}'."
    )

    left_turns = 0
    right_turns = 0
    curve_records = []

    for i in range(len(pts)-2):

        r, direction = calculate_curvature(
            pts[i],
            pts[i+1],
            pts[i+2]
        )

        if r < 200:

            curve_records.append(
                (
                    r,
                    direction,
                    pts[i+1][0],
                    pts[i+1][1]
                )
            )

            if direction == "Left":
                left_turns += 1

            elif direction == "Right":
                right_turns += 1

    print(
        f"\n--- Road Geometric Analysis: "
        f"{gpx_filename} ---"
    )

    print(
        f"Detected sharp/moderate curves (R < 200m): "
        f"{len(curve_records)}"
    )

    print(
        f"Left-hand turning distribution: {left_turns}"
    )

    print(
        f"Right-hand turning distribution: {right_turns}"
    )

    if curve_records:

        curve_records.sort(key=lambda x: x[0])

        print(
            f"Minimum corner radius (tightest hairpin): "
            f"{curve_records[0][0]:.2f} meters"
        )

        print("\n--- Top 5 Tightest Hairpins / Curves ---")

        for idx, (r, direction, lat, lon) in enumerate(
            curve_records[:5], 1
        ):

            print(
                f"{idx}. Radius: {r:.2f}m | "
                f"Direction: {direction} | "
                f"Lat/Lon: {lat:.6f}, {lon:.6f}"
            )

# ###################################################################
# END OF mountaincurves.py
# ###################################################################
# Results:
# C:\> python mountaincurves.py mokidugway.gpx
# Loaded 220 raw track points from 'mokidugway.gpx'.
# --- Road Geometric Analysis: mokidugway.gpx ---
# Detected sharp/moderate curves (R < 200m): 154
# Left-hand turning distribution: 76
# Right-hand turning distribution: 78
# Minimum corner radius (tightest hairpin): 5.89 meters
# 
# --- Top 5 Tightest Hairpins / Curves ---
# 1. Radius: 5.89m | Direction: Right | Lat/Lon: 37.276825, -109.935955
# 2. Radius: 7.00m | Direction: Left | Lat/Lon: 37.272532, -109.944278
# 3. Radius: 7.67m | Direction: Left | Lat/Lon: 37.272507, -109.944243
# 4. Radius: 8.48m | Direction: Right | Lat/Lon: 37.276883, -109.935927
# 5. Radius: 8.84m | Direction: Right | Lat/Lon: 37.276849, -109.935935
# 
# # -------------------------------------------------------------------
# C:\> python mountaincurves.py shafercanyon.gpx
# Loaded 162 raw track points from 'shafercanyon.gpx'.
# 
# --- Road Geometric Analysis: shafercanyon.gpx ---
# Detected sharp/moderate curves (R < 200m): 131
# Left-hand turning distribution: 66
# Right-hand turning distribution: 65
# Minimum corner radius (tightest hairpin): 3.97 meters
# 
# --- Top 5 Tightest Hairpins / Curves ---
# 1. Radius: 3.97m | Direction: Right | Lat/Lon: 38.449308, -109.820485
# 2. Radius: 4.44m | Direction: Left | Lat/Lon: 38.448474, -109.818339
# 3. Radius: 6.81m | Direction: Left | Lat/Lon: 38.447882, -109.818434
# 4. Radius: 7.10m | Direction: Left | Lat/Lon: 38.447199, -109.819240
# 5. Radius: 7.93m | Direction: Right | Lat/Lon: 38.450305, -109.819414
# 
# # -------------------------------------------------------------------
# C:\> python mountaincurves.py burrtrail.gpx
# Loaded 199 raw track points from 'burrtrail.gpx'.
# 
# --- Road Geometric Analysis: burrtrail.gpx ---
# Detected sharp/moderate curves (R < 200m): 139
# Left-hand turning distribution: 71
# Right-hand turning distribution: 68
# Minimum corner radius (tightest hairpin): 4.70 meters
# 
# --- Top 5 Tightest Hairpins / Curves ---
# 1. Radius: 4.70m | Direction: Left | Lat/Lon: 37.848198, -111.024654
# 2. Radius: 6.16m | Direction: Left | Lat/Lon: 37.848657, -111.023535
# 3. Radius: 6.88m | Direction: Right | Lat/Lon: 37.850700, -111.027191
# 4. Radius: 7.59m | Direction: Right | Lat/Lon: 37.850662, -111.027217
# 5. Radius: 7.73m | Direction: Right | Lat/Lon: 37.850838, -111.025700
# 
# # -------------------------------------------------------------------
# C:\> python mountaincurves.py guardsmanpass.gpx
# Loaded 219 raw track points from 'guardsmanpass.gpx'.
# 
# --- Road Geometric Analysis: guardsmanpass.gpx ---
# Detected sharp/moderate curves (R < 200m): 135
# Left-hand turning distribution: 70
# Right-hand turning distribution: 65
# Minimum corner radius (tightest hairpin): 2.04 meters
# 
# --- Top 5 Tightest Hairpins / Curves ---
# 1. Radius: 2.04m | Direction: Left | Lat/Lon: 40.620587, -111.495800
# 2. Radius: 2.04m | Direction: Left | Lat/Lon: 40.620605, -111.495784
# 3. Radius: 2.29m | Direction: Left | Lat/Lon: 40.620597, -111.495796
# 4. Radius: 2.33m | Direction: Right | Lat/Lon: 40.620464, -111.495741
# 5. Radius: 2.71m | Direction: Right | Lat/Lon: 40.620569, -111.495601
# -------------------------------------------------------------------
# ###################################################################
# Analysis of predicted abnormal front tire wear on Utah roads
#  Moki Dugway, Shafer Canyon, Burr Trail & Guardsman Pass
# 
# The objective was to predict abnormal outside-front tire shoulder wear 
# resulting from downhill braking & steering-induced tire scrub on turns.
# 
# Two websites were used to obtain the GPX tracks:
#  <https://gpx.studio/>
#  <https://overpass-turbo.eu/>
# 
# The Python script will analyze the GPX tracks, calculating corner radii, 
# left/right turning distributions & the 5 tightest calculated hairpins.
# 
# I selected one downhill direction for each road wherever possible:
#  Moki Dugway: North to South, descending Cedar Mesa.
#  Shafer Canyon: Island in the Sky down to Potash Road.
#  Burr Trail: Boulder toward Bullfrog.
#  Guardsman Pass: From the pass toward Park City.
# 
# Summary of GPX Analysis
#  1. Moki Dugway
#      GPX points: 220
#      Sharp/moderate curve windows: 154
#      Left turns: 76
#      Right turns: 78
#      Minimum calculated radius: 5.89 meters
#     Assessment: 
#      Sustained downhill cornering with balanced tire loading.
#      Moki Dugway has a substantial number of tight switchbacks 
#      over a relatively short descent.
#      The left/right distribution is almost perfectly balanced 
#      (49.4% left / 50.6% right).
#      Consequently, the expected lateral loading is reasonably 
#      balanced between the two front tires, with a very slight 
#      theoretical bias toward the left front tire.
#      The 5.89-meter minimum calculated radius indicates a 
#      potentially tight corner, although the actual radius 
#      should be verified against the road geometry.
# 
# 2. Shafer Canyon Road
#     GPX points: 162
#     Sharp/moderate curve windows: 131
#     Left turns: 66
#     Right turns: 65
#     Minimum calculated radius: 3.97 meters
#    Assessment: 
#      Extremely demanding switchback geometry.
#      Shafer Canyon has the tightest reported minimum radius 
#      among the first three reasonably comparable measurements.
#      Its 1,500-foot descent through the sandstone cliffs 
#      makes it good test case for downhill braking and cornering.
#      The left/right distribution is virtually symmetrical 
#      (50.4% left / 49.6% right).
#      There is therefore no meaningful predicted preference 
#      for either front tire based on turn counts alone.
# 
# 3. Burr Trail
#     GPX points: 199
#     Sharp/moderate curve windows: 139
#     Left turns: 71
#     Right turns: 68
#     Minimum calculated radius: 4.70 meters
#    Assessment: 
#     Tight switchbacks with a slight right-front loading bias.
#     The Waterpocket Fold switchbacks provide a combination of 
#     steep grades and tight curves.
#     The turn distribution is balanced (51.1% left / 48.9% right).
#     There is a slight theoretical preference for right-front 
#     outside-shoulder loading because of the greater number 
#     of left-hand turns in the test direction. However, the 
#     difference is too small to suggest tire-wear asymmetry.
# 
# 4. Guardsman Pass
#     GPX points: 219
#     Sharp/moderate curve windows: 135
#     Left turns: 70
#     Right turns: 65
#     Minimum calculated radius: 2.04 meters
#    Assessment: 
#     Mountain-road cornering with a large peak-scrub component.
#     Guardsman Pass has the fewest curve windows proportionally 
#     among the four roads.
#     Its left/right distribution is slightly biased toward 
#     left-hand turns (51.9% left / 48.1% right).
#     This suggests a slight theoretical preference for 
#     outside-shoulder loading on the right-front tire.
# 
# Overall Comparison
#  The four roads share an interesting characteristic that the
#  left/right turning distributions are reasonably balanced.
# 
#  Consequently, none demonstrates a strong inherent preference 
#  for wearing one front tire more than the other based on 
#  turn direction alone.
# 
#  The principal differences are the number of calculated 
#  curves, steepness of descent and reported minimum corner radii.
# 
#  Shafer Canyon and Burr Trail have steep switchback sections.
#  Moki Dugway has sustained descending switchbacks. 
#  Guardsman Pass provides a paved mountain-road comparison.
# 
# Important Qualification
#  Actual outside-shoulder wear depends on tire pressure, 
#  alignment, suspension geometry, vehicle weight, braking, 
#  speed, road camber and driving style.
# #################################################################
-- 
Usenet works because knowledgeable people take the time to help others.
Technical Details
Message-ID: <11cqeff$1qcf$1@nnrp.usenet.blueworldhosting.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED.76.9.201.201!not-for-mail
References: <11cfe7i$2avf$1@nnrp.usenet.blueworldhosting.com> <11cficq$pl38$1@dont-email.me> <11cfveb$1q9l$1@nnrp.usenet.blueworldhosting.com> <11cn0f4$3bvd1$1@dont-email.me> <11cnsif$1pe0$1@nnrp.usenet.blueworldhosting.com> <11cpk4m$8465$1@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED.76.9.201.201!not-for-mail
From: Maria Sophia <mariasophia@comprehension.com>
Newsgroups: alt.comp.os.windows-10,comp.lang.python,rec.autos.tech,alt.satellite.gps
Subject: Re: Python analysis of abnormal front tire wear on windy US mountain roads
Date: Sun, 8 Nov 2026 14:19:27 -0400
Organization: BWH Usenet Archive (https://usenet.blueworldhosting.com)
Message-ID: <11cqeff$1qcf$1@nnrp.usenet.blueworldhosting.com>
References: <11cfe7i$2avf$1@nnrp.usenet.blueworldhosting.com> <11cficq$pl38$1@dont-email.me> <11cfveb$1q9l$1@nnrp.usenet.blueworldhosting.com> <11cn0f4$3bvd1$1@dont-email.me> <11cnsif$1pe0$1@nnrp.usenet.blueworldhosting.com> <11cpk4m$8465$1@dont-email.me>
Reply-To: pusvul@getTjewytR4so+mqe2.invalid
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sun, 8 Nov 2026 18:19:28 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com; posting-account="l//KxG3Ge2LojWvwJg0Igv8F0ChK8RUC9RtOxMPUo3U"; posting-host="OhqB1c7oZAXrKOFMYrGlri0PRDjptj/WneV52d5iUiE";
	logging-data="59791"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Mojibake v24p7
Cancel-Lock: sha1:XZHkojRyV/OdCELMPZPr49ZSUyg= sha256:rJTu11ePjM+CFm+nvV58Zb2l4iqMq84im0sz0mwZruk=
	sha1:kG2puMPpar1mk6V6cjCA5bJhGIc= sha256:Qfd57GrBGGQGHcA5YlmKelm8mBZEFAE3SgqanTFSvGI=
Content-Language: en-GB