Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python
- # -*- coding: utf-8 -*-
- # vim:fenc=utf-8
- #
- # Copyright © 2015 Michael Cook <mcook@mackal.net>
- #
- # Distributed under terms of the MIT license.
- """
- """
- import sys
- pmax = int(sys.argv[1])
- pmin = int(sys.argv[2])
- shielding = 35 # set this
- dbdiv = (100 - shielding) / 100.0
- di = (pmax - pmin) / 19.0
- dbshielding = pmin - di
- db = dbshielding / dbdiv
- nmax = db + di * 20
- nmin = db + di
- print "DI = ({} - {}) / 19 = {}".format(pmax, pmin, di)
- print "DB * {} = {} - {} = {}".format(dbdiv, pmin, di, dbshielding)
- print "DB = {} / {} = {}".format(dbdiv, dbshielding, db)
- print "max = {} + {} * 20 = {}".format(db, di, nmax)
- print "min = {} + {} * 1 = {}".format(db, di, nmin)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement