diff --git a/docs/README.md b/docs/README.md index ea78011..f164cee 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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 @@ -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 diff --git a/docs/USB Flashing.md b/docs/USB Flashing.md new file mode 100644 index 0000000..b11d761 --- /dev/null +++ b/docs/USB Flashing.md @@ -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 `` with your username): +``` +sudo usermod -a -G plugdev +``` + +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 \ No newline at end of file diff --git a/docs/assets/images/display-telemetry.jpg b/docs/assets/images/display-telemetry.jpg new file mode 100644 index 0000000..791a021 Binary files /dev/null and b/docs/assets/images/display-telemetry.jpg differ diff --git a/docs/assets/images/easing-1400x1160-27.png b/docs/assets/images/easing-1400x1160-27.png new file mode 100644 index 0000000..5638ae8 Binary files /dev/null and b/docs/assets/images/easing-1400x1160-27.png differ diff --git a/docs/assets/images/outquarteasing-1400x1011-74.jpg b/docs/assets/images/outquarteasing-1400x1011-74.jpg new file mode 100644 index 0000000..f103e88 Binary files /dev/null and b/docs/assets/images/outquarteasing-1400x1011-74.jpg differ diff --git a/docs/assets/images/telemetry-display.jpg b/docs/assets/images/telemetry-display.jpg new file mode 100644 index 0000000..791a021 Binary files /dev/null and b/docs/assets/images/telemetry-display.jpg differ diff --git a/docs/assets/images/zadig-dfu.png b/docs/assets/images/zadig-dfu.png new file mode 100644 index 0000000..b56d624 Binary files /dev/null and b/docs/assets/images/zadig-dfu.png differ diff --git a/docs/configuration-compass.md b/docs/configuration-compass.md index eb3b852..48b8c76 100644 --- a/docs/configuration-compass.md +++ b/docs/configuration-compass.md @@ -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. - + -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. - + ## 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 @@ -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. - + 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. @@ -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 @@ -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. diff --git a/docs/configuration-gps.md b/docs/configuration-gps.md index 09c45a0..e625ca0 100644 --- a/docs/configuration-gps.md +++ b/docs/configuration-gps.md @@ -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 diff --git a/docs/configuration-loading-firmware.md b/docs/configuration-loading-firmware.md index bd04156..8232b1b 100644 --- a/docs/configuration-loading-firmware.md +++ b/docs/configuration-loading-firmware.md @@ -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) diff --git a/docs/configuration-nopid-system.md b/docs/configuration-nopid-system.md new file mode 100644 index 0000000..dfac07f --- /dev/null +++ b/docs/configuration-nopid-system.md @@ -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) diff --git a/docs/configuration-nopid.md b/docs/configuration-nopid.md new file mode 100644 index 0000000..522309e --- /dev/null +++ b/docs/configuration-nopid.md @@ -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) diff --git a/docs/configuration-offset.md b/docs/configuration-offset.md new file mode 100644 index 0000000..161fd59 --- /dev/null +++ b/docs/configuration-offset.md @@ -0,0 +1,15 @@ +## Adjust the OFFSET + +While this step could be done after adjusting the PIDs, it is advisable to do it now to avoid accumulating errors during the configuration process. + +The function of the OFFSET parameter is to shift the north by the necessary degrees to ensure that our antenna points correctly to the north. For example, this is necessary when the controller is mounted in a way that the magnetometer is not aligned with the north. When entering CLI mode, the tracker always attempts to point to 0 degrees (North). If it doesn't do so correctly, and you've already adjusted the pan0 and PIDs and calibrated the magnetometer, it's possible that the OFFSET parameter needs to be adjusted. + +If you mounted the controller with the magnetometer aligned with the North, you may not need to touch this parameter unless you want to fine-tune it further. But if you mounted the controller in a different position, perhaps to have the micro USB connector on the side of the tracker box, then you need to adjust this parameter. For example, if you rotated the controller by 90 degrees: + +1. Enter CLI mode +2. Execute the command `set offset=90` +3. Save the settings with `save` + +We still need to adjust the PIDs. + +[<< Go back](README.md) diff --git a/docs/configuration-pan-servo.md b/docs/configuration-pan-servo.md index b266d9f..6b4ce77 100644 --- a/docs/configuration-pan-servo.md +++ b/docs/configuration-pan-servo.md @@ -1,3 +1,45 @@ +# Pan Servo Configuration + +It's time to connect the servos and the serial adapter through which telemetry will be received, for example, the Bluetooth module. + +Connect the battery to the tracker, initiating the startup sequence. + +If you configured the init_servos parameter to a value of 1, the tracker will rotate for no more than a second, and not very fast. It should stop just when the blue LED becomes steady, indicating that the startup sequence has completed. + +If you configured the **init_servos** parameter to a value of 0, none of the servos should move during the startup sequence. + +In any case, if the tracker continues to rotate after the startup sequence, it should not do so very quickly, as we have set the pan0 parameter with a value of 1500 as the stop pulse. You may need to adjust this value. + +The adjustment of the PAN0 value can be done in two different ways: + +- Manually +- Automatically (starting from version 6.6.x or higher). + +## Parameters + +Here are the configuration parameters that allow you to customize the pan servo's operation: + +- **init_servos** + - **Type:** Integer + - **Valid Range:** 0 or 1 + - **Description:** This parameter controls the behavior of the servos during the tracker's startup sequence. If set to 1, the tracker will rotate for a brief period, no longer than a second, at a moderate speed. It will automatically stop when the blue LED remains steadily on, indicating that the startup sequence has completed. If set to 0, none of the servos should move during the startup sequence. It's essential to note that if the tracker continues to rotate after the startup sequence, it should not do so at a high speed. This is because the `pan0` parameter has been configured with a value of 1500 as the stop pulse, and this value may require adjustment. + +- **calibration_pulse** + - **Type:** Integer + - **Valid Range:** Customizable + - **Description:** The calibration pulse represents the signal sent to move the pan servo during calibration. By default, it is set to 1400, but it may need adjustment based on your hardware's central stop pulse. + +- **pan0** + - **Type:** Integer + - **Valid Range:** Customizable + - **Description:** The central stop pulse (Pan0) is calculated as the midpoint between the lower and upper limits of the stop pulse range (min_pan0 and max_pan0). + +- **min_pan_speed** + - **Type:** Integer + - **Valid Range:** Customizable + - **Description:** Min Pan Speed is calculated as half of the difference between max_pan0 and pan0. It determines the minimum speed at which the servo starts moving. + + ## Automatic Pan Servo Calibration For automatic pan servo calibration process, the magnetometer sensor is required, and also a value for calibration pulse, which should be lower than the spected stop pulse. By default calibration pulse is 1400 because we spect a value arround 1500 for the central stop pulse. If you suspect that you have a central stop pulse different than the default one, you may change it to a more properly value. If your servo has a high dynamic range, then try set the calibration pulse not too far away from the suspected central stop pulse, in this way your servo will spin slower but during less time than with a further calibration pulse value (passing through the whole dynamic range is not needed for this calibration process). @@ -78,4 +120,4 @@ And finally the minimun increment to start moving: Rounded min_pan_speed = 9 -[<< Go back](README.md) \ No newline at end of file +[<< Go back](README.md) diff --git a/docs/configuration-pid-controller.md b/docs/configuration-pid-controller.md index 3120eec..6f007fd 100644 --- a/docs/configuration-pid-controller.md +++ b/docs/configuration-pid-controller.md @@ -1,14 +1,6 @@ ## PID Control -El firmware u360gs utiliza un sistema de control PID para calcular el pulso que debe suministrar al servo PAN para - -Los valores de P, I y D por defecto, al igual que el resto de parámetros de configuración, están ajustados para un servo TowerPro MG996R modificado para que gire 360º. Éstos valores van a depender de muchos factores: las resistencias que hayamos usado, la mecánica usada en el tracker, cuan ajustados estén todos los elementos, holguras, etc... - -Si tu tracker oscila para alcancar el objetivo, se pasa del objetivo ligeramente, o no llega necesitas ajustar estos parámetros. - -A continuación se muestra una explicación práctica de como ajustar los PIDs (gracais al compañero Simba): - -u360gts provides a PID control system in order to calculate the pwm pulses sent to pan servo. It makes possible that the antenna tracker to point towards the target with precisión and speed. +u360gts provides a PID control system in order to calculate the pwm pulses sent to pan servo. It makes possible the antenna tracker to point towards the target with precisión and speed. **Disabling NOPID** @@ -38,4 +30,4 @@ Then, do increase I value until you see that it bounces on the target, but cushi Finally, do increase the D to get it to react vividly, but always without oscillating around the target. ``` -[<< Go back](README.md) \ No newline at end of file +[<< Go back](README.md) diff --git a/docs/configuration-quick-start-guide.md b/docs/configuration-quick-start-guide.md index 3099a92..fdde342 100644 --- a/docs/configuration-quick-start-guide.md +++ b/docs/configuration-quick-start-guide.md @@ -1,6 +1,6 @@ ## INITIAL CONFIGURATION -Once you have assembled your antenna tracker you have to do a initial setup in order to get it working. Try to apply these steps in same order to do it with success: +Once you have assembled your antenna tracker and [loaded the firmware](configuration-loading-firmware.md) you have to do a initial setup in order to get it working. Try to apply these steps in same order to do it with success: 1.- **Enable OLED display** (Features --> Display). @@ -10,18 +10,26 @@ You may use up/down arrows until pan servo stops. If it stops within a range, yo The above two steps may be performed in a single one by clicking on "Calibrate pan" button. This is also useful in order to set min_pan_speed parameter, which is the increment necesary to reach the limits of the stop pulse range, so the pan servo may start moving. +[Read more...](configuration-pan-servo.md) + 3.- **Calibrate Compasss** by clicking "Calibrate mag". The antenna tracker will spin for 10 seconds in the same direction in order to perform the calibration. The direction of rotation depends on the value of calibration pulse parameter. This pulse is the same one used for servo pan calibration. After configuring pan0 and calibrating the magnetometer, we have to be sure that the corresponding "Calibrated" checkboxes are activated, otherwise the tracker will not move. These checkboxes are useful if we want to test the telemetry but we still do not want to move the servos. +[Read more...](configuration-compass.md) + 4.- **Configure OFFSET** parameter. If when giving the command to point north the tracker remains some degrees out of phase, yo must set offset parameter with that value (whithin 0 to 360 degrees). You may adjust it with the up and down arrows as well. +[Read more...](configuration-offset.md) + 5.- **Configure tilt parameters**, so that the servo tilt remains horizontal (tilt0) and vertical (tilt90). +[Read more...](configuration-tilt-servo.md) + 6.- **Select protocol and baud rate** to which you want the tracker to work. AUTODETECT feature may be activated in order to detect the protocol automatically. It is very useful if you have several aircrafts with different telemetry system. @@ -35,6 +43,8 @@ In case of not using Local GPS, and avoiding to use buttons to set home position Min Sats: 6 minimum, the higher, if your GPS takes many satellites, the better. Home: AUTO (From telemetry). +[Read more...](set-home.md) + 8.- **Configure start traking** parameters. The default values for distance and altitude might be a bit high. Try 5 for distance and 2 for altitude. Remember that tracking will start when the aircraft has overcome that fence. Once it lands and returns within those limits, the tracking ends. @@ -47,4 +57,8 @@ By default, the antenna tracker has feature NOPID enabled. It works out of the b Yo can use NOPID control for simulations and first real flights. But if you want more precision you will have to properly configure the PID for pan servo. The will get into action once feature NOPID is disabled. -[<< Go back](README.md) \ No newline at end of file +Read more: +- [Configure PID controller](configuration-pid-controller.md) +- [Configure NoPID system](configuration-nopid.md) + +[<< Go back](README.md) diff --git a/docs/configuration-serial-pot-for-gps.md b/docs/configuration-serial-pot-for-gps.md new file mode 100644 index 0000000..e6427b5 --- /dev/null +++ b/docs/configuration-serial-pot-for-gps.md @@ -0,0 +1,28 @@ +**Configuring Serial Port for Local GPS** + +Once **feature GPS** is enabled, the u360gts will try to talk with GPS through the default uart port for it. u360gts allows to connect GPS device in any free uart or softserial port. + +In order to asign a different port than default, the user should execute a serial command in CLI window: + +``` +serial port_number protocol_number baudrate1 baudrate2 baudrate3 baudrate4 + +save +``` + +For example, if we want to use uart2 (serial 1) at a baud rate of 9600. + + serial **1** **2** 115200 **9600** 115200 115200 + + save + +As shown, we use 1 for port_number, 2 for protocol_number, and 9600 for baudreate2 params. + +**Notes:** + - Param protocol_number set to 2 means that serial 1 is used for GPS. + - Params baudrate1, baudrate3 and baudrate4 are not used for GPS configuration, its values are not taken into account. + - All parameters have to be set, but we only port_number, protocol_number and baudrate2 will be take into account by u360gts firware. + +Once the serial port is asgined, the user may change baudrate from grafical user interfece by setting the dropdwon list box for Baud Rate. + +[<< Go back](configuration-gps.md) diff --git a/docs/configuration-serial0.md b/docs/configuration-serial0.md new file mode 100644 index 0000000..a3d7ecf --- /dev/null +++ b/docs/configuration-serial0.md @@ -0,0 +1,36 @@ +## Configuration of Serial Port 0 (UART1) + +After the first boot, our controller can only work with serial port 0 (UART1) at 115200 baud, initially dedicated to input telemetry. + +To change the baud rate of serial port 0 (UART1), execute the following command: + +``` +set telemetry_baud=value +``` + +In the parameters section, you'll find the values and their corresponding baud rates. + +It's also possible to configure the port with the following command: + +``` +serial 0 1 baudrate baudrate baudrate baudrate +``` + +In this case, "baudrate" should be replaced with the desired value. The "serial" command must include all six parameters; none can be omitted. For example, if you want to use UART1 at 9600 baud: + +``` +set telemetry_baud=2 +``` + +Or alternatively: + +``` +serial 0 1 9600 9600 9600 9600 +``` + +The value "0" indicates serial port number 0 (UART1). +The value "1" indicates that it is dedicated to telemetry. +The first "9600" value indicates that telemetry will operate at 9600 baud. +The remaining values are not considered for telemetry but are necessary to successfully execute the command. + +[<< Go back](README.md) diff --git a/docs/configuration-tilt-servo.md b/docs/configuration-tilt-servo.md new file mode 100644 index 0000000..6beda5e --- /dev/null +++ b/docs/configuration-tilt-servo.md @@ -0,0 +1,95 @@ +# Tilt Servo and Function Documentation + +## Tilt Servo Control Functions + +Before exploring the configuration, it's essential to understand the functions that control the tilt servo in the u360gts system. The tilt servo system consists of three essential components. The tilt angle is determined by calculating the vertical tilt angle based on relative altitude and distance between the target and tracker, with a maximum limit of 90 degrees. The tilt servo's position is updated to align with the desired angle, and it can apply smoothing for movement if enabled. Additionally, the system manages its activity, making decisions about whether the tracking system should be active or in a resting state. This includes functionalities such as telemetry loss detection and tracking decisions based on relative distance and altitude. + +## Tilt Servo Configuration + +Here are the configuration parameters that allow you to customize the tilt servo's operation: + +- **tilt_pin** + - Type: Integer + - Valid Range: 0 to 7 + - Defines the pin number used to control the tilt servo on your hardware. + +- **tilt0** + - Type: Integer + - Valid Range: 0 to 3000 + - Configures the PWM value corresponding to the 0-degree position of the tilt servo on your hardware. + +- **tilt90** + - Type: Integer + - Valid Range: 0 to 3000 + - Defines the PWM value corresponding to the 90-degree position of the tilt servo on your hardware. + +- **tilt_max_angle** + - Type: Integer + - Valid Range: 0 to 90 + - Configures the maximum angle to which the tilt servo can be tilted. This limits the tilt range. + +## Easing Effect + +The u360gts firmware provides a smoothing effect for the tilt servo's movement, especially useful for large antennas. This smoothing effect involves the tilt servo moving with deceleration towards the end, creating a damping effect. + +The image below illustrates the smoothing effect for the "Easing Out Quart" function, one of the available options. + +![Image 2](assets/images/outquarteasing-1400x1011-74.jpg) + +### Activate the Easing Effect +To activate the Easing smoothing effect, use the following command: +```plaintext +feature easing +``` +### Deactivate the Easing Effect + +To deactivate the Easing smoothing effect, use the following command: +``` +feature -easing +``` + +The following parameters allow you to adjust the smoothing of the tilt servo's movement: + +- **easing** + - Type: Integer + - Valid Values: 0, 1, 2, 3, 4 (see Easing Functions section) + - Selects the type of smoothing function applied to the tilt servo's movement. Options include no smoothing and two different smoothing types. + +- **easing_steps** + - Type: Integer + - Valid Range: 0 to 100 + - Defines the number of steps used in the smoothing function (if enabled). More steps result in smoother movement but may require more processing resources. + +- **easing_min_angle** + - Type: Integer + - Valid Range: 1 to 10 + - Configures the minimum angle required for the smoothing function to be applied. This avoids smoothing small changes in the tilt angle. + +- **easing_millis** + - Type: Integer + - Valid Range: 1 to 100 + - Sets the time in milliseconds during which the smoothing function is applied to the tilt servo's movement. + +## Easing Functions + +The u360gts firmware provides several easing functions that allow you to control the smoothing effect applied to the tilt servo's movement. These functions affect the rate of change of the tilt angle during tracking. Below are the available easing functions: + +![Image 3](assets/images/easing-1400x1160-27.png) + +- **Ease Out Quart (1)** + - This easing function produces a smooth deceleration effect towards the end of the tilt servo's movement. It results in a damping effect. + +- **Ease Out Circular (2)** + - EASE_OUT_CIRC creates a more linear slowing down effect compared to the quart function. + +- **Ease Out Exponential (3)** + - EASE_OUT_EXPO results in an exponential deceleration effect, gradually slowing down the tilt servo. + +- **Ease Out Cubic (4)** + - EASE_OUT_CUBIC creates a cubic deceleration effect, gradually slowing down the tilt servo's movement. + +You can choose one of these easing functions to control the smoothing effect during tilt servo movement by configuring the `easing` parameter. + +Please refer to the firmware documentation for more details on configuring and using these easing functions. + +[<< Go back](README.md) diff --git a/docs/display-description-and-operation.md b/docs/display-description-and-operation.md new file mode 100644 index 0000000..1f279ee --- /dev/null +++ b/docs/display-description-and-operation.md @@ -0,0 +1,36 @@ +## DISPLAY + +The u360gts firmware allows you to use OLED display devices on your antenna tracker to view information that helps you monitor the status of your model tracking, decide the best time to start your flight, check battery status, and more. + +Additionally, you can interact with the antenna tracker for basic configuration and adjustment tasks by using the MENU and HOME buttons. + +### Installation + +Please refer to the connection diagram in the [wiring schematics](install-wiring-schematics.md) section to connect the OLED Display to the controller. + +### Configuration + +To activate the display, enter CLI mode and execute the command: + +``` +feature display +``` + +To deactivate it: + +``` +feature -display +``` + +### Operation + +The display presents information on different pages, which can remain fixed or cycle through them: + +- Home Page +- CLI Mode (configuration) +- Calibration Page +- Telemetry Page (input) +- Local GPS Status +- Battery Monitoring + +[<< Go back](README.md) diff --git a/docs/display-gps.md b/docs/display-gps.md new file mode 100644 index 0000000..9c26209 --- /dev/null +++ b/docs/display-gps.md @@ -0,0 +1,28 @@ +# Display: GPS screen + +When FEATURE_GPS is enabled the display will show the GPS screen to show all information relative to the local GPS. + +- **Sat:** Numbers of satellites +- **Fix:** "Y" indicates possition fixed, and "N" indicate no fix. +- **Pos:** LAT/LON Position (degrees only). +- **Spd:** GPS speed +- **GC:** Ground Course +- **RX:** Count of received packets +- **ERRs:** Count of packets with errors +- **Dt:** Time elapsed (milliseconds) until receiving new data +- **TOs:** Count of timeouts. + +And finally, it shows a line where each symbol represents the status of lays packets received: + +- **?:** Packet has errors +- **!:** Packet has been ignored +- **>:** Packet has been skipped +- **g:** NMEA GGA packet received +- **r:** NMEA RMC packet received +- **O:** UBLOX SOL packet received +- **S:** UBLOX STATUS packet received +- **I:** UBLOX VSINFO packet received +- **P:** UBLOX PSLLH packet received +- **V:** UBLOX VELNED packet received + +[<< Go back](README.md) diff --git a/docs/display-supported-hardware.md b/docs/display-supported-hardware.md new file mode 100644 index 0000000..dfe5e46 --- /dev/null +++ b/docs/display-supported-hardware.md @@ -0,0 +1,17 @@ +## Supported OLED display devices + +The only supported OLED displays are the SSD1306 and UG-2864HSWEG01 models. + +### SSD1306 OLED Display + +The SSD1306 OLED display is a 128x64 OLED screen that is visible in bright sunlight, compact, and consumes very little power, making it ideal for use in our antenna tracker. + +You should choose your OLED display carefully before purchasing it because, although some models incorporate the SSD1306, they may require additional modifications. + +Here are several models in two different sizes that have been tested by our community users: + +- [0.96 Inch 4Pin White IIC I2C OLED Display Module 12864 LED For Arduino](http://www.banggood.com/0_96-Inch-4Pin-White-IIC-I2C-OLED-Display-Module-12864-LED-For-Arduino-p-958196.html) +- [0.96 Inch 4Pin IIC I2C Blue OLED Display Module For Arduino](http://www.banggood.com/0_96-Inch-4Pin-IIC-I2C-Blue-OLED-Display-Module-For-Arduino-p-969147.html) +- [I2c 2.42" 128x64 Graphic OLED Yellow Display (Arduino / Pic / multi-wii)](http://www.ebay.es/itm/201468080188?_trksid=p2057872.m2749.l2649&ssPageName=STRK%3AMEBIDX%3AIT) + +[<< Go back](README.md) diff --git a/docs/display-telemetry.md b/docs/display-telemetry.md new file mode 100644 index 0000000..841d724 --- /dev/null +++ b/docs/display-telemetry.md @@ -0,0 +1,19 @@ +# Display: Telemetry screen + +The Telemetry screen will show information about telemtry packets recieved from the aircraft/drone: + +![Image 2](assets/images/display-telemetry.jpg) + +- **Hz:** is the frequency at witch telemetry packets with data position are received. 0 means that frequency is under 1 Hz. +- **Sat:** number of satellites +- **FCS:** is the count of packets rejected because a bad CRC has been detected. +- **Lat:** Latitude +- **Lon:** Longitude +- **Alt:** Altitude from home possition +- **Dis:** Distance from home possition +- **H:** Tracker heading (Angle relative to north that the tracker is pointing to). +- **A:** Target heading (Angle relative to north that the tracker should be pointing to). +- **Of:** Offset trim value (min value -20º, max value 20º). If the user press the buttons during tracking the heading will be changed the heading will be modified as many degrees as this value indicates to try to get a better video signal. +- **[HOME SET](https://github.com/raul-ortega/u360gts/blob/master/docs/set-home.md):** indicates that the home position (tracker home position) is set by the local GPS. indicates that the home possition has been set from by the telemetry received from the aircraft/dron. + +[<< Go back](README.md) diff --git a/docs/hardware-frame.md b/docs/hardware-frame.md index 460553f..04e8573 100644 --- a/docs/hardware-frame.md +++ b/docs/hardware-frame.md @@ -1,6 +1,6 @@ # Oficial 3D printed frame - + As a quick start point you can print the official u360gts [3D printed frame](https://www.thingiverse.com/thing:3203850) of the project. @@ -22,6 +22,7 @@ Other alternatives are available for this project: - [u360gts, small frame by Ronald Pacheco](https://www.thingiverse.com/thing:3905502) - [u360gts, customized frame by Putimir Putkić Peternel](https://www.tinkercad.com/things/1oCpjHuYHRd) - [u360gts Mini Case, by Albert Kravcov](https://www.thingiverse.com/thing:4108944) +- [Tracker U360GTgts Mini, by Roberto Caballero](https://www.thingiverse.com/thing:4747850) [<< Go back](README.md) diff --git a/docs/hardware-list-of-components.md b/docs/hardware-list-of-components.md index 72e9beb..75ac892 100644 --- a/docs/hardware-list-of-components.md +++ b/docs/hardware-list-of-components.md @@ -2,21 +2,21 @@ **Please, take into account that the frame is still a work in progress and this list might change**. -This list of components is suitable for the [u360gts official 3d printted frame](https://github.com/raul-ortega/u360gts/blob/master/wiki/hardware-frame.md). +This list of components is suitable for the [u360gts official 3d printted frame](hardware-frame.md). **Note:** Other alternatives to this list are possible for other frames, please contact the community of users to get more information. - + - + ## Mandatory parts: -- 1 x CONTROLLER: [Naze32 rev5 acro](http://www.surveilzone.com/NAZE-32-Full-6DOF-REV-5-Flight-Controller-Board-g-1462) (if used with external magnetometer / [Naze32 rev5 full]() / [Flip32 10dof]() / [Spracing F3]() **waiting for real flight tests** -- 1 x [I2C 2.42" 128x64 Graphic OLED Yellow Display SSD1306/SSD1309(Arduino/PIC/Multi-wii)](https://www.ebay.es/itm/I2C-2-42-128x64-Graphic-OLED-Yellow-Display-SSD1309-Arduino-PIC-Multi-wii/201468080188?hash=item2ee86ef03c:g:Rc4AAOSw5ZBWQxoj). +- 1 x CONTROLLER: [Naze32 rev5 acro](http://www.surveilzone.com/NAZE-32-Full-6DOF-REV-5-Flight-Controller-Board-g-1462) / [Bluepill]() / [Naze32 rev5 full]() / [Flip32 10dof]() / [Spracing F3]() +- 1 x [I2C 2.42" 128x64 OLED Display SSD1306/SSD1309(Arduino/PIC/Multi-wii)](https://a.aliexpress.com/_BTcMTr). - 1 x TILT SERVO: [TowerPro MG996R](https://www.banggood.com/TowerPro-MG996R-Metal-Gear-Digital-High-Torque-Servo-55g-p-982287.html?p=LH07161453356201504A) - 1 x PAN SERVO : [TowerPro MG996R](https://www.banggood.com/TowerPro-MG996R-Metal-Gear-Digital-High-Torque-Servo-55g-p-982287.html?p=LH07161453356201504A) (You have to convert it to 360º) -- 2 x [Momentary Push Button Switch ](https://www.banggood.com/5Pcs-DC-50V-0_5A-Red-Knob-Momentary-Push-Button-Switch-p-1114676.html?p=LH07161453356201504A) +- 2 x [Momentary Push Button Switch ](https://www.banggood.com/10pcs-Momentary-Button-Switches-ON-or-OFF-Push-Button-Mini-Switches-250V-0_5A-p-1046059.html?p=LH07161453356201504A) - 1 x [5V 3A BEC](https://www.banggood.com/HENGE-UBEC-6V-6A-2-6S-Lipo-NiMh-Battery-Switch-Mode-BEC-p-1099336.html?p=LH07161453356201504A) - 1 X [Bluetooth module HC-05](https://www.banggood.com/5Pcs-HC-05-Wireless-Bluetooth-Serial-Transceiver-Module-For-Arduino-p-959211.html?p=LH07161453356201504A) - 2 x [Bearing 30mm x 55mm x 13mm](https://www.amazon.es/dp/B00TX2VJ60/) for pan. diff --git a/docs/img/flip32_wiring_full_schema.png b/docs/img/flip32_wiring_full_schema.png new file mode 100644 index 0000000..c97ee44 Binary files /dev/null and b/docs/img/flip32_wiring_full_schema.png differ diff --git a/docs/img/supported_mag.jpg b/docs/img/supported_mag.jpg deleted file mode 100644 index 221fffc..0000000 Binary files a/docs/img/supported_mag.jpg and /dev/null differ diff --git a/docs/incomming-telemetry-protocols.md b/docs/incomming-telemetry-protocols.md new file mode 100644 index 0000000..f39cfd2 --- /dev/null +++ b/docs/incomming-telemetry-protocols.md @@ -0,0 +1,24 @@ +## INCOMING TELEMETRY: PROTOCOLS + +The u360gts firmware is an antenna tracker control system capable of decoding the most popular radio control telemetry protocols. + +When you're out in the field, all you need to do is change the protocol and transmission speed (baud rate) through the configuration menu on the OLED display. + +### Supported Protocols + +- MFD +- GPS_TELEMETRY (direct NMEA from a GPS device) +- MAVLINK (v1) +- RVOSD +- FRSKY_D +- FRSKY_X (SMARTPORT) +- LTM (Light Telemetry) +- CROSSFIRE +- PITLAB + + +The default protocol when the system is first started is GPS TELEMETRY, with a baud rate of 115200. Our antenna tracker will be ready to receive direct telemetry in NMEA format, which can be provided by any compatible GPS module. In your aircraft, you can have a GPS module that sends data frames to the tracker through a telemetry serial link, such as those provided by OpenLRS systems. + +You can select the desired protocol from the configuration menu mode on the display or from CLI mode. + +[<< Go back](README.md) diff --git a/docs/incommint-telemetry-protocol-selection.md b/docs/incommint-telemetry-protocol-selection.md new file mode 100644 index 0000000..77916e0 --- /dev/null +++ b/docs/incommint-telemetry-protocol-selection.md @@ -0,0 +1,23 @@ +### SELECT PROTOCOL AND BAUD RATE (CLI MODE) + +To select the incoming telemetry protocol during the configuration process: + +1. Enter CLI mode. +2. Execute the command `set telemetry_protocol=value` (see values in the parameters section of this document). +3. Configure the baud rate for telemetry with `set telemetry_baud=value` (see the list of parameters at the end of this document). +4. Save the configuration using `save`. + +Note: Once you've selected the protocol, don't forget to configure UART1 with the necessary baud rate (the complete list of values is at the end of this document). If you're in the field and want to change the protocol without being connected to a computer: + +### SELECT PROTOCOL AND BAUD RATE (DISPLAY) + +To select the incoming telemetry protocol during the configuration process: + +1. Perform a long press on the menu button and release it. +2. The menu and option sequence is as follows: + TELEMETRY > PROTOCOL > SELECT PROTOCOL > EXIT + > BAUDRATE > SELECT BAUD RATE > SAVE + Navigate between options with short presses on the menu button. + Select the desired option with a short press on the home button. + +[<< Go back](README.md) diff --git a/docs/install-wiring-schematics.md b/docs/install-wiring-schematics.md index ecb221b..3cf04b1 100644 --- a/docs/install-wiring-schematics.md +++ b/docs/install-wiring-schematics.md @@ -1,5 +1,11 @@ # Wiring Schematics +## Flip32 + +![](img/flip32_wiring.png) + +![](img/flip32_wiring_full_schema.png) + ## Naze32 ![](img/Naze32_wiring.png) @@ -10,10 +16,6 @@ Naze32 Rev6 boards might fail to receive telemetry due to the USB-Serial chip bl ![](img/Naze32_rev6_cut_traces.jpg) -## Flip32 - -![](img/flip32_wiring.png) - ## Bluepill ![](img/bluepill_wiring.png) @@ -26,9 +28,3 @@ Naze32 Rev6 boards might fail to receive telemetry due to the USB-Serial chip bl ## SP Racing F3 ![](img/u360gts_spracingf3_wiring_schematics.png) - -## Crius SE - -![](img/Crius-SE_wiring.png) - -[<< Go back](README.md) \ No newline at end of file diff --git a/docs/set-home.md b/docs/set-home.md new file mode 100644 index 0000000..cd42c6e --- /dev/null +++ b/docs/set-home.md @@ -0,0 +1,112 @@ +# Set Home Possition + +There are different procedures to set the home position of your antenna tracker, depending if home button is used, a local GPS is present, home position from telemetry is configured or restore home position from last known feature is enabled. + +1. Automatic home from Local GPS +1. Update Home Continuously From Local GPS +1. Manual home from Local GPS +1. Automatic home from Telemetry +1. Manual home from Telemetry +1. Reset Home +1. Restore from Last Known + +## Automatic HOME from Local GPS + +When a local GPS is present, **FEATURE GPS** is**enabled**, and the GPS receives signals from more than a predetermined number of satellites set in **gps_min_sats**, the HOME position is established without the need to press the HOME button. + +Let's look at a practical example of automatic HOME establishment: + +1. The tracker is in telemetry mode. + +2. I observe the GPS page on the display. + It's active, but it hasn't received satellite signals yet. + +3. After a few seconds (or minutes), it displays a fix with 8 satellites + and coordinates. + +4. When switching to the telemetry page, the message appears + "HOME SET " + +5. I increase the throttle of the simulator (or initiate the takeoff of our model aircraft). + +6. The (virtual or real) aircraft moves away and exceeds the minimum distance. + +7. Tracking begins. + +## Update Home Continuously From Local GPS + +When the aircraft is in flight and tracking is being performed, u360gts firmware allows the antenna tracker to be moved to a different location than when the home position was established. This functionality is activated by setting update_home_by_local_gps parameter. Ones enabled, the home possition will be continuosly reset using Local GPS position. This allows you to move on foot, or even in a vehicle carrying the antenna tracker. + +## Manual Home With Local GPS + +In previous firmware versions, when adding a local GPS, it was not possible to activate the HOME position manually because its presence triggered automatic activation. If for some reason the GPS didn't receive signals from a sufficient number of satellites, or the minimum value set through the configuration was not met, it was not possible to initiate tracking of the model aircraft. This issue has been resolved in recent versions by incorporating a new algorithm that allows the establishment of the home position both automatically and manually. + +Let's imagine we have a LOCAL GPS, and the GPS doesn't lock onto the preconfigured number of satellites, let's say 8, because of poor satellite reception today. However, it manages to lock onto 5 or 6, which we might consider sufficient, and we don't want to wait for it to lock onto 8 or more, or because it might be impossible due to cloudy skies. + +In a situation like the one described, it's possible to set the home position with a single press of the HOME button. With this button press, you accept the 5 or 6 satellites that the local GPS is receiving, and the position is fixed. + +Here's an example of setting the HOME position: + +1. The tracker is in telemetry mode, the local GPS doesn't lock onto satellites, and + the message "HOME NOT SET" is displayed. + +2. I inject telemetry from the simulator (or receive it from the model aircraft). + +3. I observe the telemetry display, and it shows 11 satellites, + which is greater than or equal to the minimum number. + +4. I press the button once (a single press). + +5. The display shows "HOME SET " + +6. I increase the throttle of the simulator (or initiate the takeoff of our model aircraft). + +7. The (virtual or real) aircraft moves away and exceeds the minimum distance. + +8. Tracking begins. + +## Automatic Home from Telemetry + +Thanks to this new feature local GPS is needed no more for auto tracking (unless you are planning to pilot your aircraft from a mobile platform like a car or a ship, in that case local GPS is mandatory becaus the tracker home position have to be updated continiously), and no button have to be pressed in order to set home position from telemetry (). + +In order to use this feature you have to disable local GPS and set AUTO mode to telemetry_home parameter: + +``` +feature -GSP +set telemetry_home=AUTO +``` + +Note: If you want to set home manually, leave telemetry_home parameter value as DEFAULT. + +You also have to set telemetry_min_sats parameter with the desired number of sats as the condition necessary for home position to be set: + +``` +set telemetry_min_sats=6 +``` + +Please, be aware that the tracker will never know which is the home position that the autopilot has set for the aircraft because no frame from the telemetry stream that might carry it on is processed. + +The procedure to set home automatically is described bellow: + +0. Tracker and Aircraft have no power. +1. User powers the aircraft. +2. Aircraft set its own home position. +3. User checks information displayed on his ground control software or OSD data. +4. User thiks that he has a good and stable gps signal and decide that it is a good moment to power on the tracker system. +5. The tracker receives telemetry data from the aircraft and if the "min number of sats" condition is overcome it will use the next lat/lon data arrived as home position. + +## Resetting the HOME Position + +To reset the HOME position, press and hold the HOME button for 3 seconds or more. + +The process of establishing the HOME position will start again, allowing you to activate it manually or automatically. + +## Restore Last Known Home Position + +If enabled, the antenna tracker will store the home position in the non volatile memory once it has been established. If durin tracking a power reset ocurrs (e.g the users replaces the battery), the home position will be restored (HOME SET LAST will be shown on display) and tracking will continue normally without the need of landing. + +This functionality may be enabled by setting **restore_last_home** parameter to ON. After enabled, home_lat, home_lon and home_alt provide 0 values by default. Once home position is set, either from telemetry, gps or by pressing the home button, the antenna tracker will store the home position values on those parameters. After a power reset, the antenna tracker will read the stored values and restore the home position. + +**Note:** stored lat/lon/alt values may be changed if desired before flying from a different location, the user may press home button for more than 3 seconds in order to get a new home position from the incoming telemetry stream or from local gps. + +[<< Go back](README.md) diff --git a/other-releases/amv-open360tracker_CC3D_dev11.0.1.zip b/other-releases/amv-open360tracker_CC3D_dev11.0.1.zip deleted file mode 100644 index a57fd5c..0000000 Binary files a/other-releases/amv-open360tracker_CC3D_dev11.0.1.zip and /dev/null differ diff --git a/other-releases/amv-open360tracker_FRSKY_X_CRC_FIX_ALL_TARGETS.zip b/other-releases/amv-open360tracker_FRSKY_X_CRC_FIX_ALL_TARGETS.zip new file mode 100644 index 0000000..f02ef12 Binary files /dev/null and b/other-releases/amv-open360tracker_FRSKY_X_CRC_FIX_ALL_TARGETS.zip differ diff --git a/other-releases/amv-open360tracker_QMC_COMPASS_dev11.1.0.zip b/other-releases/amv-open360tracker_QMC_COMPASS_dev11.1.0.zip deleted file mode 100644 index 3e331b0..0000000 Binary files a/other-releases/amv-open360tracker_QMC_COMPASS_dev11.1.0.zip and /dev/null differ diff --git a/other-releases/amv-open360tracker_SPRACINGF3_SH 1106.zip b/other-releases/amv-open360tracker_SPRACINGF3_SH 1106.zip new file mode 100644 index 0000000..aa9b0b4 Binary files /dev/null and b/other-releases/amv-open360tracker_SPRACINGF3_SH 1106.zip differ diff --git a/other-releases/amv-open360tracker_dev11.01.zip b/other-releases/amv-open360tracker_dev11.01.zip deleted file mode 100644 index 578a034..0000000 Binary files a/other-releases/amv-open360tracker_dev11.01.zip and /dev/null differ diff --git a/other-releases/amv-open360tracker_dev11.1.0.zip b/other-releases/amv-open360tracker_dev11.1.0.zip new file mode 100644 index 0000000..48dc185 Binary files /dev/null and b/other-releases/amv-open360tracker_dev11.1.0.zip differ diff --git a/other-releases/amv-open360tracker_dev11.2.0_calibration_pulse_range.zip b/other-releases/amv-open360tracker_dev11.2.0_calibration_pulse_range.zip new file mode 100644 index 0000000..0c72145 Binary files /dev/null and b/other-releases/amv-open360tracker_dev11.2.0_calibration_pulse_range.zip differ diff --git a/src/main/io/display.c b/src/main/io/display.c index 3a040d9..2ed69cf 100755 --- a/src/main/io/display.c +++ b/src/main/io/display.c @@ -928,12 +928,6 @@ void showBatteryPage(void) i2c_OLED_set_line(rowIndex++); i2c_OLED_send_string(lineBuffer); - uint16_t averageCellVoltage = ((float) vbat / batteryCellCount) * 10; - tfp_sprintf(lineBuffer, "Avg. Cell: %d.%02dv", averageCellVoltage / 100, averageCellVoltage % 100); - padLineBuffer(); - i2c_OLED_set_line(rowIndex++); - i2c_OLED_send_string(lineBuffer); - uint8_t batteryPercentage = calculateBatteryPercentage(); i2c_OLED_set_line(rowIndex++); drawHorizonalPercentageBar(SCREEN_CHARACTER_COLUMN_COUNT, batteryPercentage); diff --git a/src/main/tracker/frskyx.c b/src/main/tracker/frskyx.c index 4632838..d2d9666 100755 --- a/src/main/tracker/frskyx.c +++ b/src/main/tracker/frskyx.c @@ -2,7 +2,7 @@ * This file is part of u360gts, aka amv-open360tracker 32bits: * https://github.com/raul-ortega/amv-open360tracker-32bits * - * The code below is an adaptation by Raúl Ortega of the original code written by Samuel Brucksch: + * The code below is an adaptation by Raúl Ortega of the original code written by Samuel Brucksch: * https://github.com/SamuelBrucksch/open360tracker * * u360gts is free software: you can redistribute it and/or modify @@ -22,7 +22,6 @@ #include "config.h" #include "telemetry.h" -#include void processFrskyPacket(uint8_t *packet); void parseTelemHubByte(uint8_t c); @@ -46,7 +45,7 @@ int32_t coordToLong(int8_t neg, uint16_t bp, uint16_t ap); #define GPS_LAT_AP_ID 0x1B #define GPS_LONG_EW_ID 0x22 #define GPS_LAT_NS_ID 0x23 -#define FRSKY_LAST_ID 0x3f +#define FRSKY_LAST_ID 0x3F //used for sats and fix type #define TEMP2 0x05 @@ -56,10 +55,8 @@ int32_t coordToLong(int8_t neg, uint16_t bp, uint16_t ap); #define bitmask(X,Y) (((1 << X) -1) << Y) // FrSky new DATA IDs (2 bytes) -#define VFAS_FIRST_ID 0x0210 -#define VFAS_LAST_ID 0x021f -#define ALT_FIRST_ID 0x0100 -#define ALT_LAST_ID 0x010f +#define ALT_FIRST_ID 0x0100 +#define ALT_LAST_ID 0x010f #define T2_FIRST_ID 0x0410 #define T2_LAST_ID 0x041f #define GPS_LONG_LATI_FIRST_ID 0x0800 @@ -75,7 +72,7 @@ int32_t coordToLong(int8_t neg, uint16_t bp, uint16_t ap); #define TELEMETRY_OK 1 #define TELEMETRY_KO 2 -#define FRSKY_RX_PACKET_SIZE 8 +#define FRSKY_RX_PACKET_SIZE 9 #define FRSKYX_LATLON_DIVIDER 1000000 @@ -96,9 +93,6 @@ uint16_t lon_bp; uint16_t lat_ap; uint16_t lon_ap; -//VFAS sensor = voltage -int16_t telemetry_voltage; - int32_t frskyx_setLat() { int32_t value = coordToLong(NS == 'N' ? 1 : -1, lat_bp, lat_ap); NS = 0; @@ -151,20 +145,6 @@ void processHubPacket(uint8_t id, uint16_t value) fix = value % 10; } else if (telemetry_provider == TELEMETRY_PROVIDER_INAV){ sats = value % 100; - - if ((value >= 1000) && (value < 2000)) { - telemetry_fixtype = 1; - } - else if ((value >= 2000) && (value < 3000)) { - telemetry_fixtype = 2; - } - else if (value >= 3000) { - telemetry_fixtype = 3; - } - else { - telemetry_fixtype = 0; - } - } else sats = value; break; @@ -193,12 +173,14 @@ bool checkSportPacket_V1(uint8_t *packet) static uint8_t checkSportPacket_V2(uint8_t * packet) { short crc = 0; - for (int i=1; i> 8; // 0-1FF - crc &= 0x00ff; // 0-FF + for (int i = 1; i < FRSKY_RX_PACKET_SIZE; i++) { + crc += packet[i]; //0-1FF + crc += crc >> 8; //0-100 + crc &= 0x00ff; + crc += crc >> 8; //0-0FF + crc &= 0x00ff; } - return 0x00ff - crc; + return (crc == 0x00ff); } #define SPORT_DATA_U8(packet) (packet[4]) @@ -226,9 +208,6 @@ void processSportPacket(uint8_t *packet) uint8_t id = (uint8_t)appId; uint16_t value = HUB_DATA_U16(packet); processHubPacket(id, value); - } - else if (appId >= VFAS_FIRST_ID && appId <= VFAS_LAST_ID) { - telemetry_voltage = SPORT_DATA_S32(packet); //get voltage } else if (appId >= T2_FIRST_ID && appId <= T2_LAST_ID) { if(telemetry_provider == TELEMETRY_PROVIDER_DIY_GPS){ @@ -236,25 +215,11 @@ void processSportPacket(uint8_t *packet) //fix = SPORT_DATA_S32(packet) % 10; } else if (telemetry_provider == TELEMETRY_PROVIDER_INAV){ sats = SPORT_DATA_S32(packet) % 100; - if ((SPORT_DATA_S32(packet) >= 1000) && (SPORT_DATA_S32(packet) < 2000)) { - telemetry_fixtype = 1; - } - else if ((SPORT_DATA_S32(packet) >= 2000) && (SPORT_DATA_S32(packet) < 3000)) { - telemetry_fixtype = 2; - } - else if (SPORT_DATA_S32(packet) >= 3000) { - telemetry_fixtype = 3; - } - else { - telemetry_fixtype = 0; - } } else { //we assume that other systems just send the sats over temp2 and fix over temp1 sats = SPORT_DATA_S32(packet); } } - - else if (appId >= GPS_SPEED_FIRST_ID && appId <= GPS_SPEED_LAST_ID) { //frskyData.hub.gpsSpeed_bp = (uint16_t) (SPORT_DATA_U32(packet) / 1000); } @@ -266,7 +231,6 @@ void processSportPacket(uint8_t *packet) telemetry_alt = alt; gotAlt = true; } - else if (appId >= GPS_LONG_LATI_FIRST_ID && appId <= GPS_LONG_LATI_LAST_ID) { uint32_t gps_long_lati_data = SPORT_DATA_U32(packet); uint32_t gps_long_lati_b1w, gps_long_lati_a1w;