Questions tagged [unit-conversion]

Unit conversion is the process of applying an arithmetic transformation (usually multiplying/dividing or adding/subtracting) using a conversion factor to convert one textual representation of a quantity, based on one unit, to another.

Unit conversion is the process of applying an arithmetic transformation (usually multiplying/dividing or adding/subtracting) using a conversion factor to convert one textual representation of a quantity, based on one unit, to another.

Dimensional analysis is a related process that can assist in identifying the conversion(s) to be performed.

91 questions
24
votes
4 answers

How to display /proc/meminfo in Megabytes?

I want to thank you for helping me my related issue. I know if I do a cat /proc/meminfo it will only display in kB. How can I display in MB? I really want to use cat or awk for this please.
javanoob17
  • 243
  • 1
  • 3
  • 10
24
votes
15 answers

Convert DD (decimal degrees) to DMS (degrees minutes seconds) in Python?

How do you convert Decimal Degrees to Degrees Minutes Seconds In Python? Is there a Formula already written?
David
  • 241
  • 1
  • 2
  • 4
20
votes
1 answer

PDFBox converting inches or centimeters into the coordinate system

I am new to PDFBox (and PDF generation) and I am having difficulties generating my own PDF. I do have text with certain coordinates in inches/centimeters and I need to convert them to the units PDFBox uses. Any suggestions/utilities than can do this…
Robby F
  • 397
  • 1
  • 2
  • 13
16
votes
7 answers

.NET units class, inches to millimeters

Does .NET has Units conversion class? I need to convert inches to millimeters and vise versa.
Tomas
  • 17,551
  • 43
  • 152
  • 257
10
votes
2 answers

Handling literal zero in unit-safe code

With a very few exceptions (looking at you, Fahrenheit and Celsius temperature scales), units are linear, and the value zero is simultaneously the additive identity for all units at once. So given auto speed = dimensioned(20, _meter/_second); auto…
Ben Voigt
  • 277,958
  • 43
  • 419
  • 720
8
votes
1 answer

Concept of different systems of measurement in Django project

I would like to implement different systems of measurement in my Django project, so that users can choose wether they want to use metric or imperial units. However, I don't know what is the correct approach to do this. Currently my models don't have…
Kaspars B.
  • 362
  • 2
  • 10
5
votes
2 answers

convert MB to GB, is google unit converter wrong?

I use google search engine for all my unit conversions, and now being working on some cloud pricing, I wanted to calculate how many GB would 250,000MB do, and type "kilobyte to byte" in google. The problem I have is that the google tool gave me…
WKx
  • 401
  • 4
  • 15
5
votes
1 answer

Symmetric and transitive custom unit conversion in Perl

I've defined the following custom units (psuedo-code): unix_days = unix_seconds/86400; nasa_seconds = unix_seconds - 946728000; This lets me directly convert unix_seconds to unix_days or convert unix_seconds to nasa_seconds. However, I can't…
user354134
5
votes
1 answer

Unit converting design pattern in C#

I need to make conversions between units, each unit has 2 parts, its name and an integer, the integer part can be either positive or negative. I need my Unit class to have dependency injection and be loosely coupled. For example if I need to add…
3
votes
5 answers

Convert character vector of height in inches to cm?

I am given a character vector: tibble(H = c("6'2\"", "5'10\"", "5'5\"", "5'1\"", "5'5\"", "5'4\"")) and I want to convert it to be in cm. Please advise how can I do this?
SteveS
  • 3,789
  • 5
  • 30
  • 64
3
votes
3 answers

Solar energy conversion w/m^2 to mj/m^2

i am new here, I am using MERRA monthly solar radiation data. I want to convert w/M^2 to MJ/m^2 I am bit confused, how to convert solar radiation monthly average data W/m^2 to MJ/m^2 so far i understood by reading different sources, Firstly i have…
SWAT
  • 59
  • 1
  • 1
  • 4
3
votes
2 answers

Standard Django / python unit conversion package

I've been googling around and looking for a standard way to handle unit conversion (weight, distance, etc..) in Python / Django. Since it is a very common problem, I'm afraid that I've not been able to find the proper package. (Found several…
dhontecillas
  • 103
  • 5
3
votes
1 answer

Convert from pixels to em

I watched a really good tutorial about bombproof webdesign from Tutsplus the other day. The instructor had an awesome function that was made in Stylus. $base_font_size = 16 $base_font_size_ems = unit($base_font_size / 16, em) $px = unit(1 /…
Jonas Bröms
  • 53
  • 1
  • 5
3
votes
2 answers

Converting a String or base10 to a base 2 in VB

I am looking for a way to take a value from a text box and convert it into a base 2 number with 8 digits.So if they type in a text box 2 it would respond 00000010. or if they typed 255 11111111. etc... is there any way to do this. Dim prVal As…
user2569803
  • 637
  • 6
  • 11
  • 19
3
votes
3 answers

javascript engineering input library

I'm writing a web based front end for an engineering simulation. The back end only accepts values in non-prefixed SI units, such as meters or watts. However it would be preferable to allow the user to enter values in any unit they wish. For…
charliehorse55
  • 1,940
  • 5
  • 24
  • 38
1
2 3 4 5 6 7