Thursday, November 12, 2020

Planets moving in the sky

Earth's spin obviously causes planets to rise in the east and set in the west, just like all other astronomical bodies. However, when tracking their positions month after month at the same time of night, the reason for their movement is not so obvious.

If going by sidereal time (star time) the planets (excluding Mercury/Venus) actually move west to east because that's the direction of orbit (CCW when viewed from overhead.) Sidereal time is the actual time of Earth's spin. The difference between sidereal and 'regular' time is accounted for by the fact that the Sun and Earth move relative to each other (Earth's orbit) so the Earth has to make a full spin and then some to put the Sun back to the same point in the sky, because the Sun moved a bit, so it takes longer.

Going by 'regular' time (Sun time) straight up at midnight at a specific Earth longitude points to a different direction depending when in the year it is (30deg/month), unlike sidereal time. This very fact makes it confusing about how things move relative to each other, which is why astronomers use sidereal time rather than 'regular' time. Going by regular time gives the appearance that planets orbit CW rather than CCW (Mars and beyond don't orbit as fast as 30deg/month.)

Tuesday, August 25, 2020

Secure election system

This system can be used to counter-act potential corruption with the voting system.

-Every voter gets a 'carbon copy' of their votes.

-Every ballot is given an ID, and is identifiable on the state database by that ID.

-To ensure uniqueness of each database entry, each voter creates an auxiliary ID when voting. When looking at the state database their votes and chosen auxiliary ID shall match their carbon copy. This prevents a corrupt database system from giving many people the same ID but only counting one of them.

-State database file shall be accessible to all. A checksum can be used to ensure that everyone is looking at a legitimate copy.

-No personal identifiable information shall be on the State database. To further ensure integrity vote count by district shall be checked to reduce the potential of fake voting entries being added.


Wednesday, June 17, 2020

Traveling in blowing tunnels instead of vacuum tunnels


Not sure if this idea originated with the Boring Company or not
https://www.youtube.com/watch?v=iRi0bL484J0&t=10m40s

Blowers make alot of sense. Instead of vacuum tubes (where people can't breath in) push cars through with wind. No air friction because you're moving with the wind, not against. Not as noisy and one can ride with the top down in a convertible. Air doesn't become stale either with a constant renewal of oxygen rich air. If fact cars could put up a sail in the back for the air to push on. Not a sail made of fabric, more like one made of sheet metal. 

Saturday, October 19, 2019

Generic loops for all scenarios

'for loops', 'while loops', and 'do while loops' are all specific cases of generic loops. Why not just have a generic loop structure that can be customized? while(true) loops can be used as generic loops.

-The crux of all loops is an implicit 'continue' statement at the end, and a way to escape.
-At any time you can branch to the top using 'continue'
-At any time you can branch out of the loop using 'break'

For readability:
-comment at the top of the loop what is going on with the loop, which should be done anyways.
-highlight branches so they stand out with a label left justified, like this (it would be nice if IDEs did something like this automatically)

while(true)
{
               stuff;
/*con*/   stuff; if(stuff){continue;}
               stuff;
/*brk*/   stuff; if(stuff){break;}
               stuff;
}

I find generic loops to be more readable than for-loops as you see exactly where an increment occurs and exactly where break check or a continue check occur.

Breaking out of outer loops

There should also be a way to continue and break in reference to an outer loop from within an inner loop, avoiding having to use a variable flag to pass this info between the 2 loops, or having to use a 'goto' statement which many want to avoid the like the plague. For example:

while(true)
{
       /*continue 2 goes here*/
       stuff;
       while(true)
       {
               stuff;
/*con2*/ if(stuff){continue 2;}
               stuff;
/*brk2*/  if(stuff){break 2;}
               stuff;
       }
       stuff;
}
/*break 2 goes here*/

Easy to replace For and Do While loops

//for loop equivalency
i=0;while(1)
{
        if (i>10) {break;}
        //do stuff
        i+=1;
}

//do while equivalency
while(1)
{
       //do stuff
       if (something is true) {break;}
}

//while equivalency (simply moves the check to the first line)
while(1)
{
       if(something is true){break;}
       //do stuff
}

//if equivalency
while(whatever)
{
    stuff;
    break;
}

Saturday, August 31, 2019

Proposed Metric Calendar part 2

(continuation of this post: http://www.polarjetstream.com/2017/07/proposed-metric-calandar.html )

Ways to identify the day in Metric:

-Year, doy (day of year)
-Year, month, dom (day of month)
-Year, woy (week of year) (woy 1.0 = doy 10, woy 2.2 = doy 22)

Possible work and off days using a metric week.

Gregorian

71%: 5 work days, 2 off days

Metric

80%: 8 works days then 2 off days OR 4 work days then 1 off day then 4 work days then 1 off day
70%: 7 work days then 3 off days OR 4 work days then 2 off days then 3 work days then 1 off day (not symmetrical)
60%:  6 work days then 4 off days OR 3 work days then 2 off days then 3 work days then 2 off days

I'd prefer 3 ON 2 OFF 3 ON 2 OFF
-5 to 8 contiguous work days seems excessive
-4 contiguous works days seems OK, but the corresponding 1 off day seems insufficient.

One way to look at it is splitting the week into 2 mini weeks
1st half: OFF ON ON ON OFF, 2nd half: OFF ON ON ON OFF

2 other ways (shifted)
1st half: OFF OFF ON ON ON 2nd half: OFF OFF ON ON ON
1st half: ON ON ON OFF OFF 2nd half:  ON ON ON OFF OFF

Holidays

Gregorian Oct 31 (Halloween) occurs mid week of the first week of Metric November. I suppose holidays could continue to be held in terms of Gregorian and translated (via doy) to Metric, instead of converted (last day of Metric Oct is Gregorian Oct 26/27.)

Adoption

Replacing the Gregorian system any time soon doesn't seem likely. However with dynamically generated calendars using computers having multiple calendar system being used in parallel seems reasonable. Year and day of year (doy) remains the same between the 2 systems for easy translations, so year/doy would be a good way to note dates. Both year and doy are based on Earth (spin around it's own axis and rotate around the Sun.)

Friday, August 30, 2019

A better way to display nested code blocks

Admittedly this takes alot of lines (13 lines):

i=0;while(i<x)
{
j=0;while(j<y)
{
k=0;while(k<z)
{
//code here
k+=1;
}
j+=1;
}
i+=1
}

However, it is much easier to read than the 'industry standard' method of putting opening braces at the end of lines (10 lines):

i=0;while(i<x) {
j=0;while(j<y) {
k=0;while(k<z) {
//code here
k+=1;
}
j+=1;
}
i+=1
}

What would be nice is to write it either way you want, but when the cursor isn't nearby, display it like this (7 lines):

i=0;while(i<x)
j=0;while(j<y)
k=0;while(k<z)
//code here
k+=1;
j+=1;
i+=1

Easy to read AND doesn't take alot of lines!

\u259B = ▛
\u2599 = ▙

UPDATE:

Better yet, don't just display it that way when the cursor isn't nearby, but also write it this way.
▛ indicates exactly where the code block begins
 ▙ indicates that the code block ends at the next carriage return encountered



Thursday, August 22, 2019

Floating point numbers core concept

The core concept of floating point numbers is that you take a magnitude (base^exponent) and add it to a fractional of the same magnitude to come up with a resulting number. When coming up with the appropriate magnitude, you choose the highest magnitude you can without exceeding the resulting number. Note that adding a magnitude to itself results in the next higher magnitude, so this covers everything between the 2 magnitude levels.

Some example base 10 magnitudes:
10^-3 = 0.001
10^-2 = 0.01
10^-1 = 0.1
10^0 = 1
10^1 = 10
10^2 = 100
10^3 = 1000

Some example numbers within the above magnitudes
1.00: 1 magnitude * 1.00
1.01: 1 magnitude * 1.01
1.02: 1 magnitude * 1.02

10.00: 10 magnitude * 1.000
10.01: 10 magnitude * 1.001
10.02: 10 magnitude * 1.002

Lets say the mantissa (digits right of the radix point) max out at 3 digits. As seen above that would mean the max precision at 10 magnitude would be 0.01.

100.1: 100 magnitude * 1.001

The higher the magnitude the lower the precision. At 100 magnitude max precision is reduced to 0.1. The mantissa essentially evenly divided the range between 2 magnitudes. In this case it divides it into 1000 evenly spaced levels. If limited to 3 mantissa digits, you can not represent the number 100.01. Though that's in terms of 'absolute precision', 'relative precision' is always maintained, relative precision in this case is always 1/1000 of the magnitude.










Tuesday, August 20, 2019

Changing to binary currency, no nickel and diming

Binary (hence computers) can not exactly reproduce 0.01 (cents) 0.05 (nickels) nor 0.10 (dimes). However binary can exactly represent 0.25 (quarters) and 0.50 (half dollars). The closest float 32 can get to 0.01 is roughly 0.009999999776482582

So maybe future currency can just get rid of pennies,nickels, and dimes, and instead just continue on the 'halfing' series:

0.5000 (half dollar) is half of 1.0 (dollar)
0.2500 (quarter) is half of 0.50 (half dollar)
0.1250 (eighth) is half of 0.25 (quarter)
0.0625 (sixteenth) is half of 0.125 (eighth)

Though writing down 0.0625 frequently can be annoying. It would be much easier to write in hex:

0.8 hex = 0.5000 dec
0.4 hex = 0.2500 dec
0.2 hex = 0.1250 dec
0.1 hex = 0.0625 dec

Though without hex alpha digits present (a-f) you wouldn't know it was hex instead of dec. Preceding with the prefix '0x' sort of defeats the goal of reducing the number of characters to write. Though perhaps hex could be the new format for currency and would be assumed after the $ dollar sign.

Hex fractions, and how to add the 4 types of 'binary coins' to create this value:

0.1 hex (01/16) (one of the 4 binary coins)
0.2 hex (02/16) (one of the 4 binary coins)
0.3 hex (03/16) = 0.1875 dec (0.2 + 0.1)
0.4 hex (04/16) (one of the 4 binary coins)
0.5 hex (05/16) = 0.3125 dec (0.4 + 0.1)
0.6 hex (06/16) = 0.3750 dec (0.4 + 0.2)
0.7 hex (07/16) = 0.4375 dec (0.4 + 0.2 + 0.1)
0.8 hex (08/16) (one of the 4 binary coins)
0.9 hex (09/16) = 0.5625 dec (0.8 + 0.1)
0.A hex (10/16) = 0.625 dec (0.8 + 0.2)
0.B hex (11/16) = 0.6875 dec (0.8 + 0.2 + 0.1)
0.C hex (12/16) = 0.7500 dec (0.8 + 0.4)
0.D hex (13/16) = 0.8125 dec (0.8 + 0.4 + 0.1)
0.E hex (14/16) = 0.8750 dec (0.8 + 0.4 + 0.2)
0.F hex (15/16) = 0.9375 dec (0.8 + 0.4 + 0.2 + 0.1)

Wednesday, July 17, 2019

2D Mouse tech specs analysis

Some typical gaming mouse spec values I see in 2019
(mps = meters per second, mpsps = mps per second)

CPI: 16000 (counts per inch) = 16000 counts per 0.0254 meters
IPS: 400 (inches per second) = 400 / 39.37 = 10 mps velocity
Accel: 50 g = 50 x 9.98 mpsps = 500 mpsps acceleration

0 to max speed in what time?
500 mpsps achieves 10 mps in 20 milli-seconds.

CPI at max speed must be lower than advertised?
Here's what got me wondering, can 16000 CPI be achieved at 10 mps?
There are almost 400 inches in 10 meters (393.7 to be more precise)
So 400 * 16000 = 6.4 million counts per 10 meters!
That would also be 6.4 million counts per second (hz.)
However, mouse polling rate (USB reports) maxes around 1000 hz.
What's the hz of the internal sensor? Manufacturers don't seem to list this, so who knows.

However, I assume the mouse doesn't lose track of it's relative motion/position at 50g while at 10mps
(it would be interesting to have a robot arm test this assertion, something tells me that when these 2 are maxed at the same time the mouse loses track)

What's the max speed one can do while maintaining 16000 CPI?
Not sure about internal polling, but with 1000hz USB polling, it seems that it would take 16 seconds!
OK then, so apparently it doesn't actually count each 'dot' per poll.

OK, so dots can be skipped between polls, CPI is just precision
So the question is how far can a mouse move between polls before it loses track of where it is relative to where it was on the previous poll? The field of view of the optical camera could be a big factor here. Ignoring internal polling (which is unlisted) at 1000hz USB polling, 10 meters / 1000 = 10 milli-meters which sounds reasonable. If internal polling is greater than 1000hz then this distance is less.





Values gleaned from
https://www.tomshardware.com/reviews/best-gaming-mice,6177.html








Saturday, August 25, 2018

360 cameras missing a critical spec

All cameras have 360 degree azimuth. However what is not listed is the pitch.

-A 45deg pitch means 90deg FOV
-A 90deg pitch means is shows an entire hemisphere
-A 180deg pitch means is shows an entire sphere

Too many ads out there claiming 360 deg, which really doesn't tell you anything. Please show the pitch as well!

Monday, August 6, 2018

Seasonal Date Pairs

Seasonal Date pairs are days that exhibit the same Sun path in the sky (same number of days from nearest Solstice.) For example, Apr10 and Sep01 are date pairs (both 72 days from Summer Solstice.) For both of these days at 33deg north latitude, when the Sun is at 270deg azimuth it's also at 15deg elevation.

DOY (day of year)

Equinox (Spring)
081 (W +91, S -91) Mar22 (33deg north Sun: 260.6deg azim 15deg elev)

Closer to Solstice (Summer)
082 (S -90) Mar23 (day after Equinox)
...
100 (S -72) Apr10 (33deg north Sun: 270deg azim 15deg elev)
...
125 (S -47) May05 (33deg north Sun: 280deg azim 15deg elev)
...
172 (S +00) Jun21 (33deg north Sun: 288.6deg azim 15deg elev)
...
219 (S +47) Aug07 (33deg north Sun: 280deg azim 15deg elev)
...
244 (S +72) Sep01 (33deg north Sun: 270deg azim 15deg elev)
...
263 (S +91) Sep20 (day before Equinox)

Equinox (Autumn)
264 (S +92 W -91) Sep21 (33deg north Sun: 260.6deg azim 15deg elev)

Closer to Solstice (Winter)
265 (W -90) Sep22 (day after Equinox)
...
286 (W -69) Oct13 (33deg north Sun: 250deg azim 15 deg elev)
...
308 (W -47) Nov04 (33deg north Sun: 240deg azim 15 deg elev)
...
355 (W +00) Dec21 (33deg north Sun: 228.5deg azim 15 deg elev)
365 (W +10) Dec31 (last day of year)
001 (W +11) (first day of year)
...
037 (W +47) Feb06 (33deg north Sun: 240deg azim 15 deg elev)
...
058 (W +68) Feb27 (33deg north Sun: 250deg azim 15 deg elev)
...
080 (W +90) Mar21 (day before Equinox)

Notes
(yes Solstice doesn't always fall on the 21st, but it makes a good average)
(yes Leap Year offsets most of this by 1 day, leap day should really be at the end of the year)

Saturday, July 21, 2018

Air loop tunnels

Removing the air (vacuum) is a good solution for super sonic speeds. But what about moving sea level density air through the tunnel at sub sonic speeds such as 100s of meters per second? That way you can ride through the tunnel at say 200 meters/sec (~450 mph) with the top down without having your hat blow off thanks to a constant strong tailwind going roughly same speed as the vehicle. No need for pressurized cabins!

The moving air would also help propel the vehicle forward a bit. A light vehicle with a sail could possibly be propelled solely by the wind! The air could also whisk away heat generated by the magnetic propulsion system.

Maybe the air system could be in a loop, more efficient than sucking it in and blowing it out to the atmosphere. Maintaining airspeed shouldn't be a problem, not much air resistance to overcome.

https://en.wikipedia.org/wiki/Pneumatic_tube

Sunday, July 8, 2018

Interesting facts about Seasons


Distance to the Sun
-Northern hemisphere Winter: Earth is closest to the Sun
-Northern hemisphere Summer: Earth is farthest from the Sun

Length of day
Days are longer during the Winter than in the Summer. I don't mean 'daylight hours', yes those are shorter during the Winter, I mean the time from Noon to Noon.

The Earth spins around it's own axis at the same rate all year around, however, the Earth orbits faster when it's nearer to the Sun, hence it takes longer for the Sun to return to the highest point in the sky. When viewed from above the Earth spins CCW and orbits CCW.

Because of this the Sun actually travels angularly faster across the sky in the Summer, but stays up longer because it travels along a longer arc than in the Winter.

Area facing the Sun is a major factor in Solar energy collection (and Seasons.)
I measured the power collected from a small solar panel.
When always facing the Sun:
-When the Sun is straight up 5 watts was collected.
-When the Sun is 60deg from zenith 4 watts was collected.
Not a huge difference from 0 to 60deg.

However if I tilt the small solar panel even when the Sun is straight up the power is greatly affected. Tilted so much that the area facing the Sun is halved, the power halved as well. (power breakdown: voltage remained around 24v, it's the current that changed.)

Same deal with the north and south hemispheres.
-In the Summer time more north hemisphere area faces the Sun.
-In the Winter time less north hemisphere area faces the Sun.

Not quite the extreme altitude of the Sun, but same principal in these examples:

Baja California takes up alot of screen space (so greater solid angle) during the Summer
https://earth.google.com/web/@22.01938439,-113.02998305,-2425.40930916a,12568971.6672492d,35y,0.17716338h,8.68143677t,-0r

Baja California takes up very little screen space (so less solid angle) during the Winter
https://earth.google.com/web/@-22.01938439,-113.02998305,-2425.40930916a,12568971.6672492d,35y,0.17716338h,8.68143677t,-0r

https://en.wikipedia.org/wiki/Solid_angle

Saturday, July 7, 2018

A yelling language

Let's face it, you can't yell consonants. Hence words that are only differentiated by consonants will be easily confused with each other when you need to yell.

There are probably many better examples, but here are a few I can think of off the top of my head
code, mode
call, tall
lame, tame

A proper yelling language should consist of only vowels, or sounds that you can sustain. I think radio transmissions can be a good guide: variations of amplitude and frequency.  https://en.wikipedia.org/wiki/Yodeling probably utilizes these ideas, and could become a long distance language.

Saturday, May 26, 2018

Cameras or mirrors in the front of vehicles

Notice that when exiting this parking lot just to see cars coming down the road half of your vehicle has to stick halfway out into the lane due to not being able to see through the parked cars! (posted speed limit is 30mph, but vehicles typically travel faster than that.)

https://www.google.com/maps/@32.8698966,-117.233749,3a,89.9y,137.32h,54.45t/data=!3m6!1e1!3m4!1syTOgwwzuE8VnmnDWT9kZXQ!2e0!7i13312!8i6656

This is because people's eyes are in the middle of the vehicle. One solution would be to have mirrors or cameras on the front of the vehicle. Or having a mirror in the middle road island. Or being to access nearby cameras mounted on say light posts.

Designing containers for smooth pouring

I'm sure many have noticed that when pouring liquid bottles it comes out in big clumpy waves. One wouldn't need a funnel if they'd design these things with proper airflow in mind to fill up space vacated by the liquid. Either use larger diameter spouts, or have another spout for air intake while liquid pours (as seen in a few liquid detergent bottles.)

Wednesday, May 9, 2018

Layers of tunnels to add traffic lanes

After the https://en.wikipedia.org/wiki/Interstate_Highway_System little has been done to significantly improve traffic flow. The populations have ballooned while road lanes have not.

Many places were designed street widths for a certain amount of traffic. The streets are now adjacent building locked so they can no longer widen them to accommodate the massive amount of traffic during the rush hour.

Since lateral road expansion isn't possible without razing buildings, we are left with vertical expansion. Going up with say double decker roads would be unsightly, no one would go for that. This leaves underground tunnels as the only real solution for adding more lanes. Only so many opt for mass transit such as buses and trolleys, many want the freedom and flexibility that automobiles afford

So much talk about housing crisis with little mention of the associated traffic crisis. People also need more lanes not just more houses. Less time on roads means more time to be productive. I suppose self driving cars will make waiting in traffic more bearable in the mean time as you'll then be able to do many of the things you'd do when you got home, such as check email.

Sunday, April 15, 2018

Slightly north is the quickest way south

Ever wonder why the Sun sometimes appears to the north of your location even though the sub solar point https://en.wikipedia.org/wiki/Subsolar_point is at a lower latitude from your location? One must remember that the initial direction is just that; initial. A straight line on the globe follows a great circle https://en.wikipedia.org/wiki/Great_circle . Unless that great circle follows a line of longitude or the Equator, the path direction along each point of that great circle changes. Great circles are basically the same as https://en.wikipedia.org/wiki/Orbital_inclination where if you keep going it bounces between a northern and southern latitude line.

4.9 mega meter distance example
Cabo San Lucas: +22.9 lat -109.9 lon
Honolulu: +21.3lat -157.8lon

A straight line path from Cabo has an initial heading of 277.6 deg (7.6 deg north of west) even though Honolulu is at a lower latitude (1.6 deg lower.) The great circle path will actually reach up to +24.0 deg latitude along the way.

13.0 mega meter distance example
Cabo San Lucas: +22.9 lat -109.9 lon
Manila: +14.6 lat +121.0 long

A straight line path from Cabo has an initial heading of 302.0 deg (32 deg north of west) even though Manila is at a lower latitude (8.3 deg lower.) The great circle path will actually reach up to +38.6 deg latitude along the way.

20 mega meters is halfway around the Earth.

Wednesday, March 28, 2018

The entire Earth should go Metric

The United States of America is one of 3 countries not using the metric system.

Who enjoys converting miles to feet? Gallons to cups to tablespoons to teaspoons? Tons to pounds to ounces? Speaking of ounces, are you referring to volume or weight? When you say weight, do you really mean mass or weight? In the metric system grams is mass, newtons is force (weight being force due to gravity.)

The word cup can be confusing. Do you mean just a drinking container of an unspecified size, or do you mean 8 ounces?

At least the meter is based on the measurement of the Earth and not some random person's foot! Halfway around the Earth is 20 mega-meters. Even the British abandoned the British system for the French! Feet, miles are in-congruent. Who wants to memorize 5280 in a statute mile? Then you got your 6075 feet per nautical mile to pile onto that. There are 1000 millimeters in 1 meter, there are 1000 meters in 1 kilometer, very simple.

Sure app and search engines will convert, but when you got oil on your hands when cooking do you really want to play with an app on the phone to know how to convert tablespoons to teaspoons? (maybe ask a voice assistant, but if it's loud it probably won't understand you) With metric it's easy to deal with with conversions in your head. 1000ml in a liter, 1000g in a kg, for example. I don't want to remember how many cups in a gallon!

Also the entire Earth should go full metric, km/h isn't much better than mph. You still gotta deal with that unwieldy 3600 second value. Meters per second would be ideal. Say you're travelling at 10 meters/sec (22.3mph) and you have to travel 10 kilometers. Simply divide 10,000 by 10 = 1000 seconds (16.7 minutes). Say you were going 36km/h, how long will it take to travel 10 kilometers? Not readily apparent, gotta do something like 10/36 to get hours, then times that by 60 to get minutes. We should just get rid of hours and minutes and stick with seconds and kilo-seconds to make it even simpler, 86.4 kilo seconds per day.

Related links
http://kilosecond.info/

Monday, March 26, 2018

A better explanation of lift of an airfoil


-Air never leaves the flat bottom, hence it always gets pushed upward, known as lift.
-Drag is air pushing upon the leading edge, bending around it.
-The key is the lack of air on top to apply down pressure.

The reason is that the airfoil traveling above a certain speed causes the following:
-After being displaced by the leading edge air doesn't travel back down to the top surface faster than the top surface tapers downward. Therefore it is unable to apply pressure. It's that simple.

I've heard explanations saying low pressure on top due to higher velocity that is due to farther distance to travel. While those conditions might be true, that does not properly explain the phenomenon.

Airfoils depend on air pressure, going through unpressurized air wouldn't yield any lift (if you could somehow get unpressurized air to stay put that is.)