KPW2 救砖

尝试为Kindle Paperwhite 2 (KPW2) 安装安卓双系统时,不慎导致设备的`u-boot`被擦除,进而无法进入`fastboot`模式,设备无法被电脑识别。本文记录了救砖过程中的诊断信息和初步尝试,包括设备的基本信息和遇到的问题描述。
Read More

Mac环境下制作Win11启动盘

本文介绍了在Mac环境下制作Windows 11启动盘的详细步骤。首先,需要下载Windows 11的镜像文件,并使用磁盘工具将U盘格式化为MS-DOS(FAT)格式。接着,通过`rsync`命令复制除`install.wim`文件以外的所有文件到U盘。此外,文中提到了一个重要的注意事项,即需要将`install.wim`文件拆分为小于4GB的文件,以适应FAT32格式的限制。最后,介绍了安装`wimlib`工具的步骤,该工具用于处理`install.wim`文件的拆分。
Read More

Solar System Dynamics

Science is, after all, an attempt to make sense of the world around us.

§1 Structure of the Solar Systems

  1. Kepler’s law
  2. Newton’s law
  3. Titius-Bode “Law”: The mean distance dd in AU from the Sun to each of the six known planets was well approximated by the equation:

d=0.4+0.3(2i), where i=,0,1,2,4,5d = 0.4+0.3(2^i),\ \textrm{where}\ i=-\infty,0,1,2,4,5

Planet i a(AU) TB Law(AU)
Mecury -inf 0.39 0.4
Venus 0 0.72 0.7
Earth 1 1.00 1.0
Mars 2 1.52 1.6
Ceres 3 2.77 2.8
Jupiter 4 5.20 5.2
Saturn 5 9.54 10.0
Uranus 6 19.18 19.6
  1. Resonance
    1. spin-orbit coupling:
      1. Moon (1:1)
      2. Mercury (3:2)
    2. orbit-orbit coupling:
      1. Jupiter and Saturn (5:2)
      2. Neptune and Pluto (3:2)
      3. Jupiter System: Laplace relation: nI3nE+2nG=0,n=360/Tn_{\mathrm{I}} - 3n_{\mathrm{E}} + 2n_{\mathrm{G}} = 0, n = 360/T, prevent the triple conjunctions of the threee satellites. When a conjunction takes place between any pair of satellites, the third satellite is always at least 60 degree away
      4. Saturn System: the widest variety of resonant phenomena.
      5. Uranus System
      6. Neptune System
      7. Pluto System
      8. Asteroid Belt
  2. Commensurability

n1n2i1i2\frac{n_1}{n_2}\approx\frac{i_1}{i_2}

where n1n_1 and n2n_2 are the mean motions of the two objects, using integers i1,i2{1,2,,imax}i_1,i_2 \in \{1,2,\dots,i_{\textrm{max}}\} with i1<i2i_1<i_2 and imax=7i_{\textbf{max}}=7 but excluding the case ii=i2=1i_i=i_2=1.

However, the observed near-commensurability in the solar system are all of the form

n1n2pp+1\frac{n_1}{n_2}\approx\frac{p}{p+1}

  1. Recent Developments
    1. Why are there pronounced gaps at most of the major jovian resonances in the asteroid belt but a clustering of asteroids at the 3:2 resonance?
    2. Where do short-period comets come from?
    3. Why do the orbital elements of some groups of asteroids have common values?
    4. Why are there numerous resonances among the satellites in the jovian and saturnian systems but none in the Uranian system?
    5. Why are the eccentricities and inclinations of some satellite orbits too large to fit in with current understanding of tidal evolution?
    6. What produced the Cassini division in Saturn’s rings?
    7. How are narrow rings maintained despite the spreading effects of collisions and drag forces?
    8. Are planetary rings transient phenomena or can they survive for billions of years?

