Satellite formation flying is the placing micro-satellites with the same mission into nearby orbits to form a cluster. Clohessy-Wiltshire equations are used to describe the relative motion and control strategies between satellites within a cluster, which are known as Hill's equations. Even though Hill's equations are powerful in determining initial conditions for the satellite formation flying, they can not accurately express the relative motion under J2 perturbation. Some methods have been developed for the determination of initial conditions to avoid limits of Hill's equation. This paper gives a new method of determining initial conditions using mean elements. For this research mean elements were transformed to osculating elements using Brouwer's theory and the orbit was propaeated with the consideration of J2-J8 to get a relative position. The results show that satellites within a cluster are maintained in the desired boundary for long period and the method is effective on a fuel saving for satellite formation flying.