Panel Wiring

From Bearhawk
Revision as of 09:22, 7 November 2021 by Admin (talk | contribs)
Jump to navigation Jump to search

Link to harness building

https://vansairforce.com/community/showthread.php?t=152279

Drawing

Docs

https://static.garmin.com/pumac/GTX327Transponder_InstallationManual.pdf

script

This makes the anchor points on the draw.io stuffs

#!/bin/bash 

if [ -z "$1" ] || [ -z "$2" ]; then
  echo "usage: $0 <number of elements> <side>"
  exit
fi 

if [ "$2" == "left" ]; then
  SIDE=0
else
  SIDE=1
fi

echo "points=["

POINTS=$(($1+1))
POINTS=$1
SPACING=`echo "scale=3; 1/$POINTS" | bc`
NUM=`echo "scale=3; $SPACING/2" | bc`

for (( I=1; I<=$POINTS; I++ )); do

  if [ "$I" == "$POINTS" ]; then
    echo "[${SIDE},0${NUM}]]"
  else
    echo "[${SIDE},0${NUM}],"
  fi

  TMP=`echo "scale=3; $NUM + $SPACING" | bc`
  NUM=$TMP

done