§2 The Two-Body Problem

  1. Introduction: The interaction of two point masses moving under a mutual gravitational attraction described by Newton’s universal law of gravitation

  2. Equations of Motion

    The The gravitational forces and the consequent accelerations experienced by the two masses are

    F1=+Gm1m2r3r=m1r¨1, F2=Gm1m2r3r=m2r¨2\mathbf{F_1} = +\mathit{G}\frac{m_1m_2}{r^3}\mathbf{r} = m_1\mathbf{\ddot{r}_1},\ \mathbf{F_2} = -\mathit{G}\frac{m_1m_2}{r^3}\mathbf{r} = m_2\mathbf{\ddot{r}_2}

    where r=r2r1\mathbf{r}=\mathbf{r_2} - \mathbf{r_1} denotes the relative position of the mass m2m_2 with respect to m1m_1. Thus

    m1r¨1+m2r¨2=0m_1\mathbf{\ddot{r}_1} + m_2\mathbf{\ddot{r}_2} = 0

    which can be integrated directly twice to give

    m1r˙1+m2r˙2=a,m1r1+m2r2=at+b=a,m1r1+m2r2=at+b\begin{aligned} m_1\mathbf{\dot{r}_1} + m_2\mathbf{\dot{r}_2} &= \mathbf{a},\\ m_1\mathbf{r_1} + m_2\mathbf{r_2} &= \mathbf{a}t+\mathbf{b}= \mathbf{a},\\ m_1\mathbf{r_1} + m_2\mathbf{r_2} &= \mathbf{a}t + \mathbf{b} \end{aligned}

    where a\mathbf{a} and b\mathbf{b} are constant vectors. With substitution of the centre of mass’s position vector R=(m1r1+m2r2)/(m1+m2)\mathbf{R} = (m_1\mathbf{r_1} + m_2\mathbf{r_2}) / (m_1 + m_2), the eqution above can be written as

    R˙=am1+m2, R=at+bm1+m2,\mathbf{\dot{R}} = \frac{\mathbf{a}}{m_1 + m_2},\ \mathbf{R} = \frac{\mathbf{a}t+ \mathbf{b}}{m_1 + m_2},

    implying that either the centre of mass is stationary (if a=0\mathbf{a}=0) or it is moving with a constant velocity in a straight line with respect to the origin O\mathit{O}.

    Now consider the motion of m2m_2 with respect to m2m_2, the equation of relative motion:

    d2rdt2+μrr3=0\frac{\mathrm{d}^2\mathbf{r}}{\mathrm{d} t^2} + \mu\frac{\mathbf{r}}{r^3} = 0

    where μ=G(m1+m2)\mu = \mathit{G}(m_1+m_2). Taking the vector product of it and we have r×r¨=0\mathbf{r}\times\mathbf{\ddot{r}}=0, which can be integrated directly to give the angular momentum integral

    r×r˙=h\mathbf{r}\times\mathbf{\dot{r}}=\mathbf{h}

    Now move to polar coordinates, the position, velocity, and acceleration vectors can be written as

    r=rr^, r˙=r˙r^+rθ˙θ^, r¨=(r¨rθ˙2)r^+[1rddt(r2θ˙)]θ^\mathbf{r} = r\mathbf{\hat{r}},\ \mathbf{\dot{r}}=\dot{r}\mathbf{\hat{r}} + r\dot{\theta}\mathbf{\hat{\theta}},\ \mathbf{\ddot{r}}=(\ddot{r}-r\dot{\theta}^2)\mathbf{\hat{r}}+\left[\frac{1}{r}\frac{\mathrm{d}}{\mathrm{d} t}\left(r^2\dot\theta\right)\right]\mathbf{\hat{\theta}}

    hence the angular momentum

    h=r2θ˙z^\mathbf{h}=r^2\dot{\theta}\mathbf{\hat{z}}

    The area swept out by the radius vector in time δt\delta t is

    δA12r(r+δr)sinδθ12r2δθ\delta A \approx\frac12 r(r+\delta r)\sin\delta\theta\approx\frac12 r^2\delta \theta

    by dividing each side by δt\delta t and taking the limit as δt\delta t \rightarrow we have

    dAdt=12r2dθdt=12h\frac{\mathrm{d}A}{\mathrm{d} t} = \frac12 r^2 \frac{\mathrm{d}\theta}{\mathrm{d} t} = \frac 12 h

    Since hh is a constant this implies that equal areas are swept out in equal times. Note that this does not require an inverse square law of force, but only that the force is directed along the line joining the two masses.

  3. Orbital Position and Velocity

星系物理

星系物理是天文学的一个分支,研究星系的形成、演化、结构、成分、动力学、星系间的相互作用等问题。本文将介绍星系的分类、构成、星系团和星系群、星系团的形成、星系团的性质、星系团的演化、星系团的形成、星系团的性质、星系团的演化等内容。
Read More

解决M1 Mac在安装pytables时报错 `#Could not find a local HDF5 installation`

