geodetic 0.5.0 → 0.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -226,60 +226,60 @@ module Geodetic
226
226
  GH36.new(self, precision: precision)
227
227
  end
228
228
 
229
- def self.from_gh36(gh36_coord, datum = WGS84)
230
- gh36_coord.to_lla(datum)
229
+ def self.from_gh36(gh36, datum = WGS84)
230
+ gh36.to_lla(datum)
231
231
  end
232
232
 
233
233
  def to_gh(precision: 12)
234
234
  GH.new(self, precision: precision)
235
235
  end
236
236
 
237
- def self.from_gh(gh_coord, datum = WGS84)
238
- gh_coord.to_lla(datum)
237
+ def self.from_gh(gh, datum = WGS84)
238
+ gh.to_lla(datum)
239
239
  end
240
240
 
241
241
  def to_ham(precision: 6)
242
242
  HAM.new(self, precision: precision)
243
243
  end
244
244
 
245
- def self.from_ham(ham_coord, datum = WGS84)
246
- ham_coord.to_lla(datum)
245
+ def self.from_ham(ham, datum = WGS84)
246
+ ham.to_lla(datum)
247
247
  end
248
248
 
249
249
  def to_olc(precision: 10)
250
250
  OLC.new(self, precision: precision)
251
251
  end
252
252
 
253
- def self.from_olc(olc_coord, datum = WGS84)
254
- olc_coord.to_lla(datum)
253
+ def self.from_olc(olc, datum = WGS84)
254
+ olc.to_lla(datum)
255
255
  end
256
256
 
257
257
  def to_georef(precision: 8)
258
258
  GEOREF.new(self, precision: precision)
259
259
  end
260
260
 
261
- def self.from_georef(georef_coord, datum = WGS84)
262
- georef_coord.to_lla(datum)
261
+ def self.from_georef(georef, datum = WGS84)
262
+ georef.to_lla(datum)
263
263
  end
264
264
 
265
265
  def to_gars(precision: 7)
266
266
  GARS.new(self, precision: precision)
267
267
  end
268
268
 
269
- def self.from_gars(gars_coord, datum = WGS84)
270
- gars_coord.to_lla(datum)
269
+ def self.from_gars(gars, datum = WGS84)
270
+ gars.to_lla(datum)
271
271
  end
272
272
 
273
273
  def to_h3(precision: 7)
274
274
  H3.new(self, precision: precision)
275
275
  end
276
276
 
277
- def self.from_h3(h3_coord, datum = WGS84)
278
- h3_coord.to_lla(datum)
277
+ def self.from_h3(h3, datum = WGS84)
278
+ h3.to_lla(datum)
279
279
  end
280
280
 
281
- def self.from_lla(lla_coord, datum = WGS84)
282
- lla_coord
281
+ def self.from_lla(lla, datum = WGS84)
282
+ lla
283
283
  end
284
284
 
285
285
  def to_s(precision = 6)
@@ -55,24 +55,24 @@ module Geodetic
55
55
  UTM.new(easting: utm_easting, northing: utm_northing, zone: zone_number, hemisphere: hemisphere)
56
56
  end
57
57
 
58
- def self.from_utm(utm_coord, precision = 5)
58
+ def self.from_utm(utm, precision = 5)
59
59
  # Create instance to access instance methods
60
60
  temp_instance = new()
61
61
 
62
62
  # Get 100km square identifier
63
- square_id = temp_instance.utm_to_square(utm_coord.zone, utm_coord.easting, utm_coord.northing)
63
+ square_id = temp_instance.utm_to_square(utm.zone, utm.easting, utm.northing)
64
64
 
65
65
  # Calculate position within the 100km square
66
- square_easting = utm_coord.easting % 100000
67
- square_northing = utm_coord.northing % 100000
66
+ square_easting = utm.easting % 100000
67
+ square_northing = utm.northing % 100000
68
68
 
69
69
  # Create grid zone designator using hemisphere-aware band letter
70
- if utm_coord.hemisphere == 'N'
71
- zone_letter = get_zone_letter(utm_coord.northing)
70
+ if utm.hemisphere == 'N'
71
+ zone_letter = get_zone_letter(utm.northing)
72
72
  else
