Avionics and instruments: Difference between revisions

Jump to navigation Jump to search
→‎Compass: Make "quick dirty script" less dirty.
(category aircraft instruments)
(→‎Compass: Make "quick dirty script" less dirty.)
Line 14: Line 14:


  #!/bin/bash
  #!/bin/bash
  if [ $# -ne 2 ]; then
  if (( $# != 2 )); then
   echo "Usage: $(basename $0) lat long";
   echo "Usage: ${0##*/} lat long"
   echo "East and north are positive.";
   echo "East and north are positive."
  else
  else
   testmagvar $1 $2 0 $(date +"%m %d %g")|tail -1|tr -s [:space:] \\t|cut -f6;
   read -ra x < <(testmagvar "$1" "$2" 0 "$(date +"%m %d %g")" | tail -1)
  echo "${x[5]}"
  fi
  fi


3

edits

Navigation menu