
上海灰蒙蒙的一天
11 月 1 日,上海闵行的天空灰蒙蒙的,没什么刺鼻气味。我问了 OpenClaw,想知道今天的空气怎么了。 它给了一份很详细的分析:昨天的雾还没散,南风把长三角的污染带过来,下午又有光化学反应。后面还接着解释,为什么去安吉山上会好一些。 ...

11 月 1 日,上海闵行的天空灰蒙蒙的,没什么刺鼻气味。我问了 OpenClaw,想知道今天的空气怎么了。 它给了一份很详细的分析:昨天的雾还没散,南风把长三角的污染带过来,下午又有光化学反应。后面还接着解释,为什么去安吉山上会好一些。 ...
野外深空拍摄有两个网络问题需要处理:ASIAIR 自带的 Wi-Fi 覆盖范围有限,iPad 接入该网络后无法访问互联网。另外,希望拍摄期间就把文件同步到家里的 NAS,收工后不必再把设备搬回家、通过家庭 Wi-Fi 传输。 ...
三批数据里,六月那两张是主力:一张给构图和颜色,一张给细节。十月这批是后来补的,没通过检查,留在硬盘上当 Hα 素材。 最后的成片是六月的构图,加上细致图里通过检查的那部分高频。 ...
9 月中旬,我们把 Seestar 的数据迁到无头 WBPP 流水线上跑。NGC 1491 是那批里帧数最多的一个目标:440 帧、10 秒一张,按常规流程叠一次就行。 结果叠出来的 master 不对。 ...
决定今晚出不出去,我一般先看云。云量可以,再翻光污染地图;找到一块够黑的地方,还要看路能不能开到山脚;最后打开星图,确认想拍的东西今晚能升多高,这台镜子装不装得下。 ...
MHA[Multi-Head Attention] The thinking behind the MHA is simple here: Given an input sequence $X[x_1, x_2, …, x_n]$,MHA is equal to the concatenation of multiple outputs from attention process. $$ \begin{gathered} O[o^{(1)}, o^{(2)}, \dots, o^{(m)}] \\ o^{(h)} = Attn(q^{(h)}, k^{(h)}, v^{(h)}) \\ Attn = \frac{\sum_{i \le t} exp(q_t*k_i^T)v_i}{exp(q_t*k_i^T)}\\ h : head \\ t : the\ number\ of\ token \\ q = MLP_q(X) \\ k = MLP_k(X) \\ v = MLP_v(X) \\ \end{gathered} $$ assume the output dimension is $d$, and the number of heads is $h$. Experimentally, we have the following equation: $d_k = d_v = d /h$. In the most of base cases, we only need to predict the t+1 word. and we can just cache the attention result, KV Cache, for our next use. ...
简介 这是一篇介绍如何从零开始构建 MCP server 的简单说明。本说明由三部分组成:UV 介绍、代码开发和部署。 UV 简介 UV是一个基于 rust 的 Python 软件包和项目管理器。除了 UV 非常快之外,UV 与其他管理器没有什么区别。此外,MCP 使用 UVX(运行 python 包的 UV 工具)来运行服务器。因此,在本说明中,我们将使用 UV 来管理我们的项目。 ...
Pre-assumption This guide assumes that readers are familiar with Linux or MacOS command line interface (CLI) and what is a MCP server. Brief introduction This guide shows how to build a MCP server from scratch. This note is composed by three parts: UV introduction, Code development, and deployment. UV introduction UV is a rust based Python package and project manager. There are no differences between UV and other managers except UV is very fast. Also, MCP uses UVX, a UV tool for running python package, to run the server. So in this note, we’ll use UV to manage our project. ...
Introduction We’ve been experiencing an application crash on the QNX platform, which initially seemed like a common occurrence since core dumps happens. However, this issue is different. After the crash, we’re unable to enter engineering mode, making it impossible to use SSH to retrieve the core file. Furthermore, the crash occurs near the application start, leaving no time to enter engineering mode when the system boots up. This page serves to document how I’ve dealt with this issue, which is perhaps my proudest achievement so far at the new company. ...
Transforming through coordination systems can be confused for some developers like me. But we have to know those commonly used systems and know the bridge between these words. As an autonomous system developer, the commonly used coordination systems are: WGS84, local Cartesian, and ego. Although it is not that important to know the projection theory behind these coordinates, it is good to know how to transform between the coordinations. Conversion from WGS84 to Cartesian We first need to choose a reference point in WGS84 as the cartesian’s origin. Convert the WGS84 coordinates of the reference point to Earth-Centered, Earth-Fixed (ECEF) Cartesian coordinates. Convert the WGS84 coordinates of the point you want to transform to ECEF Cartesian coordinates. Translate and rotate the ECEF coordinates of the target point to the local ENU coordinate system centered at the reference point. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 import math import numpy as np # WGS84 ellipsoid constants a = 6378137.0 # Semi-major axis in meters f = 1 / 298.257223563 # Flattening e2 = 2 * f - f * f # First eccentricity squared def wgs84_to_ecef(lat, lon, alt): lat_rad = math.radians(lat) lon_rad = math.radians(lon) N = a / math.sqrt(1 - e2 * math.sin(lat_rad) ** 2) X = (N + alt) * math.cos(lat_rad) * math.cos(lon_rad) Y = (N + alt) * math.cos(lat_rad) * math.sin(lon_rad) Z = (N * (1 - e2) + alt) * math.sin(lat_rad) return X, Y, Z def ecef_to_enu(x, y, z, lat0, lon0, h0): lat0_rad = math.radians(lat0) lon0_rad = math.radians(lon0) X0, Y0, Z0 = wgs84_to_ecef(lat0, lon0, h0) dx = x - X0 dy = y - Y0 dz = z - Z0 sin_lat0 = math.sin(lat0_rad) cos_lat0 = math.cos(lat0_rad) sin_lon0 = math.sin(lon0_rad) cos_lon0 = math.cos(lon0_rad) t = np.array([ [-sin_lon0, cos_lon0, 0], [-sin_lat0 * cos_lon0, -sin_lat0 * sin_lon0, cos_lat0], [cos_lat0 * cos_lon0, cos_lat0 * sin_lon0, sin_lat0] ]) enu = np.dot(t, np.array([dx, dy, dz])) return enu[0], enu[1], enu[2] # Reference point (example: latitude, longitude, altitude) ref_lat = 41.8902 ref_lon = 12.4924 ref_alt = 0 # Target point to be transformed (example: another point near the reference) target_lat = 41.8912 target_lon = 12.4934 target_alt = 0 # Convert target point to ECEF target_x, target_y, target_z = wgs84_to_ecef(target_lat, target_lon, target_alt) # Convert to ENU coordinates relative to the reference point enu_x, enu_y, enu_z = ecef_to_enu(target_x, target_y, target_z, ref_lat, ref_lon, ref_alt) print(f"ENU coordinates: E={enu_x}, N={enu_y}, U={enu_z}") Convert local cartesian to ego position In our system, the difference between the local cartesian to the ego coordinate system is only the rotation. ...
From the perceptive of the structure of mamba, this is a discrete selective space machine that runs in linear time using linear space. lets say, matrix A is a state space matrix for the last system status h(t). we then can calculate the next h(t+1) based on the following equation: $$ \begin{equation}h(t) = A*h(t-1) + B*x(t)\end{equation} $$ $$ y = C*h(t) $$ Where B is a weight for input x(t) and C is the weight for output y. ...
Introduction: Recently, while acquainting myself with the new company, I encountered a piece of unusual code. It seems quite straightforward. We start by declaring a base class with a private virtual function, which is then called by a public member function. Next, we derive a class from the base class and override the virtual function. This pattern is known as the Template Pattern. It defines the skeleton of an algorithm but allows subclasses to override specific steps without altering its structure. The code appears sound until we scrutinize the derived class. ...