73
- zone_letter = get_zone_letter_south(utm_coord.northing)
73
+ zone_letter = get_zone_letter_south(utm.northing)
74
74
  end
75
- grid_zone = "#{utm_coord.zone}#{zone_letter}"
75
+ grid_zone = "#{utm.zone}#{zone_letter}"
76
76
 
77
77
  new(grid_zone: grid_zone, square_id: square_id, easting: square_easting, northing: square_northing, precision: precision)
78
78
  end
@@ -82,8 +82,8 @@ module Geodetic
82
82
  utm_coord.to_lla(datum)
83
83
  end
84
84
 
85
- def self.from_lla(lla_coord, datum = WGS84, precision = 5)
86
- utm_coord = UTM.from_lla(lla_coord, datum)
85
+ def self.from_lla(lla, datum = WGS84, precision = 5)
86
+ utm_coord = UTM.from_lla(lla, datum)
87
87
  from_utm(utm_coord, precision)
88
88
  end
89
89
 
@@ -91,8 +91,8 @@ module Geodetic
91
91
  to_lla(datum).to_ecef(datum)
92
92
  end
93
93
 
94
- def self.from_ecef(ecef_coord, datum = WGS84, precision = 5)
95
- lla_coord = ecef_coord.to_lla(datum)
94
+ def self.from_ecef(ecef, datum = WGS84, precision = 5)
95
+ lla_coord = ecef.to_lla(datum)
96
96
  from_lla(lla_coord, datum, precision)
97
97
  end
98
98
 
@@ -100,8 +100,8 @@ module Geodetic
100
100
  to_lla(datum).to_enu(reference_lla)
101
101
  end
102
102
 
103
- def self.from_enu(enu_coord, reference_lla, datum = WGS84, precision = 5)
104
- lla_coord = enu_coord.to_lla(reference_lla)
103
+ def self.from_enu(enu, reference_lla, datum = WGS84, precision = 5)
104
+ lla_coord = enu.to_lla(reference_lla)
105
105
  from_lla(lla_coord, datum, precision)
106
106
  end
107
107
 
@@ -109,8 +109,8 @@ module Geodetic
109
109
  to_lla(datum).to_ned(reference_lla)
110
110
  end
111
111
 
112
- def self.from_ned(ned_coord, reference_lla, datum = WGS84, precision = 5)
113
- lla_coord = ned_coord.to_lla(reference_lla)
112
+ def self.from_ned(ned, reference_lla, datum = WGS84, precision = 5)
113
+ lla_coord = ned.to_lla(reference_lla)
114
114
  from_lla(lla_coord, datum, precision)
115
115
  end
116
116
 
@@ -118,40 +118,40 @@ module Geodetic
118
118
  WebMercator.from_lla(to_lla(datum), datum)
119
119
  end
120
120
 
121
- def self.from_web_mercator(wm_coord, datum = WGS84, precision = 5)
122
- from_lla(wm_coord.to_lla(datum), datum, precision)
121
+ def self.from_web_mercator(web_mercator, datum = WGS84, precision = 5)
122
+ from_lla(web_mercator.to_lla(datum), datum, precision)
123
123
  end
124
124
 
125
125
  def to_ups(datum = WGS84)
126
126
  UPS.from_lla(to_lla(datum), datum)
127
127
  end
128
128
 
129
- def self.from_ups(ups_coord, datum = WGS84, precision = 5)
130
- from_lla(ups_coord.to_lla(datum), datum, precision)
129
+ def self.from_ups(ups, datum = WGS84, precision = 5)
130
+ from_lla(ups.to_lla(datum), datum, precision)
131
131
  end
132
132
 
133
133
  def to_usng
134
134
  USNG.from_mgrs(self)
135
135
  end
136
136
 
137
- def self.from_usng(usng_coord)
138
- usng_coord.to_mgrs
137
+ def self.from_usng(usng)
138
+ usng.to_mgrs
139
139
  end
140
140
 
