Aero.trajectory.merge
R2026bMerge two trajectories into a single unified trajectory with a smooth transition
Since R2026b
Syntax
Description
merges two trajectory signals into a single unified trajectory using the specified
transition trajectory type to smoothly connect the endpoints. The function can handle
trajectories that differ in data types, unit systems, and time alignment, which makes it
useful for working with pre-existing trajectories.combinedTrajectory = Aero.trajectory.merge(trajectory1,trajectory2,transition)
The Aero.trajectory.merge function combines two discontinuous
trajectories, from Aero.trajectory.sectorTrajectory and Aero.trajectory.parallelSweepTrajectory, together. To smooth the transition
between the two trajectories, the function uses a continuous trajectory as a bridge or
transition.
Consider merging trajectories when working with existing trajectories rather than
parametric trajectory definitions. The Aero.trajectory.merge function
handles the complexity of connecting existing trajectories while managing discontinuities
and ensuring smooth transitions between the two trajectories.
When the input trajectories differ in output format or unit system, the
Aero.trajectory.merge function normalizes the inputs to a common
structure and applies unit conversion as needed before merging. Define both input
trajectories in the flat coordinate plane.
specifies additional options using one or more name-value arguments.combinedTrajectory = Aero.trajectory.merge(___,Name=Value)
Examples
Input Arguments
Name-Value Arguments
Output Arguments
Algorithms
The Aero.trajectory.merge function combines two discontinuous
trajectories into a single unified trajectory by inserting a continuous transition trajectory
between them. The algorithm follows:
Normalize input — When the input trajectories differ in output format (
timeseriesvs.timetable) or unit system (Metric, English ft/s, English kts), the function normalizes both inputs to a common structure and applies unit conversion as needed before merging.Create transition trajectory — The function creates a continuous transition trajectory (Bezier, circular, or polynomial) that acts as a bridge between the two input trajectories. The transition trajectory derives its initial position and initial heading from the end of trajectory1, and its final position and final heading from the initial point of trajectory2. The transition trajectory uses the speed of trajectory1.
Handle altitude transition — If the altitudes of the two input trajectories differ at the merge point, the function automatically inserts a polyline trajectory segment to transition between the altitudes before the transition trajectory.
Align time — The time entries of the combined trajectory follow trajectory1. The function computes the transition trajectory timing using the speed of trajectory1.
Concatenate reference signals — The function concatenates the reference signals from trajectory1, the transition trajectory (and any altitude transition segment), and trajectory2 in sequence to produce the final combined trajectory output.
Note
If the endpoint of trajectory1 coincides with the initial point of
trajectory2, the function returns an error when the transition type is
"bezier" or "polynomial". A
"circular" transition can connect coincident endpoints.
Version History
Introduced in R2026b
See Also
Live Editor Tasks
Functions
Aero.trajectory.addEvent|Aero.trajectory.bezierTrajectory|Aero.trajectory.circularTrajectory|Aero.trajectory.creepingTrajectory|Aero.trajectory.expandingSquareTrajectory|Aero.trajectory.lissajousTrajectory|Aero.trajectory.parallelSweepTrajectory|Aero.trajectory.polylineTrajectory|Aero.trajectory.polynomialTrajectory|Aero.trajectory.sectorTrajectory|Aero.trajectory.spaceFillingTrajectory|Aero.trajectory.tracklineTrajectory