forked from STI/Astroport.ONE
Zone debug
This commit is contained in:
parent
9164b6a265
commit
7d8a9b3d7f
23
API/ZONE.sh
23
API/ZONE.sh
@ -62,31 +62,28 @@ LON="${WHAT}"
|
|||||||
LAT=$(makecoord ${LAT})
|
LAT=$(makecoord ${LAT})
|
||||||
LON=$(makecoord ${LON})
|
LON=$(makecoord ${LON})
|
||||||
JSON="ZONE_${LAT}_${LON}_${DEG}.json"
|
JSON="ZONE_${LAT}_${LON}_${DEG}.json"
|
||||||
|
$(${MY_PATH}/../tools/getUMAP_ENV.sh "${LAT}" "${LON}" | tail -n 1)
|
||||||
|
echo "UMAPG1PUB=$UMAPG1PUB UMAPIPNS=$UMAPIPNS SECTORG1PUB=$SECTORG1PUB SECTORIPNS=$SECTORIPNS REGIONG1PUB=$REGIONG1PUB REGIONIPNS=$REGIONIPNS LAT=$LAT LON=$LON SLAT=$SLAT SLON=$SLON RLAT=$RLAT RLON=$RLON"
|
||||||
|
|
||||||
## SECTOR LEVEL
|
## SECTOR LEVEL
|
||||||
if [[ ${DEG} == "0.01" ]]; then
|
if [[ ${DEG} == "0.01" ]]; then
|
||||||
SLAT="${LAT::-1}"
|
LAT=${SLAT}
|
||||||
SLON="${LON::-1}"
|
LON=${SLON}
|
||||||
SECTOR="_${SLAT}_${SLON}"
|
SECTOR="_${SLAT}_${SLON}"
|
||||||
echo "SECTOR = ${SECTOR}"
|
echo "SECTOR = ${SECTOR}"
|
||||||
ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${SLAT}*_${SLON}*/SECTORNS | tail -n 1)
|
ZONEINDEX=$SECTORIPNS
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${SLAT}*_${SLON}*/SECTORNS | tail -n 1)
|
ZONEG1PUB=$SECTORG1PUB
|
||||||
ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${SLAT}*_${SLON}*/SECTORG1PUB | tail -n 1)
|
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${SLAT}*_${SLON}*/SECTORG1PUB | tail -n 1)
|
|
||||||
JSON="ZONE${SECTOR}_${DEG}.json"
|
JSON="ZONE${SECTOR}_${DEG}.json"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## REGION & ABOVE LEVEL
|
## REGION & ABOVE LEVEL
|
||||||
if [[ ${DEG} == "0.1" || ${DEG} == "1" ]]; then
|
if [[ ${DEG} == "0.1" || ${DEG} == "1" ]]; then
|
||||||
RLAT="$(echo ${LAT} | cut -d '.' -f 1)"
|
LAT=${RLAT}
|
||||||
RLON="$(echo ${LON} | cut -d '.' -f 1)"
|
LON=${RLON}
|
||||||
REGION="_${RLAT}_${RLON}"
|
REGION="_${RLAT}_${RLON}"
|
||||||
echo "REGION = ${REGION}"
|
echo "REGION = ${REGION}"
|
||||||
ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${RLAT}*_${RLON}*/REGIONNS | tail -n 1)
|
ZONEINDEX=$REGIONIPNS
|
||||||
[[ ! $ZONEINDEX ]] && ZONEINDEX="/ipns/"$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${RLAT}*_${RLON}*/REGIONNS | tail -n 1)
|
ZONEG1PUB=$REGIONG1PUB
|
||||||
ZONEG1PUB=$(cat ~/.zen/tmp/swarm/*/UPLANET/__/_*_*/_*.?_*.?/_${RLAT}*_${RLON}*/REGIONG1PUB | tail -n 1)
|
|
||||||
[[ ! $ZONEG1PUB ]] && ZONEG1PUB=$(cat ~/.zen/tmp/${IPFSNODEID}/UPLANET/__/_*_*/_*.?_*.?/_${RLAT}*_${RLON}*/REGIONG1PUB | tail -n 1)
|
|
||||||
JSON="ZONE${REGION}_${DEG}.json"
|
JSON="ZONE${REGION}_${DEG}.json"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@ -123,7 +123,7 @@ figcaption {
|
|||||||
|
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-size: 69%;
|
font-size: 66%;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
a {
|
||||||
|
@ -14,8 +14,8 @@ LON="$2"
|
|||||||
ZLAT=$(makecoord ${LAT})
|
ZLAT=$(makecoord ${LAT})
|
||||||
ZLON=$(makecoord ${LON})
|
ZLON=$(makecoord ${LON})
|
||||||
## CHECK
|
## CHECK
|
||||||
[[ "$ZLAT" != "$LAT" ]] && echo "# ERROR - $LAT bad format -" && exit 1
|
[[ "$ZLAT" != "$LAT" || "$LAT" == "" ]] && echo "# ERROR - $LAT bad format -" && exit 1
|
||||||
[[ "$ZLON" != "$LON" ]] && echo "# ERROR - $LON bad format -" && exit 1
|
[[ "$ZLON" != "$LON" || "$LON" == "" ]] && echo "# ERROR - $LON bad format -" && exit 1
|
||||||
|
|
||||||
## COMPUTE UMAP, USECTOR, UREGION
|
## COMPUTE UMAP, USECTOR, UREGION
|
||||||
SLAT="${LAT::-1}"
|
SLAT="${LAT::-1}"
|
||||||
|
Loading…
Reference in New Issue
Block a user