141
141
  def to_state_plane(zone_code, datum = WGS84)
142
142
  StatePlane.from_lla(to_lla(datum), zone_code, datum)
143
143
  end
144
144
 
145
- def self.from_state_plane(sp_coord, datum = WGS84, precision = 5)
146
- from_lla(sp_coord.to_lla(datum), datum, precision)
145
+ def self.from_state_plane(state_plane, datum = WGS84, precision = 5)
146
+ from_lla(state_plane.to_lla(datum), datum, precision)
147
147
  end
148
148
 
149
149
  def to_bng(datum = WGS84)
150
150
  BNG.from_lla(to_lla(datum), datum)
151
151
  end
152
152
 
153
- def self.from_bng(bng_coord, datum = WGS84, precision = 5)
154
- from_lla(bng_coord.to_lla(datum), datum, precision)
153
+ def self.from_bng(bng, datum = WGS84, precision = 5)
154
+ from_lla(bng.to_lla(datum), datum, precision)
155
155
  end
156
156
 
157
157
  def ==(other)
@@ -89,8 +89,8 @@ module Geodetic
89
89
  MGRS.from_lla(to_lla(reference_lla), datum, precision)
90
90
  end
91
91
 
92
- def self.from_mgrs(mgrs_coord, reference_lla, datum = WGS84)
93
- lla = mgrs_coord.to_lla(datum)
92
+ def self.from_mgrs(mgrs, reference_lla, datum = WGS84)
93
+ lla = mgrs.to_lla(datum)
94
94
  from_lla(lla, reference_lla)
95
95
  end
96
96
 
@@ -98,8 +98,8 @@ module Geodetic
98
98
  USNG.from_lla(to_lla(reference_lla), datum, precision)
99
99
  end
100
100
 
101
- def self.from_usng(usng_coord, reference_lla, datum = WGS84)
102
- lla = usng_coord.to_lla(datum)
101
+ def self.from_usng(usng, reference_lla, datum = WGS84)
102
+ lla = usng.to_lla(datum)
103
103
  from_lla(lla, reference_lla)
104
104
  end
105
105
 
@@ -107,8 +107,8 @@ module Geodetic
107
107
  WebMercator.from_lla(to_lla(reference_lla), datum)
108
108
  end
109
109
 
110
- def self.from_web_mercator(wm_coord, reference_lla, datum = WGS84)
111
- lla = wm_coord.to_lla(datum)
110
+ def self.from_web_mercator(web_mercator, reference_lla, datum = WGS84)
111
+ lla = web_mercator.to_lla(datum)
112
112
  from_lla(lla, reference_lla)
113
113
  end
114
114
 
@@ -116,8 +116,8 @@ module Geodetic
116
116
  UPS.from_lla(to_lla(reference_lla), datum)
117
117
  end
118
118
 
119
- def self.from_ups(ups_coord, reference_lla, datum = WGS84)
120
- lla = ups_coord.to_lla(datum)
119
+ def self.from_ups(ups, reference_lla, datum = WGS84)
120
+ lla = ups.to_lla(datum)
121
121
  from_lla(lla, reference_lla)
122
122
  end
123
123
 
@@ -125,8 +125,8 @@ module Geodetic
125
125
  StatePlane.from_lla(to_lla(reference_lla), zone_code, datum)
126
126
  end
127
127
 
128
- def self.from_state_plane(sp_coord, reference_lla, datum = WGS84)
129
- lla = sp_coord.to_lla(datum)
128
+ def self.from_state_plane(state_plane, reference_lla, datum = WGS84)
129
+ lla = state_plane.to_lla(datum)
130
130
  from_lla(lla, reference_lla)
131
131
  end
132
132
 
@@ -134,8 +134,8 @@ module Geodetic
134
134
  BNG.from_lla(to_lla(reference_lla))
135
135
  end
136
136
 
137
- def self.from_bng(bng_coord, reference_lla)
138
- lla = bng_coord.to_lla
137
+ def self.from_bng(bng, reference_lla)
138
+ lla = bng.to_lla
139
139
  from_lla(lla, reference_lla)
140
140
  end
