正态化角地磁场

2024-10-01 02:19:05 发布

您现在位置:Python中文网/ 问答频道 /正文

我和我的团队正在参加欧洲空间局的挑战赛。我们的程序将在国际空间站上运行3个小时,我们将返回结果并进行分析。在


我们想研究Sense HAT磁力仪测量的磁场强度与世界磁模型(WMM)的预测之间的联系。我们想在感应帽上研究磁强计的精度。在

该程序将从Sense HAT获得微磁强计的原始数据(XY和{}),并计算值H和F,如British geological survey's article(第2.1节)所述。然后它将把它们保存到CSV文件中,以及用ephem计算的时间戳和位置。在

然后,我们将比较来自ISS和WMM的Z、H和F值,并使用我们的数据和差异创建地图(如图6、8和10)。然后我们将研究,感应式磁强计的数据有多精确。在


我们想把我们的数据和来自WMM的数据进行比较,看看Sense-HAT磁强计有多精确,但是我们有一个问题,就是磁强计的方向总是不同的。因此,我们的数据总是(非常)不同于WMM,所以我们无法正确地比较它们。在

我们与Astro-Pi支持团队进行了交谈,他们建议“将角度测量值标准化,这样看起来就像是由一个南北对齐的设备拍摄的”。在

不幸的是,我们(和他们)不知道如何做到这一点,所以他们建议在堆栈交换中提出这个问题。我在Math Stack ExchangePhysics Stack Exchange和{a6}上问过。不幸的是,他们没有得到任何答复,所以我再次问这个问题。在

我们怎么能做到这一点?我们有时间戳、国际空间站位置(纬度、经度、海拔)、磁性数据(XY和{})以及来自北方的方向。在

我们希望将我们的数据标准化,这样我们就能正确地将它们与来自WMM的数据进行比较。在


以下是我们计算磁强计值的程序的一部分(它得到的数据不是标准化的):

compass = sense.get_compass_raw()

try:
    # Get raw data (values are swapped because Sense HAT on ISS is in different position)
    # x: northerly intensity
    # y: easterly intensity
    #  z: vertical intensity
    x = float(compass['z'])
    y = float(compass['y'])
    z = float(compass['x'])

except (ValueError, KeyError) as err:
    # Write error to log (excluded from this snippet)
    pass

try:
    # h: horizontal intensity
    # f: total intensity
    # d: declination
    # i: inclination
    h = sqrt(x ** 2 + y ** 2)
    f = sqrt(h ** 2 + z ** 2)
    d = degrees(atan(y / x))
    i = degrees(atan(z / h))

except (TypeError, ValueError, ZeroDivisionError) as err:
    # Write error to log (excluded from this snippet)
    pass

我们的代码中还有一些简单的模拟器:https://trinket.io/library/trinkets/cc87813ce7


Astro Pi团队关于磁强计位置和位置的电子邮件:

  • Z is going down through the middle of the Sense Hat.
  • X runs between the USB ports and SD card slot.
  • Y runs across from the HDMI port to the 40 way pin header.

On the ISS the AstroPi orientation is that the Ethernet + USB ports face the deck and the SD card slot is towards the sky. So, that's basically a rotation around the Y axis from flat. So you keep the Y axis the same and swap around Z and X.


It can help to look at the Google Street view of the interior of the ISS Columbus module to get a better idea how the AstroPi is positioned; https://www.google.com/streetview/#international-space-station/columbus-research-laboratory

If you pan the camera down and to the right, you'll see a green light - that's the AstroPi. The direction of travel for the whole space station is towards the inflatable Earth ball you can see on the left.

ISS

So, broadly speaking, the SD card slot points towards azimuth as in away from the centre of the Earth (so the X axis). The LED matrix is facing the direction of travel of the space station (the Z axis).

Because of the orbital path of the ISS the Z and Y axes will continually change direction relative to the poles as it moves around the Earth.

location

So, I am guessing you want to normalise the angled measurements so it looks like they were taken by a device aligned North/South?


Tags: andoftheto数据fromyoucompass
1条回答
网友
1楼 · 发布于 2024-10-01 02:19:05

我认为您需要创建类似于NEH的局部参考坐标系(北、东、高/高/上)类似于

它通常在航空中用作参考坐标系(航向是从它衍生出来的),因此你的参考系是根据你的地理位置及其指向北、东向上的轴来计算的。在

现在的问题是aligned North/South和{}是什么意思?在

如果参考装置测量的只是投影,那么您需要这样做:

dot(measured_vector,reference_unit_direction)

其中方向是North方向,但作为单位向量。在

如果参考装置也测量全三维,则需要将参考和测试测量数据转换为同一坐标系。这是通过使用

所以简单的matrix * vector乘法就可以。。。然后计算这些值H,F,Z,我不知道它们是什么,而且懒得去看论文。。。应该是E,H或{}向量。在

然而,如果你没有测量时的地理位置,那么你只有相对于国际空间站的North方向,以欧拉角的形式,因此你根本无法构建三维参考系(除非你得到了两个已知的矢量,而不是一个类似的矢量)。在这种情况下,您需要使用选项1投影(使用点积和北向向量)。所以以后只处理标量值而不是三维矢量。在

[Edit1]

从你的链接:

The geomagnetic field vector, B, is described by the orthogonal components X (northerly intensity), Y (easterly intensity) and Z (vertical intensity, positive downwards);

这不是我的专业领域,所以我可能错了,但我是这样理解的:


B(Bx,By,Bz)-磁场矢量
a(ax,ay,az)-加速

现在FB的大小,所以它在旋转时不变:

^{pr2}$

您需要计算NED参考坐标系中B的X,Y,Z值(北,东,下),因此您首先需要基向量:

^{3}$

如果不通过对交叉操作数进行重新排序来求反,则应将它们渲染为直观地检查它们是否指向正确的方向(我可能有错误的顺序,而不是使用上方向向量)。现在只需将B转换为NED

X = dot(North,B)
Y = dot(East,B)
Z = dot(Down,B)

现在你可以计算H

H = sqrt( X*X +Y*Y )

你可以在上面的变换矩阵链接中找到这个所需的向量数学。在

注意,只有在没有加速度的情况下(传感器在操作过程中不在机械臂上,或者ISS没有进行烧录…),否则,您需要以不同的方式获得NED帧(如来自机载系统)

如果这不能正确工作,那么你可以从你的国际空间站位置计算奈德,但为此你需要知道传感器的确切方位和位移相对于你的模拟模型提供你的位置。我不知道国际空间站做了什么旋转,所以除非万不得已,否则我不会碰那个主题。在

恐怕我有一段时间没有时间编码了。。。无论如何,没有样本输入数据或坐标系表达式和所有输入/输出变量的编码都是疯狂的。。。简单的否定轴心将使整个事情无效,有很多重复的方式,并涵盖他们所有你将结束许多版本,试图。。。在

应用程序应该逐步建立起来,但我担心没有模拟或真实硬件的访问是不可能的。还有很多事情可能会出错。。。即使是简单的程序也很难编码。。。我将首先检查F,因为它不需要任何“标准化”,以查看结果是否关闭。如果关了它可能暗示不同的单位或者上帝知道。。。在

相关问题 更多 >