···11+# These are supported funding model platforms
22+33+github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
44+patreon: # Replace with a single Patreon username
55+open_collective: # Replace with a single Open Collective username
66+ko_fi: jericho1060
77+tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
88+community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
99+liberapay: # Replace with a single Liberapay username
1010+issuehunt: # Replace with a single IssueHunt username
1111+otechie: # Replace with a single Otechie username
1212+custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+20
approach.yolol
···11+a=15 b=150 c=1 if:rD>=:rLength thengoto1end goto:Approach+1
22+if:rD<=a or :Approach<=0 or :rD>=:rLength thengoto5end d=:rD
33+e=(d-:rD)*5 f=(:rD-a)/5 g=f-e h=(f*(g>0)+e*(g<0))*100/b*(:rD<:rLength)
44+:FcuForward=h*(e<f) :FcuBackward=c*h*(e>=f) goto2
55+ife<=0 or :rD>a thengoto7end d=:rD
66+e=(d-:rD)*5 :FcuForward=0 :FcuBackward=c*e*100/b goto5
77+:FcuForward=0 :FcuBackward=0 goto1
88+99+1010+1111+1212+1313+1414+1515+1616+1717+1818+1919+2020+//Approach with speed control by jericho (Discord: jericho#1060)
pictures/Button_Fields.png
This is a binary file and will not be displayed.
pictures/RangeFinder_Fields.png
This is a binary file and will not be displayed.
+51
readme.md
···11+# Approcah Script with speed control
22+33+A script to secure your approach from a target and avoir collision.
44+55+Showcase Video available here : [https://youtu.be/GqaKc3-UVYU](https://youtu.be/GqaKc3-UVYU)
66+77+## Guilded Server (better than Discord)
88+99+You can join me on Guilded for help or suggestions or requests by following that link : https://guilded.jericho1060.com
1010+1111+## Elements Required
1212+1313+- 1 Range Finder
1414+- 1 Hybrid Button *(or any other type of button)*
1515+- 1 Basic YOLOL Chip
1616+- 1 YOLOL Chip Socket
1717+1818+## Button Fields
1919+2020+You must name your button `Approach`. If you are using a Hybrid Button, be sure to set the `ButtonOnStateValue` to `1` and the `ButtonOffStateValue` to `0`. The `ButtonStyle` must be set to `1` if you don't want to maintain the button.
2121+2222+
2323+2424+## Range Finder Fields
2525+2626+You are free to chose the 1st field of the Range Finder, it's only used to switch on or off. If you want th Range Finder to switch on at the same time you press the Approach button, name it `Approach` too. The second field is the max distance of the Range Finder, it must be named `rLength` and you are free to chose the value you want to set it. The last field must be named `rD`, it's the current length of the beam.
2727+2828+
2929+3030+## Install the script
3131+3232+copy the content of the file `approach.yolol` on the basic chip
3333+3434+## options
3535+3636+On the 1st line of the script you can change 3 options:
3737+```
3838+a=15 b=150 c=1 if:rD>=:rLength thengoto1end goto:Approach+1
3939+```
4040+4141+- `a` is the distance you want to stop from the target in meters
4242+- `b` is the max speed your ship is capable. more this value is accurate, more the precision of the script will be good
4343+- `c` is a brake factor. If you ship is missing a bit of braking power, you can increase that value, it will multiply the thrust send to your brake.
4444+4545+## Usage
4646+4747+Point the beam on a target (eg: an asteroid) and press the button. The ship will adjust its speed and brake to reach the specified distance from the target.
4848+4949+## Support or donation
5050+5151+if you like it, [<img src="https://github.com/Jericho1060/DU-Industry-HUD/blob/main/ressources/images/ko-fi.png?raw=true" width="150">](https://ko-fi.com/jericho1060)