141
141
 
@@ -143,8 +143,8 @@ module Geodetic
143
143
  GH36.new(to_lla(reference_lla), precision: precision)
144
144
  end
145
145
 
146
- def self.from_gh36(gh36_coord, reference_lla)
147
- lla = gh36_coord.to_lla
146
+ def self.from_gh36(gh36, reference_lla)
147
+ lla = gh36.to_lla
148
148
  from_lla(lla, reference_lla)
149
149
  end
150
150
 
@@ -152,8 +152,8 @@ module Geodetic
152
152
  GH.new(to_lla(reference_lla), precision: precision)
153
153
  end
154
154
 
155
- def self.from_gh(gh_coord, reference_lla)
156
- lla = gh_coord.to_lla
155
+ def self.from_gh(gh, reference_lla)
156
+ lla = gh.to_lla
157
157
  from_lla(lla, reference_lla)
158
158
  end
159
159
 
@@ -161,8 +161,8 @@ module Geodetic
161
161
  HAM.new(to_lla(reference_lla), precision: precision)
162
162
  end
163
163
 
164
- def self.from_ham(ham_coord, reference_lla)
165
- lla = ham_coord.to_lla
164
+ def self.from_ham(ham, reference_lla)
165
+ lla = ham.to_lla
166
166
  from_lla(lla, reference_lla)
167
167
  end
168
168
 
@@ -170,8 +170,8 @@ module Geodetic
170
170
  OLC.new(to_lla(reference_lla), precision: precision)
171
171
  end
172
172
 
173
- def self.from_olc(olc_coord, reference_lla)
174
- lla = olc_coord.to_lla
173
+ def self.from_olc(olc, reference_lla)
174
+ lla = olc.to_lla
175
175
  from_lla(lla, reference_lla)
176
176
  end
177
177
 
@@ -179,8 +179,8 @@ module Geodetic
179
179
  GEOREF.new(to_lla(reference_lla), precision: precision)
180
180
  end
181
181
 
182
- def self.from_georef(georef_coord, reference_lla)
183
- lla = georef_coord.to_lla
182
+ def self.from_georef(georef, reference_lla)
183
+ lla = georef.to_lla
184
184
  from_lla(lla, reference_lla)
185
185
  end
186
186
 
@@ -188,8 +188,8 @@ module Geodetic
188
188
  GARS.new(to_lla(reference_lla), precision: precision)
189
189
  end
190
190
 
191
- def self.from_gars(gars_coord, reference_lla)
192
- lla = gars_coord.to_lla
191
+ def self.from_gars(gars, reference_lla)
192
+ lla = gars.to_lla
193
193
  from_lla(lla, reference_lla)
194
194
  end
195
195
 
@@ -197,8 +197,8 @@ module Geodetic
197
197
  H3.new(to_lla(reference_lla), precision: precision)
198
198
  end
199
199
 
200
- def self.from_h3(h3_coord, reference_lla)
201
- lla = h3_coord.to_lla
200
+ def self.from_h3(h3, reference_lla)
201
+ lla = h3.to_lla
202
202
  from_lla(lla, reference_lla)
203
203
  end
204
204
 
@@ -191,8 +191,8 @@ module Geodetic
191
191
  LLA.new(lat: lat, lng: lng, alt: 0.0)
192
192
  end
193
193
 
194
- def self.from_lla(lla_coord, datum = WGS84, precision = default_precision)
195
- new(lla_coord, precision: precision)
194
+ def self.from_lla(lla, datum = WGS84, precision = default_precision)
195
+ new(lla, precision: precision)
196
196
  end
197
197
 
198
198
  # --- Standard conversions (all chain through LLA) ---
@@ -201,24 +201,24 @@ module Geodetic
201
201
  to_lla(datum).to_ecef(datum)
202
202
  end
203
203
 
204
- def self.from_ecef(ecef_coord, datum = WGS84, precision = default_precision)
205
- new(ecef_coord, precision: precision)
204
+ def self.from_ecef(ecef, datum = WGS84, precision = default_precision)
205
+ new(ecef, precision: precision)
206
206
  end
