Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gearhead

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gearhead

JavaScript's functional programming helper library for automotive engineering.

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

gearhead.js

npm version Build Status

Common automotive math calculations.

Installation

npm install gearhead

Usage

var gearhead = require('gearhead');

Methods

.horsepower(torque, rpms)

Calculate horsepower based on torque and revs per minute.

.horsepower(cylindarPressure, bore, stroke, cylindarCount)

Calculate horsepower based on cylinder pressure (psi), bore, stroke, and number of cylinders.

.torque(horsepower, rpms)

Calculate torque based on horsepower and revs per minute.

.revsPerMinute(horsepower, torque)

Alias: .rpms(horsepower, torque)

Calculate revs per minute based on horsepower and torque.

.displacement(bore, stroke, cylinderCount)

Calculate engine displacement based on bore, stroke, and number of cylinders.

.bore(stroke, displacement, cylinderCount)

Calculate bore based on displacement, stroke, and number of cylinders.

.stroke(bore, displacement, cylinderCount)

Calculate stroke based on displacement, bore, and number of cylinders.

.cylinders(bore, stroke, displacement)

Calculate number of cylinders based on displacement, bore, and stroke.

.assembledDeckHeight(blockHeight, stroke, rodLength, pinHeight)

Alias: .adh(blockHeight, stroke, rodLength, pinHeight)

Calculate the fully assembled deck height based on the block height, stroke, rod length, and pin height.

.boreStrokeRatio(bore, stroke)

Bore/stroke ratio. Always returns a decimal precision of 2.

.rodStrokeRatio(rodLength, stroke)

Rod length/stroke ratio. Always returns a decimal precision of 2.

.compressionRatio(cylindarVolume, chamberVolume)

Compression ratio. Always returns a decimal precision of 2.

.airCapacity(displacement, rpms)

Calculate the air capacity of a cylinder.

.airFlow(airCapacity, boost[, atmosphere = 14.7])

Calculate the maximum air flow in CFM. The atmosphere defaults to sea level which is 14.7.

Tests

$ npm test

License

MIT © Blain Smith

FAQs

Package last updated on 30 Dec 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc