Docking Alignment Concept
The satellite brings itself to within a metre of the docking face on the probe. The speed of approached is dramatically reduced and gets slower as the satellite gets closer. On the approach the satellite will automate between the upper green beacon and lower red beacon on the docking face of the satellite.
The vision system in the dock that was previously used for line-of-sight now looks for the two docking features. By calculating the angle offset and position of the two alignment beacons an attitude adjustment command can be sent via telemetry to the satellite. This process continues until the satellite is magnetically pulled into the docking position.
Function
The below process and software is written and active in the prototype. The images are actual real images from the physical simulation.
1. Telemetry is sent to the satellite to activate the top beacon
2. The docking plate acquires an image from it's imaging camera
3. Telemetry is sent to the satellite to deactivate the top beacon and activate the bottom beacon
4. The docking plate acquires an image from it's imaging camera
5. A stark filter is applied to both images to improve contrast between the beacons and the background noise
6. The new images are fed to an algorithm which determines the position of each beacon in the frame
7. The offset between the two detected beacons is calculated by the algorithm to determine to attitude adjustment needed by the satellite
The angular adjustment calculation is implemented in the prototype software in Java as...
/**
* Calculate the angular difference between two features in degrees
*
* @param topFeature
* @param bottomFeature
* @return Double representing the difference in degrees between the specified feature origins
*/
public double calculateOffset(Feature topFeature, Feature bottomFeature){
double result = 0.0;
double deltaX = 0.0;
double deltaY = 0.0;
//Calculate the offset between the two detected points
deltaY = (double)topFeature.getOriY() - (double)bottomFeature.getOriY();
deltaX = (double)topFeature.getOriX() - (double)bottomFeature.getOriX();
result = Math.toDegrees(Math.atan2(deltaY,deltaX));
return result;
}
Top Beacon Image
Top Beacon image with filter
Bottom Beacon Image
Bottom Beacon image with filter
Result of algorithm
Timing
The process timings for the algorithm to run the above cases is...
Case 1 = 1371ms
Improvements
During testing, in some cases it was noted that both beacons could be determined from a single image. It may be possible to adjust the colour and brightness of the beacons to make them more reliable to detect on a single image. As an optimisation it could also be possible to try with a single image first and if that doesn't work to switch to the alternating beacon method.
Beacon Image
Beacon Image with filter
Result of algorithm
References
1. The image filter routine from step two is from an image manipulation library for Java available at - http://www.jhlabs.com/ip/filters/
2. The source code for the image recognition software is available at the github for this project - https://github.com/mattythorne/ss-cornelius