207
207
 
208
208
  def to_utm(datum = WGS84)
209
209
  to_lla(datum).to_utm(datum)
210
210
  end
211
211
 
212
- def self.from_utm(utm_coord, datum = WGS84, precision = default_precision)
213
- new(utm_coord, precision: precision)
212
+ def self.from_utm(utm, datum = WGS84, precision = default_precision)
213
+ new(utm, precision: precision)
214
214
  end
215
215
 
216
216
  def to_enu(reference_lla, datum = WGS84)
217
217
  to_lla(datum).to_enu(reference_lla)
218
218
  end
219
219
 
220
- def self.from_enu(enu_coord, reference_lla, datum = WGS84, precision = default_precision)
221
- lla_coord = enu_coord.to_lla(reference_lla)
220
+ def self.from_enu(enu, reference_lla, datum = WGS84, precision = default_precision)
221
+ lla_coord = enu.to_lla(reference_lla)
222
222
  new(lla_coord, precision: precision)
223
223
  end
224
224
 
@@ -226,8 +226,8 @@ module Geodetic
226
226
  to_lla(datum).to_ned(reference_lla)
227
227
  end
228
228
 
229
- def self.from_ned(ned_coord, reference_lla, datum = WGS84, precision = default_precision)
230
- lla_coord = ned_coord.to_lla(reference_lla)
229
+ def self.from_ned(ned, reference_lla, datum = WGS84, precision = default_precision)
230
+ lla_coord = ned.to_lla(reference_lla)
231
231
  new(lla_coord, precision: precision)
232
232
  end
233
233
 
@@ -235,48 +235,48 @@ module Geodetic
235
235
  MGRS.from_lla(to_lla(datum), datum, mgrs_precision)
236
236
  end
237
237
 
238
- def self.from_mgrs(mgrs_coord, datum = WGS84, precision = default_precision)
239
- new(mgrs_coord, precision: precision)
238
+ def self.from_mgrs(mgrs, datum = WGS84, precision = default_precision)
239
+ new(mgrs, precision: precision)
240
240
  end
241
241
 
242
242
  def to_usng(datum = WGS84, usng_precision = 5)
243
243
  USNG.from_lla(to_lla(datum), datum, usng_precision)
244
244
  end
245
245
 
246
- def self.from_usng(usng_coord, datum = WGS84, precision = default_precision)
247
- new(usng_coord, precision: precision)
246
+ def self.from_usng(usng, datum = WGS84, precision = default_precision)
247
+ new(usng, precision: precision)
248
248
  end
249
249
 
250
250
  def to_web_mercator(datum = WGS84)
251
251
  WebMercator.from_lla(to_lla(datum), datum)
252
252
  end
253
253
 
254
- def self.from_web_mercator(wm_coord, datum = WGS84, precision = default_precision)
255
- new(wm_coord, precision: precision)
254
+ def self.from_web_mercator(web_mercator, datum = WGS84, precision = default_precision)
255
+ new(web_mercator, precision: precision)
256
256
  end
257
257
 
258
258
  def to_ups(datum = WGS84)
259
259
  UPS.from_lla(to_lla(datum), datum)
260
260
  end
261
261
 
262
- def self.from_ups(ups_coord, datum = WGS84, precision = default_precision)
263
- new(ups_coord, precision: precision)
262
+ def self.from_ups(ups, datum = WGS84, precision = default_precision)
263
+ new(ups, precision: precision)
264
264
  end
265
265
 
266
266
  def to_state_plane(zone_code, datum = WGS84)
267
267
  StatePlane.from_lla(to_lla(datum), zone_code, datum)
268
268
  end
269
269
 
270
- def self.from_state_plane(sp_coord, datum = WGS84, precision = default_precision)
271
- new(sp_coord, precision: precision)
270
+ def self.from_state_plane(state_plane, datum = WGS84, precision = default_precision)
271
+ new(state_plane, precision: precision)
272
272
  end
273
273
 
274
274
  def to_bng(datum = WGS84)
275
275
  BNG.from_lla(to_lla(datum), datum)
276
276
  end
