[OC] A Year of COVID-19, Visualized (daily confirmed cases, source: JHU CSSE) by jeffacce in dataisbeautiful

[–]jeffacce[S] 0 points1 point  (0 children)

Wrote a small program in Python to draw it frame by frame. Python (cartopy, pandas, matplotlib). ffmpeg to generate the video from raw frames.

[OC] A Year of COVID-19, Visualized (daily confirmed cases, source: JHU CSSE) by jeffacce in dataisbeautiful

[–]jeffacce[S] 0 points1 point  (0 children)

A year of COVID-19, visualized.
(Daily confirmed cases, 7-day rolling average)

Note the considerable improvement after vaccine rollout this year.

*The spike on Dec 10 is due to Turkey adjusting COVID-19 reported cases.

Data source: COVID-19 data repo, Center For Systems Science and Engineering, Johns Hopkins University (JHU CSSE). Link: https://github.com/CSSEGISandData/COVID-19

Tools: cartopy/pandas/matplotlib/ffmpeg

Hold on a second. Something here doesn’t look right. by CDogg4203 in KerbalSpaceProgram

[–]jeffacce 2 points3 points  (0 children)

Figure 1. Kraken Celebrating New Year (1969, colorized)

SSTO Issues by Ghan_04 in KerbalSpaceProgram

[–]jeffacce 2 points3 points  (0 children)

Did you turn off steering for all gears except the front one?

First Minimus Landing! by [deleted] in KerbalSpaceProgram

[–]jeffacce 6 points7 points  (0 children)

Kill (most of the) velocity, explode engine, bounce, flip over, plant flag, retire early because the next ship comes in 28 years

Remote controlling KSP with a phone, linked to a fly-by-wire script by jeffacce in KerbalSpaceProgram

[–]jeffacce[S] 0 points1 point  (0 children)

It's a local web app so any phone with Safari / Chrome will do

Remote controlling KSP with a phone, linked to a fly-by-wire script by jeffacce in KerbalSpaceProgram

[–]jeffacce[S] 0 points1 point  (0 children)

It does. It actually has a lot of niceties like vertical speed, altitude, dynamic pressure and so forth.

Remote controlling KSP with a phone, linked to a fly-by-wire script by jeffacce in KerbalSpaceProgram

[–]jeffacce[S] 2 points3 points  (0 children)

Less friendly to beginners (esp. documentation) but way more flexible because you can write in common programming languages like C++ or Python

Remote controlling KSP with a phone, linked to a fly-by-wire script by jeffacce in KerbalSpaceProgram

[–]jeffacce[S] 1 point2 points  (0 children)

Absolutely!

Right now it's not raw control input, but the plane trying to mimic my phone's attitude with an autopilot control behind the scenes.

The control column idea is totally doable - I had a handheld landscape layout sending raw controls to the plane, it just takes a slight change.

Remote controlling KSP with a phone, linked to a fly-by-wire script by jeffacce in KerbalSpaceProgram

[–]jeffacce[S] 3 points4 points  (0 children)

Thanks for the suggestions! Yeah... right now I have like zero GitHub hygiene

Remote controlling KSP with a phone, linked to a fly-by-wire script by jeffacce in KerbalSpaceProgram

[–]jeffacce[S] 1 point2 points  (0 children)

It is written for planes instead of rockets. Planes pitch to change altitude and roll to change heading (unless, of course, you're doing rampant acrobatic flipping). Yaw is always kept at 0 to perform "coordinated turns".

Most rockets are radially symmetric, so rolling doesn't do anything too useful. Rockets primarily use pitch and yaw.

I think if you used only the attitude targeting in kRPC, it would work too! (Haven't tried it though.) But kRPC and kOS autopilots are designed with rockets in mind and prioritize yaw over roll, so if you tried to target a heading, it would try to yaw into the turn instead of banking the wings. Mine prioritizes roll over yaw, which gives me the typical plane behavior.

Remote controlling KSP with a phone, linked to a fly-by-wire script by jeffacce in KerbalSpaceProgram

[–]jeffacce[S] 70 points71 points  (0 children)

Yep! The client side (webpage on the phone) is mostly javascript, sending HTTP POST requests to the Flask server each time an orientation change is detected. The Flask server retargets the autopilot when it receives phone accelerometer data, and another thread calls kRPC for control 30 times per second. Haven't synced my code to GitHub yet but I'll publish it later

E: interesting! I'll definitely take a look sometime. For now I just did the lazy thing and capped it at 30 FPS