Provides parsing of iRacing's .ibt
telemtry files. It's based on the excellent javascript library ibt-telemetry.
Add the following to your Cargo.toml
:
toml
[dependencies]
telem = "0.1.1"
Pass in a file or anything that implements Read + Seek
and you can access header information as well as weeknd_info
and the samples that contain the most interesting information.
```rust
let file = File::open("./sting.ibt").unwrap();
let mut reader = IbtReader::new(Box::new(file));
asserteq!(reader.header.tickrate, 60);
let weekendinfo = &reader.sessioninfo.weekendinfo; asserteq!(weekendinfo.trackname, "spielberg gp");
let rpm = reader.findvar("RPM".tostring()).unwrap();
let samples: Vec
asserteq!(samples.len(), 3371); let firstsample = samples[1001].getbyheader(&rpm).unwrap(); asserteq!(firstsample, SampleValue::Float32(991.8974)); ```