253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
|
# File 'lib/ephem/excerpt.rb', line 253
def setup_formats(nd, ni)
@nd = nd
@ni = ni
double_size = 8
int_size = 4
if @endianness == :little
@double_format = "E"
@int_format = "l"
else
@double_format = "G"
@int_format = "l>"
end
@summary_control_format =
"#{@double_format}#{@double_format}#{@double_format}"
@summary_format = @double_format.to_s * @nd + @int_format.to_s * @ni
@summary_length = double_size * @nd + int_size * @ni
@summary_step = @summary_length + (-@summary_length % 8)
@summaries_per_record = (RECORD_SIZE - 8 * 3) / @summary_step
end
|