277
277
 
278
- def self.from_bng(bng_coord, datum = WGS84, precision = default_precision)
279
- new(bng_coord, precision: precision)
278
+ def self.from_bng(bng, datum = WGS84, precision = default_precision)
279
+ new(bng, precision: precision)
280
280
  end
281
281
 
282
282
  # --- Equality and utility ---
@@ -156,15 +156,15 @@ module Geodetic
156
156
  end
157
157
  end
158
158
 
159
- def self.from_lla(lla_coord, zone_code, datum = WGS84)
159
+ def self.from_lla(lla, zone_code, datum = WGS84)
160
160
  zone_info = ZONES[zone_code.to_s.upcase]
161
161
  raise ArgumentError, "Unknown zone: #{zone_code}" unless zone_info
162
162
 
163
163
  case zone_info[:projection]
164
164
  when 'lambert_conformal_conic'
165
- from_lla_lambert_conformal_conic(lla_coord, zone_code, zone_info, datum)
165
+ from_lla_lambert_conformal_conic(lla, zone_code, zone_info, datum)
166
166
  when 'transverse_mercator'
167
- from_lla_transverse_mercator(lla_coord, zone_code, zone_info, datum)
167
+ from_lla_transverse_mercator(lla, zone_code, zone_info, datum)
168
168
  else
169
169
  raise ArgumentError, "Unsupported projection: #{zone_info[:projection]}"
170
170
  end
@@ -174,8 +174,8 @@ module Geodetic
174
174
  to_lla(datum).to_ecef(datum || @datum)
175
175
  end
176
176
 
177
- def self.from_ecef(ecef_coord, zone_code, datum = WGS84)
178
- lla_coord = ecef_coord.to_lla(datum)
177
+ def self.from_ecef(ecef, zone_code, datum = WGS84)
178
+ lla_coord = ecef.to_lla(datum)
179
179
  from_lla(lla_coord, zone_code, datum)
180
180
  end
181
181
 
@@ -183,8 +183,8 @@ module Geodetic
183
183
  to_lla(datum).to_utm(datum || @datum)
184
184
  end
185
185
 
186
- def self.from_utm(utm_coord, zone_code, datum = WGS84)
187
- lla_coord = utm_coord.to_lla(datum)
186
+ def self.from_utm(utm, zone_code, datum = WGS84)
187
+ lla_coord = utm.to_lla(datum)
188
188
  from_lla(lla_coord, zone_code, datum)
189
189
  end
190
190
 
@@ -192,8 +192,8 @@ module Geodetic
192
192
  to_lla(datum).to_enu(reference_lla)
193
193
  end
194
194
 
195
- def self.from_enu(enu_coord, reference_lla, zone_code, datum = WGS84)
196
- lla_coord = enu_coord.to_lla(reference_lla)
195
+ def self.from_enu(enu, reference_lla, zone_code, datum = WGS84)
196
+ lla_coord = enu.to_lla(reference_lla)
197
197
  from_lla(lla_coord, zone_code, datum)
198
198
  end
199
199
 
@@ -201,8 +201,8 @@ module Geodetic
201
201
  to_lla(datum).to_ned(reference_lla)
202
202
  end
203
203
 
204
- def self.from_ned(ned_coord, reference_lla, zone_code, datum = WGS84)
205
- lla_coord = ned_coord.to_lla(reference_lla)
204
+ def self.from_ned(ned, reference_lla, zone_code, datum = WGS84)
205
+ lla_coord = ned.to_lla(reference_lla)
206
206
  from_lla(lla_coord, zone_code, datum)
207
207
  end
208
208
 
@@ -210,8 +210,8 @@ module Geodetic
210
210
  MGRS.from_lla(to_lla(datum), datum || @datum, precision)
211
211
  end
212
212
 
213
- def self.from_mgrs(mgrs_coord, zone_code, datum = WGS84)
214
- lla_coord = mgrs_coord.to_lla(datum)
213
+ def self.from_mgrs(mgrs, zone_code, datum = WGS84)
214
+ lla_coord = mgrs.to_lla(datum)
215
215
  from_lla(lla_coord, zone_code, datum)
