# Orbit Follower

Orbit location of interest using UAV

• Library:
• Robotics System Toolbox UAV Library

• ## Description

The Orbit Follower block generates heading and yaw controls for following a circular orbit around a location of interest based on the unmanned aerial vehicle's (UAV's) current pose. Select a UAV type of fixed-wing or multirotor UAVs. You can specify any orbit center location, orbit radius, and turn direction. A lookahead distance, LookaheadDistance, is used for tuning the path tracking and generating the LookaheadPoint output.

## Ports

### Input

expand all

Current UAV pose, specified as an `[x y z heading]` vector. `[x y z]` is the UAV's position in NED coordinates (north-east-down) specified in meters. `heading` is the angle between ground velocity and north direction in radians per second.

Example: `[1,1,-10,pi/4]`

Data Types: `single` | `double`

Center of orbit, specified as an `[x y z]` vector. ```[x y z]``` is the orbit center position in NED coordinates (north-east-down) specified in meters.

Example: `[5,5,-10]`

Data Types: `single` | `double`

Radius of orbit, specified as a positive scalar in meters.

Example: `5`

Data Types: `single` | `double`

Direction of orbit, specified as a scalar. Positive values indicate a clockwise turn as viewed from above. Negative values indicate a counter-clockwise turn. A value of `0` automatically determines the value based on the input to Pose.

Example: `-1`

Data Types: `single` | `double`

Lookahead distance for tracking the orbit, specified as a positive scalar. Tuning this value helps adjust how tightly the UAV follows the orbit circle. Smaller values improve tracking, but can lead to oscillations in the path.

Example: `2`

Data Types: `single` | `double`

Reset for counting turns, specified as a numeric signal. Any rising signal triggers a reset of the NumTurns output.

Example: `2`

#### Dependencies

To enable this input, select `rising` for External reset.

Data Types: `single` | `double`

### Output

expand all

Lookahead point on path, returned as an `[x y z]` position vector in meters.

Data Types: `double`

Desired heading, returned as numeric scalar in radians in the range of `[-pi, pi]`. The UAV heading is the angle of direction of the velocity vector relative to north measured in radians.

Data Types: `double`

Desired yaw, returned as numeric scalar in radians in the range of ```[-pi, pi]```. The UAV yaw is the forward direction of the UAV (regardless of the velocity vector) relative to north measured in radians.

Data Types: `double`

Cross track error from UAV position to path, returned as a positive numeric scalar in meters. The error measures the perpendicular distance from the UAV position to the closest point on the path.

#### Dependencies

This port is only visible if Show CrossTrackError output port is checked.

Data Types: `double`

Number of times the UAV has completed the orbit, returned as a numeric scalar. As the UAV circles the center point, this value increases or decreases based on the specified Turn Direction. Decimal values indicate partial completion of a circle. If the UAV cross track error exceeds the lookahead distance, the number of turns is not updated.

NumTurns is reset whenever Center, Radius, or TurnDirection are changed. You can also use the ResetNumTurns input.

#### Dependencies

This port is only visible if Show NumTurns output port is checked.

## Parameters

expand all

Type of UAV, specified as either `fixed-wing` or `multirotor`.

This parameter is non-tunable.

Select `rising` to enable the ResetNumTurns block input.

This parameter is non-tunable.

Output cross track error from the CrossTrackError port.

This parameter is non-tunable.

Output UAV waypoint status from the Status port.

This parameter is non-tunable.
{"ft_lang_label":"__label__en","ft_lang_prob":0.7719134,"math_prob":0.75055456,"size":588,"snap":"2020-34-2020-40","text_gpt3_token_len":126,"char_repetition_ratio":0.10445205,"word_repetition_ratio":0.0,"special_character_ratio":0.18537416,"punctuation_ratio":0.08695652,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.97554684,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-08-15T05:35:30Z\",\"WARC-Record-ID\":\"<urn:uuid:d8fe95ef-c653-4813-99f3-5101a7f89658>\",\"Content-Length\":\"96809\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:572d63e6-451f-4b7a-939e-bd555a4f4ba9>\",\"WARC-Concurrent-To\":\"<urn:uuid:252e5f35-594a-46da-853a-1786d457a166>\",\"WARC-IP-Address\":\"23.66.56.59\",\"WARC-Target-URI\":\"https://la.mathworks.com/help/robotics/ref/orbitfollower.html\",\"WARC-Payload-Digest\":\"sha1:UPX5WKP2D34CRFWUIQHCTOBZ5Z4FNMCG\",\"WARC-Block-Digest\":\"sha1:6XBXRAQ56O3PDVVMF3UWCMXFFTAVWZUP\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-34/CC-MAIN-2020-34_segments_1596439740679.96_warc_CC-MAIN-20200815035250-20200815065250-00506.warc.gz\"}"}