! 5 Oct 2003 JMH ! the individual runs/flight legs must be specified in chronological order $LOOP run {{rcfshort}_Lst} $INDEX i SysCmd 'echo processing {run} >con:' $INCLUDE {CIncPath}Procs\DMY.inc $INCLUDE {CIncPath}Gets\GetNovPos.inc dams\{LFDate}\{AC}{LFDate}_{LFTime} {TFrom} {TTo} {Nseq} {NPLst} $INCLUDE {CIncPath}Procs\LTtime.inc $IF {AMGorDIST} $EQ DIST $THEN $IF {DISTref} $EQ Start $THEN RefLat = Nlat[1] RefLon = Nlon[1] $ENDIF $IF {DISTref} $EQ GenDef $THEN RefLat = {RefLat} RefLon = {RefLon} $ELSE RefLat = {RefLat_{DISTref}} RefLon = {RefLon_{DISTref}} $ENDIF $ENDIF $IF {PlotEveTrk} $EQ Y $OR {PlotEveAlt} $EQ Y $THEN ReadFile V60 E {DataPath}dams\{LFDate}\{AC}{LFDate}_{LFTime}.e Etag Event End Etag=Etag/1000 MatchEle eleind NPtag Etag SelS1(S2) ENsec Nsec eleind SelS1(S2) ENalt Nalt eleind SelS1(S2) ENlat Nlat eleind SelS1(S2) ENlon Nlon eleind $IF {AMGorDIST} $EQ AMG $THEN Zone = ENlat*0 + {AMGLonNo} LL2AMG Ex Ey Zone ENlat ENlon $ELSE Dist(lon) Ex ENlon RefLat RefLon Dist(lat) Ey ENlat RefLat RefLon $ENDIF Ex = Ex/1000. Ey = Ey/1000. ENalt = ENalt/1000. Report eleind Etag ENlon $ENDIF minLat = min(Nlat) maxLat = max(Nlat) minLon = min(Nlon) maxLon = max(Nlon) Report minLat maxLat minLon maxLon $IF {AMGorDIST} $EQ AMG $THEN Zone = Nlat*0 + {AMGLonNo} LL2AMG x y zone Nlat Nlon $ELSE Dist(lon) x Nlon RefLat RefLon Dist(lat) y Nlat RefLat RefLon $ENDIF x = x/1000. y = y/1000. Nalt = Nalt/1000. $IF {TimeMarkAlt} $EQ Y $OR {TimeMarkTrk} $EQ Y $THEN t = LTtime sec(hhmmsshh) * t hhmmsshh(sec) hhmmsshh t 0 ! *** find samples for plotting of time strings ! *** find exact minutes tmin = int(min(t)) tmax = int(max(t)) CreateLd mins {MarkSeq} tmin tmax MatchEle indMn t mins ! mint = hhmmsshh/100 Clear mins ! *** find samples for plotting of time ticks ! *** find exact seconds ! sec = t tmin = int(min(t)) tmax = int(max(t)) CreateLd secs {MarkSeq} tmin tmax MatchEle indTk t secs Clear secs HMS = hhmmsshh/100 Clear hhmmsshh $ENDIF ! *** scaling for track plot z = Nalt t = Nsec $LOOP n x y z t {n}min = min({n}) {n}max = max({n}) $IF {n} $IN xy $THEN {n}min = {n}min - {MarginTrk} {n}max = {n}max + {MarginTrk} $ENDIF $IF {n} $EQ z $THEN {n}min = {n}min - {MarginAlt} {n}max = {n}max + {MarginAlt} $ENDIF $IF {n} $EQ t $THEN {n}min = {n}min - {MarginSec} {n}max = {n}max + {MarginSec} $ENDIF Report {n}min {n}max $ENDLOOP $IF {Coast} $EQ Y $THEN ReadFile B1 {MapFile} clat * * * 8 Series lon clon End $IF {AMGorDIST} $EQ AMG $THEN zone = clat*0 + {AMGLonNo} LL2AMG xcoast ycoast zone clat clon $ELSE Dist(lon) xcoast clon RefLat RefLon Dist(lat) ycoast clat RefLat RefLon $ENDIF xcoast = xcoast/1000. ycoast = ycoast/1000. $ENDIF xratio = 1 yratio = (ymax-ymin)/(xmax-xmin) LTdateS = LTdate[1] LTtimeS = LTtime[1] LTdateE = LTdate[] LTtimeE = LTtime[] $IF {TrkPlot} $EQ Y $THEN set PSfile {PltBaseNameTrk}{run}.ps PLOT IF (xmax-xmin) GT (ymax-ymin) THEN Size A4H ELSE Size A4V ENDIF NewRow 1 Logo off $IF {AMGorDIST} $EQ AMG $USE ... Graph * * 'Easting in km' 'Northing in km' 3 * * ... $ELSE Graph * * 'km' 'km' 3 * * Title left ' {PltTitle} VH-{AC} {run} {LongDate{MMDD}} ~LTtimeS:HMS~-~LTtimeE:HMS~LT' 4.0 * * Grid 1 Big * * * Grid 2 Big * * * AxisRange 1 xmin xmax AxisRange 2 ymin ymax AxisNumbers 1 Big * * 3.0 * * * * AxisNumbers 2 Big * Rot90 3.0 * * * * AspectRatio xratio yratio Curve x y 0.2 {DotOrLine} * red * $IF {TimeMarkTrk} $EQ Y $USE Marks Numbers x y indMn {SideTime} LTtime * HM * blue $IF {TagMarkTrk} $EQ Y $USE Marks Numbers x y {each} {SideTag} tag * I 2 blue $IF {AltMarkTrk} $EQ Y $USE Marks Numbers x y indMn {SideAlt} Nalt * F6.3 * green $IF {PlotEveTrk} $EQ Y $USE Marks Numbers Ex Ey * centre Event 0 A 3 black $IF {Coast} $EQ Y $THEN Curve xcoast ycoast LineStyle Lines 0.2 {CoastCol} * $ENDIF $IF {PlotLM} $EQ Y $THEN $INCLUDE '..\cfg\{LMFile}' $ENDIF END IF (xmax-xmin) GT (ymax-ymin) THEN SysCmd 'ps2pdf -g{A4H} {PltBaseNameTrk}{run}.ps {PltBaseNameTrk}{run}.pdf >con:' ELSE SysCmd 'ps2pdf -g{A4V} {PltBaseNameTrk}{run}.ps {PltBaseNameTrk}{run}.pdf >con:' ENDIF SysCmd 'del {PltBaseNameTrk}{run}.ps' $ENDIF $IF {AltPlot} $EQ Y $THEN NaltSm = Nalt FILTER FilterType NOAA Pass Low 0.001 DataInt 1 Select NaltSm END set PSfile {PltBaseNameAlt}{run}.ps PLOT Size A4H NewRow 1 Logo off Graph * * 'GPS time in sec' 'GPS altitude in km' 3 * * Title left ' {PltTitle} VH-{AC} {run} {LongDate{MMDD}} ~LTtimeS:HMS~-~LTtimeE:HMS~LT' 4.0 * * AxisRange 1 tmin tmax AxisRange 2 zmin zmax Grid 1 Big * * * Grid 2 Big * * * AxisNumbers 1 Big * * 3.0 * * I AxisNumbers 2 Big * Rot90 3.0 * * @:F7.3 AxisNumbers 3 big left * * * * @:SHMS AxisLabel 3 * * 'UTC' AxisNumbers 4 big right rot90 3.0 * * @/0.3048:F7.3 AxisLabel 4 right * 'GPS altitude in kft' Curve Nsec Nalt * {DotOrLine} * red * $IF {TimeMarkAlt} $EQ Y $USE Marks Numbers Nsec NaltSm indMn left LTtime * +HM * blue $IF {TagMarkAlt} $EQ Y $USE Marks Numbers Nsec NaltSm {each} right tag * +I 2 blue $IF {PlotEveAlt} $EQ Y $USE Marks Numbers ENsec ENalt-{MarginAlt}/2 * centre Event 0 A 4 black END SysCmd 'ps2pdf -g{A4H} {PltBaseNameAlt}{run}.ps {PltBaseNameAlt}{run}.pdf >con:' SysCmd 'del {PltBaseNameAlt}{run}.ps' $ENDIF $ENDLOOP