Skip to content

A TypeScript library for handling FRC scouting data from robotics tournaments

License

Notifications You must be signed in to change notification settings

BREAD5940/frc-scouting

Repository files navigation

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.

About

A TypeScript library for handling FRC scouting data from robotics tournaments

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

 
 
 

Languages