在M1 Mac上安装pytables时,可能会遇到“Could not find a local HDF5 installation”的错误。这是因为Homebrew的默认安装路径在`/opt/homebrew/opt/`下,而pytables在安装过程中需要找到HDF5的安装位置。解决这个问题的方法是通过设置环境变量`HDF5_DIR`和`BLOSC_DIR`来指定HDF5和c-blosc的安装路径。这样做之后,pytables就可以顺利找到所需的库,完成安装过程。
Read More

.gitignore的正确使用姿势

在 git 仓库中,有些文件是不需要同步的,此时就可以将它们加入到 .gitignore 文件中,具体语法如下:所有空行或者以注释符号 # 开头的行都会被 Git 忽略。可以使用标准的 glob 模式匹配。匹配模式最后跟反斜杠(/)说明要忽略的是目录。要忽略指定模式以外的文件或目录,可以在模式前加上惊叹号(!)取反。下面举几个具体的例子:# 此行为注释# 忽略所有扩展名为 a 的文件*.a# 忽略所有扩展名为 a 或 b 的文件*.[ab]# 除 main.a 之外!main.a
Read More

编译适配rlt8811cu无线网卡的OpenWRT(LEDE)软路由固件

本文将介绍如何编译适配rlt8811cu无线网卡的OpenWRT(LEDE)软路由固件。我们将从准备编译环境开始,推荐使用Ubuntu或Debian系统,并确保操作系统支持区分大小写。接下来,我们会详细介绍所需的依赖安装命令,以确保编译环境的正确配置,为编译适配rlt8811cu无线网卡的OpenWRT(LEDE)软路由固件打下坚实的基础。
Read More

认识宇宙

本文是关于宇宙的概观介绍,从太阳到冥王星,涵盖了太阳系内各主要天体的基本特征。包括太阳的日珥喷发、水星表面的环形山、金星的二氧化碳大气、火星地下的固态水、木星及其卫星的特点、土星的环和卫星、天王星和海王星的大气成分,以及冥王星的独特轨道倾角和大小。这是一篇入门级的学习笔记,旨在为读者提供一个关于我们所在太阳系的基础知识框架。
Read More

zsh与oh-my-zsh的配置指南

1. 准备

  • 查看当前环境shell

    1
    echo $shell
  • 查看系统自带shell

    1
    cat /etc/shells
  • 若要切换到已安装的shell,可使用如下命令切换默认shell

    1
    chsh -s /usr/bin/zsh

2. zsh的安装

  • 若还未安装zsh,可使用yum(centos)、brew(MacOS)或apt(ubuntu、debian)命令直接安装:

    1
    2
    3
    yum install zsh # CentOS
    brew install zsh # MacOS
    apt install zsh # ubuntu、debian

    安装后,可使用上一步中切换默认shell的方法切换zsh为默认shell

3. oh-my-zsh的安装与配置

使用oh-my-zsh可以跳过zsh繁琐的配置,下面介绍安装方法

  • 可以使用官方安装脚本一键安装:

    1
    wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh

    然而非root用户运行该脚本可能出现权限不够等问题,此时可手动安装:

    1. clone官方仓库至本地

      1
      git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
    2. 将内容模版复制到当前用户主目录下的.zshrc文件中

      1
      cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
  • 配置zsh主题

    通过如下命令查看可用的主题:

    1
    ls ~/.oh-my-zsh/themes

    这里推荐ys主题,界面美观且名称简单易记,通过修改~/.zshrc文件中的ZSH_THEME字段即可修改主题:

    1
    ZSH_THEME="ys"

    修改完记得使用source命令重新读取

    1
    source ~/.zshrc
  • 配置zsh插件

    修改~./zshrc文件中的pulgin字段即可选择需要的主题,但前提是主题已经安装在当前用户目录下。除了默认的git插件外,这里再推荐两款插件:

    1. zsh-autosuggestions
    1
    git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
    1. zsh-syntax-highlighting
    1
    git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
    1. autojump
    1
    sudo apt install autojump

    之后在~/.zshrc文件中plugin字段处增加这三个插件就可以啦

    1
    plugins=(git zsh-autosuggestions zsh-syntax-highlighting autojump)
    1. thefuck
    1
    sudo apt install thefuck

    ~/.zshrc文件末尾加入

    1
    eval "$(thefuck --alias fuck)"