(define (domain satellite)
(:requirements :strips)
(:types object satellite direction instrument mode)
(:predicates (onboard ?i - instrument ?s - satellite)
	     (supports ?i - instrument ?m - mode)
	     (pointing ?s - satellite ?d - direction)
	     (poweravail ?s - satellite)
	     (poweron ?i - instrument)
	     (calibrated ?i - instrument)
	     (haveimage ?d - direction ?m - mode)
	     (calibrationtarget ?i - instrument ?d - direction))

(:action turnto
 :parameters (?o1 - satellite ?o2 - direction ?o3 - direction)
 :precondition
	(and (pointing ?o1 ?o3))
 :effect
	(and (pointing ?o1 ?o2) (not (pointing ?o1 ?o3))))

(:action switchon
 :parameters (?o1 - instrument ?o2 - satellite)
 :precondition
	(and (onboard ?o1 ?o2) (poweravail ?o2))
 :effect
	(and (poweron ?o1) (not (calibrated ?o1)) (not (poweravail ?o2))))

(:action switchoff
 :parameters (?o1 - instrument ?o2 - satellite)
 :precondition
	(and (onboard ?o1 ?o2) (poweron ?o1))
 :effect
	(and (poweravail ?o2) (not (poweron ?o1))))

(:action calibrate
 :parameters (?o1 - satellite ?o2 - instrument ?o3 - direction)
 :precondition
	(and (onboard ?o2 ?o1) (calibrationtarget ?o2 ?o3) (pointing ?o1 ?o3) (poweron ?o2))
 :effect
	(and (calibrated ?o2)))

(:action takeimage
 :parameters (?o1 - satellite ?o2 - direction ?o3 - instrument ?o4 - mode)
 :precondition
	(and (calibrated ?o3) (onboard ?o3 ?o1) (supports ?o3 ?o4) (poweron ?o3) (pointing ?o1 ?o2) (poweron ?o3))
 :effect
	(and (haveimage ?o2 ?o4)))
)