216
216
  end
217
217
 
@@ -219,8 +219,8 @@ module Geodetic
219
219
  USNG.from_lla(to_lla(datum), datum || @datum, precision)
220
220
  end
221
221
 
222
- def self.from_usng(usng_coord, zone_code, datum = WGS84)
223
- lla_coord = usng_coord.to_lla(datum)
222
+ def self.from_usng(usng, zone_code, datum = WGS84)
223
+ lla_coord = usng.to_lla(datum)
224
224
  from_lla(lla_coord, zone_code, datum)
225
225
  end
226
226
 
@@ -228,8 +228,8 @@ module Geodetic
228
228
  WebMercator.from_lla(to_lla(datum), datum || @datum)
229
229
  end
230
230
 
231
- def self.from_web_mercator(web_mercator_coord, zone_code, datum = WGS84)
232
- lla_coord = web_mercator_coord.to_lla(datum)
231
+ def self.from_web_mercator(web_mercator, zone_code, datum = WGS84)
232
+ lla_coord = web_mercator.to_lla(datum)
233
233
  from_lla(lla_coord, zone_code, datum)
234
234
  end
235
235
 
@@ -237,8 +237,8 @@ module Geodetic
237
237
  UPS.from_lla(to_lla(datum), datum || @datum)
238
238
  end
239
239
 
240
- def self.from_ups(ups_coord, zone_code, datum = WGS84)
241
- lla_coord = ups_coord.to_lla(datum)
240
+ def self.from_ups(ups, zone_code, datum = WGS84)
241
+ lla_coord = ups.to_lla(datum)
242
242
  from_lla(lla_coord, zone_code, datum)
243
243
  end
244
244
 
@@ -246,8 +246,8 @@ module Geodetic
246
246
  BNG.from_lla(to_lla(datum), datum || @datum)
247
247
  end
248
248
 
249
- def self.from_bng(bng_coord, zone_code, datum = WGS84)
250
- lla_coord = bng_coord.to_lla(datum)
249
+ def self.from_bng(bng, zone_code, datum = WGS84)
250
+ lla_coord = bng.to_lla(datum)
251
251
  from_lla(lla_coord, zone_code, datum)
252
252
  end
253
253
 
@@ -255,8 +255,8 @@ module Geodetic
255
255
  GH36.new(to_lla(datum), precision: precision)
256
256
  end
257
257
 
258
- def self.from_gh36(gh36_coord, zone_code, datum = WGS84)
259
- lla_coord = gh36_coord.to_lla(datum)
258
+ def self.from_gh36(gh36, zone_code, datum = WGS84)
259
+ lla_coord = gh36.to_lla(datum)
260
260
  from_lla(lla_coord, zone_code, datum)
261
261
  end
262
262
 
@@ -264,8 +264,8 @@ module Geodetic
264
264
  GH.new(to_lla(datum), precision: precision)
265
265
  end
266
266
 
267
- def self.from_gh(gh_coord, zone_code, datum = WGS84)
268
- lla_coord = gh_coord.to_lla(datum)
267
+ def self.from_gh(gh, zone_code, datum = WGS84)
268
+ lla_coord = gh.to_lla(datum)
269
269
  from_lla(lla_coord, zone_code, datum)
270
270
  end
271
271
 
@@ -273,8 +273,8 @@ module Geodetic
273
273
  HAM.new(to_lla(datum), precision: precision)
274
274
  end
275
275
 
276
- def self.from_ham(ham_coord, zone_code, datum = WGS84)
277
- lla_coord = ham_coord.to_lla(datum)
276
+ def self.from_ham(ham, zone_code, datum = WGS84)
277
+ lla_coord = ham.to_lla(datum)
278
278
  from_lla(lla_coord, zone_code, datum)
279
279
  end
280
280
 
@@ -282,8 +282,8 @@ module Geodetic
282
282
  OLC.new(to_lla(datum), precision: precision)
283
283
  end
284
284
 
