0.6.0 • Published 2 years ago

frc-scouting v0.6.0

Weekly downloads
1
License
Apache-2.0
Repository
github
Last release
2 years ago

frc-scouting

tests coverage npm version

A TypeScript library for handling FRC scouting data from robotics tournaments.

Currently, it supports Deep Space, Infinite Recharge, and Rapid React (only on the SQLite backend).

Example

import {SQLBackend, DeepSpace, Team} from 'frc-scouting';

const cargo = new DeepSpace.CargoTracker({
    DROPPED: {autonomous: 0, teleop: 1},
    SHIP: {autonomous: 1, teleop: 3},
    ROCKET: {autonomous: 2, teleop: 3},
});

const myScoutedMatch = new DeepSpace.DeepSpaceMatch(
    5940, 'match', 1, 'RED', {
        initialHABLevel: 1,
        cargo,
        finalHABLevel: 3,
        bonusPoints: 12
    },
);

console.log(myScoutedMatch.points); // 48

const myTeam = new Team(5940);
myTeam.addMatches(myScoutedMatch);

console.log(myTeam.getMean('points')); // 48

const sqlPlan = new DeepSpace.DeepSpaceSQL(':memory:');
const storage = new SQLBackend(sqlPlan);
storage.saveTeam(myTeam);

const myTeamLoaded = storage.getTeam(5940);
console.log(myTeamLoaded?.getMean('points')); // 48

Documentation

More detailed documentation can found here.

0.5.0

2 years ago

0.6.0

2 years ago

0.4.1

2 years ago

0.4.0

2 years ago

0.4.3

2 years ago

0.4.2

2 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago