class dk_au_eng_Radar -- -- External Java implementation of radar screen -- -- operations
-- Add a FO to the radar to track public AddFlyingObject: int * int * int * seqofchar ==> ()
AddFlyingObject(longtitude, latitude, altitude, transpondercode) == isnotyetspecified;
-- Remove a FO from the radar public RemFlyingObject: seqofchar ==> ()
RemFlyingObject(transpondercode) == isnotyetspecified;
-- Make the scan line progress one step public StepRadar: () ==> ()
StepRadar() == isnotyetspecified;
-- Update the position of a flying object given its transponder code public UpdateFlyingObject: seqofchar * int * int ==> ()
UpdateFlyingObject(transponder,long,lat) == isnotyetspecified;
-- Set the step size, that is the angle by which the scan line is progressed when -- stepping public SetStepSize: int ==> ()
SetStepSize(size) == isnotyetspecified;
-- Set the width of the scan cone public SetScanWidth: int ==> ()
SetScanWidth(width) == isnotyetspecified;
-- Set the time a scan takes public SetScanTime: int ==> ()
SetScanTime(time) == isnotyetspecified;
-- Set the position of the Radar window (a nice model with two radars would want to -- position the radars next to each other). public SetWindowPosition: int * int ==> ()
SetWindowPosition(x,y) == isnotyetspecified;
-- Set the title of the Radar Window public SetTitle: seqofchar ==> ()
SetTitle(title) == isnotyetspecified;
-- Force the Scan Angle to be angle public SetScanAngle: int ==> ()
SetScanAngle(angle) == isnotyetspecified;
-- Run operation that makes 400 steps with two planes one of which is moving across. publicstatic TestRadar: () ==> int
TestRadar() == ( let
rad1:dk_au_eng_Radar = new dk_au_eng_Radar(),
rad2:dk_au_eng_Radar = new dk_au_eng_Radar() in (
rad2.SetWindowPosition(300,300);
rad1.SetScanWidth(60);
rad1.SetScanTime(80);
rad1.AddFlyingObject(120, 120, 0, "LAN256");
rad1.AddFlyingObject(0, 80, 0, "BA512");
rad1.SetStepSize(6); forall x inset { -200,...,200 } do
(rad2.StepRadar();rad1.UpdateFlyingObject("BA512",x,80);rad1.SetWindowPosition(x+250, 100);rad1.StepRadar());
return 0);
);
end dk_au_eng_Radar
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.