Skip to content

Commit

Permalink
Merge branch 'master' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
raul-ortega authored Oct 28, 2024
2 parents 9fbf26f + 03df6b7 commit 4b8b6cc
Show file tree
Hide file tree
Showing 40 changed files with 709 additions and 141 deletions.
25 changes: 13 additions & 12 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
- [Wiring schematics](install-wiring-schematics.md)

## Configuration

- [Quick Start Guide](configuration-quick-start-guide.md)
- [Loading the firmware](configuration-loading-firmware.md)
- [Configurator](https://github.com/raul-ortega/u360gts-configurator)
- [Magnetometer](configuration-compass.md)
- Pan servo
- Tilt servo
- OFFSET setting
- [Pan servo](configuration-pan-servo.md)
- [Tilt servo](configuration-tilt-servo.md)
- [OFFSET setting](configuration-offset.md)
- [PID Control](configuration-pid-controller.md)
- NOPID control system
- [NOPID control system](configuration-nopid-system.md)
- [GPS](configuration-gps.md)

## Incoming Telemetry

- Supported protocols
- Configuring serial 0 (UART1)
- Protocol selection
- [Supported protocols](incomming-telemetry-protocols.md)
- [Configuring serial 0 (UART1)](configuration-serial0.md)
- [Protocol selection](ncommint-telemetry-protocol-selection.md)

## CLI mode

Expand All @@ -40,15 +40,16 @@
- Full list of parameters

## Display

- Description and operation
- Enable/Disable display
- [Supported hardware](display-supported-hardware.md)
- [Description and operation](display-description-and-operation.md)
- [GPS screen](display-gps.md)
- [Telemetry screen](display-telemetry.md)

## Local GPS

- Installation
- Settings
- Set HOME position
- [Set HOME position](set-home.md)

## Outgoing Telemetry

Expand Down
40 changes: 40 additions & 0 deletions docs/USB Flashing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# USB Flashing

## Charging-Only Cables

If you see no signs of life on your host computer when you plug in your board, check your cable with your mobile phone or some other USB device - some charging cables have only the power pins connected. These will power up the board, so the leds light up, but the host computer will not react to the device at all. You need a proper USB cable to connect your board to the u360gts configurator.

## Platform Specific: Windows

u360gts configurator can have problems accessing USB devices on Windows. A solution could be to replace the ST driver with a libusb driver.The easiest way to do that is to download [Zadig](http://zadig.akeo.ie/).
With the board connected and in bootloader mode:
* Open Zadig
* Choose Options > List All Devices
* Select `STM32 BOOTLOADER` in the device list
* Choose `WinUSB (v6.x.x.x)` in the right hand box
![Zadig Driver Procedure](assets/images/zadig-dfu.png)
* Click Replace Driver
* Restart Chrome (make sure it is completely closed, logout and login if unsure)
* Now the DFU device should be seen by Configurator

## Platform Specific: Linux

Linux requires udev rules to allow write access to USB devices for users. An example shell command to acheive this on Ubuntu is shown here:
```
(echo '# DFU (Internal bootloader for STM32 MCUs)'
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="df11", MODE="0664", GROUP="plugdev"') | sudo tee /etc/udev/rules.d/45-stdfu-permissions.rules > /dev/null
```

This assigns the device to the plugdev group(a standard group in Ubuntu). To check that your account is in the plugdev group type `groups` in the shell and ensure plugdev is listed. If not you can add yourself as shown (replacing `<username>` with your username):
```
sudo usermod -a -G plugdev <username>
```

If you see your ttyUSB device disappear right after the board is connected, chances are that the ModemManager service (that handles network connectivity for you) thinks it is a GSM modem. If this happens, you can issue the following command to disable the service:
```
sudo systemctl stop ModemManager.service
```

If your system lacks the systemctl command, use any equivalent command that works on your system to disable services. You can likely add your device ID to a blacklist configuration file to stop ModemManager from touching the device, if you need it for cellural networking, but that is beyond the scope of u360gts documentation.

If you see the ttyUSB device appear and immediately disappear from the list in u360gts configurator when you plug in your flight controller via USB, chances are that NetworkManager thinks your board is a GSM modem and hands it off to the ModemManager daemon as the flight controllers are not known to the blacklisted
Binary file added docs/assets/images/display-telemetry.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/easing-1400x1160-27.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/telemetry-display.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/zadig-dfu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 9 additions & 9 deletions docs/configuration-compass.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ u360gts requires a compass sensor for tracking. When a compass is pressent, is c

## Supported Sensors

In the moment of writting this document, u360gts supports only HMC5883L compass sensor. Supported boards with built in mag are HMC5883L. But if you need to install an external compass, you must select products with the chip marked as L883. Avoid buying sensors with chip marked as AD because they are not supported yet. To be sure about what you are buying you must ask the seller, because he might be providing not supported chips while in the product description is specified HMC5883L.
In the moment of writing this document, u360gts supports HMC5883L and QMC5583L compass sensors. To be sure about what you are buying you must ask the seller, because he might be providing not supported chips while in the product description is specified the supported ones.

<img src="https://github.com/raul-ortega/u360gts/blob/master/wiki/img/supported_mag.jpg" width="525" />
<!-- img src="img/supported_mag.jpg" width="525" /-->

u360gts firmware can detect the compass. To check if the compass of your board (or the external one) is the supported one, in CLI window of configurator type the command "status". The response will show HMC5883 if it is detected.
u360gts firmware can detect the compass. To check if the compass of your board (or the external one) is supported, in CLI window of configurator type the command "status". The response will show HMC5883 or QMC5883 if detected.

<img src="https://github.com/raul-ortega/u360gts/blob/master/wiki/img/CLI_status_mag.jpg" width="433" />
<img src="img/CLI_status_mag.jpg" width="433" />


## Wiring

Take a look to [wiring schematics](https://github.com/raul-ortega/u360gts/blob/master/wiki/install-wiring-schematics.md) to get more information about how to connect an external mag.
Take a look to [wiring schematics](install-wiring-schematics.md) to get more information about how to connect an external mag.


## Configuration
Expand All @@ -25,11 +25,11 @@ Take a look to [wiring schematics](https://github.com/raul-ortega/u360gts/blob/m

u360gts locks pan servo movement if the compass is not pressent or if its not calibrated. You may calibrate the compass at home for the first time, but some times might be necesary to calibrate it again in the flight field.

Note: Before mag calibration you should [configure the pan servo](https://github.com/raul-ortega/u360gts/blob/master/wiki/configuration-pan-servo.md).
Note: Before mag calibration you should [configure the pan servo](configuration-pan-servo.md).

To calibrate the compass from configurator go to Configuration -> Mag, and clic on Calibrate Mag button.

<img src="https://github.com/raul-ortega/u360gts/blob/master/wiki/img/mag_configuration.jpg" width="527" />
<img src="img/mag_configuration.jpg" width="527" />

The controller will send the calibration pulse to the servo, and it will start spinning. During 10 seconds the controller will retrieve data from the sensor and will calculate magzero x, y and z values. Then the controller sends the stop pulse to the servo, it will stop spinning and calibration will be finished.

Expand All @@ -56,7 +56,7 @@ e.g set offset to 90 if the board/mag is rotated 90 degrees.

### External Mag Alignment

When using external mag, you have to be sure that the magnetometer is aligned with the arrow of the board pointing to the front and it is not placed upside down. If it is rotated and/or flipped, then you have to configure the align_mag parameter with one of this values:
When using external mag, you have to be sure that the magnetometer is aligned with the arrow of the board pointing to the front and it is not placed upside down. If it is rotated and/or flipped, then you have to configure the align_mag parameter with one of these values:

DEFAULT
CW0
Expand All @@ -71,7 +71,7 @@ CW270FLIP

### Magnetic Declination

To change magnetic declination you have to set correct declination of your spesific location, which can be found [here](www.magnetic-declination.com).
To change magnetic declination you have to set correct declination of your spesific location, which can be found [here](http://www.magnetic-declination.com).

If your magnetic declination readings are e.g. +3° 34' , the value entered in the u360gts configurator is 334. For west declination, use a minus value, e.g. for 1° 32' W, the value entered in the u360gts configurator is -132. In all cases (both CLI and GUI), the least significant digits are minutes, not decimal degrees.

Expand Down
14 changes: 7 additions & 7 deletions docs/configuration-gps.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ Two GPS protocols are supported. NMEA text and UBLOX binary.

Enable the GPS as follows:

1. Connect your GPS to the serial port for GPS.
1. [Configure a serial port to use for GPS.](configuration-serial.md)
1. Enable the `feature GPS`
1. Set your GPS baud rate
1. set the `GPS provider`
1. save and reboot.
1. Connect your GPS to the desired serial port.
2. [Configure serial port to be used by GPS.](configuration-serial-pot-for-gps.md)
3. Enable the `feature GPS`
4. Set your GPS baud rate
5. set the `GPS provider`
6. save and reboot.

Note: GPS packet loss has been observed at 115200. Try lower baud rate if you experience this.

For the connections step check the [wiring documentation](hardware-wiring-schematics.md) for pins and port numbers.
For the connections step check the [wiring documentation](install-wiring-schematics.md) for pins and port numbers.

### GPS Provider

Expand Down
88 changes: 59 additions & 29 deletions docs/configuration-loading-firmware.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,72 @@
## Loading firmware
## Loading the Firmware

In this moment the u360gts-configurator tools can not be used to flash the firmware on the board, but it can help to force the board into boot mode.
**u360gts configurator** is the official tool for supported boards, it can be downloaded from [releases page](https://github.com/raul-ortega/u360gts-configurator/releases/latest).
It is a crossplatform tool that can be run on Windows, MacOS and Linux machines, and **standalone application**

There are serveral options:
Download the binaries for your operating system and install it following the wizard instructions (Linux users must follow nw.js [instructions](https://github.com/nwjs/nw.js#documents) in order to build and/or run the configurator source code).

- Using the STM Micro electronics tool [Flash Loader Demonsrator](https://www.st.com/en/development-tools/flasher-stm32.html)
- Using Betaflight/iNav configurator.
### Flashing the Firmware

**Note: This wiki will focuse only on STM Micro electronics tool.**
Please, follow this instructions for firmware flashing:

Please, follow this instructions in orther to install the firmware on the board with success.
1. **Download** and **install** u360gts configurator.
2. **Launch** the application after installation.
3. **Jumper** the **boot pins** of the board.
4. Connect the usb cable to your computer.

Download first the firmware [latest release](https://github.com/raul-ortega/u360gts/releases/latest).
If [STM32 drivers](https://zadig.akeo.ie/) for the board are already installed, the new COM port will be shown and selected in the dropdown ports list.

5. Click on **Flash Firmware** tab of left panel.
6. **Choose** your **board**.
7. **Choose** the lastest **firmware version** available.
8.Click on **Load Firmware Online**.

### Flashing for the first time
During firmware downloading process the button will be disabled, once downloaded the button will be back to orange again and release info will be shown (read it carefully).

9. Enable **Full chip erase** option.
10. Enable **Manual baud rate** option and select **115200**.
11. Click on **Flash Firmware** button.

1. Download the hex file for your controller board.
2. Turn on your controller board in "boot mode". For NAZE32/Flip32 you have to bridge boot pins before giving power.
3. Run Flash Loader Demonstrator (download from [here](https://www.st.com/en/development-tools/flasher-stm32.html).)
The proggress bar animation will start and will show **Flashing** while loading the firmware to the board. After that **Verifying** will be shown and finally, if everything went well, **Programming successful** message will apear on the bar.

If something went wrong an error message will be shown on the bar. Please read carefully **Warning** and **Recovery/Lost communication** notes on screen to get it solved.

12. Disconnect the usb cable.
13. **Remove the jumper** from the boot pins.

### Connecting for the First Time.

Please, follow this instructions for connecting to the board from u360gts configurator:

1.- Connect the **usb cable** to your computer.

If [STM32 drivers](https://zadig.akeo.ie/) for the board are already installed, the new COM port will be shown and selected in the dropdown ports list.

2.- Select **115200** baud rate from the dropdwon list.

3.- Click on **Connect** button (top right corner).

If everything went well **Configuration tab** will be shown, and board name, firmware version and date/time will be shown on the *Log* window. You are ready for configuring your u360gts antenna tracker.

### Alternative Flashing Methods.

- Using the STM Micro Electronics tool [Flash Loader Demonsrator](https://www.st.com/en/development-tools/flasher-stm32.html)
- Using Betaflight configurator or iNav configurator.

In this cases you must [download](https://github.com/raul-ortega/u360gts/releases/latest) first u360gts firmware for your board.

#### Flash Loader Demonstrator

Instructions:

1. Download the hex file for your controller board from [here](https://github.com/raul-ortega/u360gts/releases/latest).
2. Turn on your controller board in "boot mode". For NAZE32, Flip32 and SP Racinfg F3 boards you have to bridge boot pins before giving power.
3. Run Flash Loader Demonstrator (download from [here](https://www.st.com/en/development-tools/flasher-stm32.html)).
4. Select port, baud rate, and next.
5. Browse and select the hex file, select Global Erase and Jump to user program options, and next.
6. After flashing close Flash Loader Demonstrator.
7. Run u360gts configurator, select 115200 bauds, press Connect and CLI ENTER buttons.

### Upgrading from previous version

1. Download the hex file for your controller board.
2. Select baud rate, connect and press CLI ENTER button
3. Go to Cli Mode tab, press BACKUP Config and save the configuration file.
4. Press BOOT MODE button.
5. Run Flash Loader Demonstrator (download from [here](https://www.st.com/en/development-tools/flasher-stm32.html).)
6. Select port, baud rate, and next.
7. Browse and select the hex file, select Global Erase and Jump to user program options, and next.
8. After flashing close Flash Loader Demonstrator.
9. Go to u360gts configurator, select 115200 bauds, press Connect and CLI ENTER buttons.
10. Go to Cli Mode tab and press RESTORE CONFIG.
11. Save and you are done.

After this you are ready to connect and enter CLI Mode in order to configure the new features.
7. Run u360gts configurator, select 115200 bauds, and press Connect button.

You can also take a look to this [video](https://www.youtube.com/watch?v=VDNJUsWvI0o).

[<< Go back](README.md)
22 changes: 22 additions & 0 deletions docs/configuration-nopid-system.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
## NOPID System

u360gts firmware provides by default a system to control the movement of pan servo, which is more user friendly to configure than PID control systems.

**NOPID** system adds corrections in a proportional way to the difference between the aircraft and tracker headings, mapping the difference on a range of PWM pulses
taking into account the velues of its configuration parameters.

For big angles the tracker moves fast, and in the same way, and for small angles the movement is slower, but always it moves proportionally, avoiding oscillations because the target never is overcome.

**Configuration Parameters**

- **nopid_min_delta**: The min angle (degrees) between tracker and aircraft heading. If the difference is greater than this value then the servo moves the tracker. f it is lower or equal then the servo stops.

- **nopid_max_speed**: Maximun increment (microseconds) of pan0 pulse in order to start moving. The higher its value the faster it moves. The lower its value, the movement will be slower.

- **nopid_map_angle**: The pulse sent to the pan servo is calculated as a mapping function between 0 and the value (degrees) indicated in this parameter. If the difference between the heading of the tracker and heading of the aircraft is equal to or greater than this angle, the pulse is increased by the value indicated in nopid_max_speed. If the difference is smaller, then the increment is calculated as a mapping function, where the minimum increment is 0 and the maximum is nopid_max_speed. The higher the value of this parameter, the slower and smoother the movement will be. The lower the value, the faster and sharper the movements will be.

Also has to be taken into account the following parameter:

- **min_pan_speed**: Minimum increment (microseconds) of pan0 pulse in order to start the movement.

[<< Go back](README.md)
39 changes: 39 additions & 0 deletions docs/configuration-nopid.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
## No-PID Servo PAN Control System

The u360gts firmware also includes a servo PAN control system that does not use PID (which was used in the 8-bit version). This system is more intuitive to configure than the traditional PID system. If you're using a slow servo, this system can improve tracker tracking by performing more precise and fluid movements. Even when using fast servos, this system also allows for configuration.

### Operation

The system proportionally corrects the difference between the tracker's heading and the model aircraft's heading, mapping this difference to a range of PWM pulses for the servo based on the configuration parameter values. When there's a large angle to cover between the tracker's heading and the aircraft's heading, the tracker moves quickly, and when it's smaller, it moves more slowly. This movement is always proportional, preventing oscillations as the destination is never exceeded.

### Activating NOPID

To activate this feature, you can use the command:

```
feature nopid
```

To deactivate the feature:

```
faeture -nopid
```

### Configuration Parameters

Below are the parameters exclusively used to configure the servo PAN control system:

- `nopid_min_delta`: This value is the minimum angle in degrees between the tracker's heading and the model aircraft's heading. If the difference is greater than this value, the tracker moves. If it's equal to or less than this value, the tracker stops.

- `nopid_max_speed`: The maximum amount in milliseconds by which the pan0 pulse must be increased to make it move. A higher value results in faster movements, while a lower value results in slower movements.

- `nopid_map_angle`: The pulse sent to the PAN servo is calculated as a mapping function between 0 and the value (in degrees) indicated in this parameter. If the difference between the tracker's heading and the model aircraft's heading is equal to or greater than this angle, the pulse is increased by the value indicated in `nopid_max_speed`. If the difference is less, then the increment value is calculated as a mapping function, where the minimum increment is 0, and the maximum is `nopid_max_speed`. A higher value for this parameter results in slower and smoother movement, while a lower value results in faster and more abrupt movements.

In addition, please take note of the following parameter:

- `min_pan_speed`: The minimum amount in milliseconds by which the pan0 pulse must be increased to make the servo move.

Note: The `min_pan_speed` parameter is common to both control systems and serves the same function.

[<< Go back](README.md)
Loading

0 comments on commit 4b8b6cc

Please sign in to comment.