285
- def self.from_olc(olc_coord, zone_code, datum = WGS84)
286
- lla_coord = olc_coord.to_lla(datum)
285
+ def self.from_olc(olc, zone_code, datum = WGS84)
286
+ lla_coord = olc.to_lla(datum)
287
287
  from_lla(lla_coord, zone_code, datum)
288
288
  end
289
289
 
@@ -291,8 +291,8 @@ module Geodetic
291
291
  GEOREF.new(to_lla(datum), precision: precision)
292
292
  end
293
293
 
294
- def self.from_georef(georef_coord, zone_code, datum = WGS84)
295
- lla_coord = georef_coord.to_lla(datum)
294
+ def self.from_georef(georef, zone_code, datum = WGS84)
295
+ lla_coord = georef.to_lla(datum)
296
296
  from_lla(lla_coord, zone_code, datum)
297
297
  end
298
298
 
@@ -300,8 +300,8 @@ module Geodetic
300
300
  GARS.new(to_lla(datum), precision: precision)
301
301
  end
302
302
 
303
- def self.from_gars(gars_coord, zone_code, datum = WGS84)
304
- lla_coord = gars_coord.to_lla(datum)
303
+ def self.from_gars(gars, zone_code, datum = WGS84)
304
+ lla_coord = gars.to_lla(datum)
305
305
  from_lla(lla_coord, zone_code, datum)
306
306
  end
307
307
 
@@ -309,8 +309,8 @@ module Geodetic
309
309
  H3.new(to_lla(datum), precision: precision)
310
310
  end
311
311
 
312
- def self.from_h3(h3_coord, zone_code, datum = WGS84)
313
- lla_coord = h3_coord.to_lla(datum)
312
+ def self.from_h3(h3, zone_code, datum = WGS84)
313
+ lla_coord = h3.to_lla(datum)
314
314
  from_lla(lla_coord, zone_code, datum)
315
315
  end
316
316
 
@@ -359,7 +359,7 @@ module Geodetic
359
359
  end
360
360
 
361
361
  # Find appropriate zone for a given LLA coordinate
362
- def self.find_zone_for_lla(lla_coord, state_name = nil)
362
+ def self.find_zone_for_lla(lla, state_name = nil)
363
363
  # This is a simplified version - real implementation would use precise zone boundaries
364
364
  candidate_zones = state_name ? zones_for_state(state_name) : ZONES
365
365
 
@@ -448,10 +448,10 @@ module Geodetic
448
448
  LLA.new(lat: lat, lng: lng, alt: 0.0)
449
449
  end
450
450
 
451
- def self.from_lla_lambert_conformal_conic(lla_coord, zone_code, zone_info, datum)
451
+ def self.from_lla_lambert_conformal_conic(lla, zone_code, zone_info, datum)
452
452
  # Lambert Conformal Conic forward projection (simplified)
453
- lat = lla_coord.lat * RAD_PER_DEG
454
- lng = lla_coord.lng * RAD_PER_DEG
453
+ lat = lla.lat * RAD_PER_DEG
454
+ lng = lla.lng * RAD_PER_DEG
455
455
 
456
456
  lat0_rad = zone_info[:latitude_of_origin] * RAD_PER_DEG
457
457
  lon0_rad = zone_info[:central_meridian] * RAD_PER_DEG
@@ -474,10 +474,10 @@ module Geodetic
474
474
  new(easting: x, northing: y, zone_code: zone_code, datum: datum)
475
475
  end
476
476
 
477
- def self.from_lla_transverse_mercator(lla_coord, zone_code, zone_info, datum)
477
+ def self.from_lla_transverse_mercator(lla, zone_code, zone_info, datum)
478
478
  # Transverse Mercator forward projection (simplified)
479
- lat = lla_coord.lat * RAD_PER_DEG
480
- lng = lla_coord.lng * RAD_PER_DEG
479
+ lat = lla.lat * RAD_PER_DEG
480
+ lng = lla.lng * RAD_PER_DEG
481
481
 
482
482
  lat0_rad = zone_info[:latitude_of_origin] * RAD_PER_DEG
483
483
  lon0_rad = zone_info[:central_meridian] * RAD_PER_DEG