Stormworks: Build and Rescue

Stormworks: Build and Rescue

Not enough ratings
GetTargetPos
   
Award
Favorite
Favorited
Unfavorite
Microcontrollers: Calculation, Microcontroller
Tags: v0.10.33
File Size
Posted
25.219 KB
5 Aug, 2020 @ 9:39am
1 Change Note ( view )

Subscribe to download
GetTargetPos

Description
***** 0.10.36更新稳定云台摄像机已经完美取代该微处理器功能 ******
***** This micro-controller can be easily replaced by Camera Stabilized after ver. 0.10.36 *****

获取激光测距仪指向目标的三轴坐标
原理和使用方法如下~

Get the target position designated by laser rangefinder

How it works:
Input:
- Compass: a float value in range [-0.5,0.5], call it α
- TiltSensor: a float value in range [-0.5,0.5], call it β
- RangeFinder: a float value, call it L
- Altitude: a float value, call it H
- GPS X/Y: no need to explain, call them X & Y
Output:
- Target X: L*sin(2*π*β)*cos(2*π*α) + X
- Target Y: L*sin(2*π*β)*cos(2*π*α) + Y
- Target Altitude: *sin(2*π*α) + H

Simple trigonometry

初中三角函数知识~
推荐的使用方法是搭一个双自由度的平台,然后搭载上激光测距仪,把倾斜传感器对着后面
倾斜传感器也可以对前面,提供了一个选项属性可供选择,控制一个很简单的-1乘数因子
然后罗盘只在水平面上旋转

To properly use this microcontroller, you need:
A laser rangefinder mounted on a two-dimensional rotation platform, with a tilt sensor on rangefinder's back.
Compass rotate only in horizontal plane.
This microcontroller brings with a option multiplier that can handle whether the tilt sensor facing forward or backward.
2 Comments
RedParadize 4 Sep, 2021 @ 11:08pm 
Nevermind, it seem that it isnt where the issue is. I still have problem with it trough...
RedParadize 4 Sep, 2021 @ 10:53pm 
Hi there, there is a small error in your microcontroller I think. constant number next to the compass input should be 0.25 and not 0.5. At least thats what work for me